You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by aj...@apache.org on 2005/11/26 08:00:50 UTC
svn commit: r349093 - in
/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2:
databinding/schema/SchemaCompiler.java
wsdl/codegen/emitter/MultiLanguageClientEmitter.java
Author: ajith
Date: Fri Nov 25 23:00:41 2005
New Revision: 349093
URL: http://svn.apache.org/viewcvs?rev=349093&view=rev
Log:
Fixed the schema compiler
1. Added the imported support in the SchemaCompiler.java
Modified:
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/SchemaCompiler.java
webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/SchemaCompiler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/SchemaCompiler.java?rev=349093&r1=349092&r2=349093&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/SchemaCompiler.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/databinding/schema/SchemaCompiler.java Fri Nov 25 23:00:41 2005
@@ -110,9 +110,22 @@
*/
public void compile(XmlSchema schema) throws SchemaCompilationException{
+ //First look for the schemas that are imported and process them
+ //Note that these are processed recursively!
+
+ XmlSchemaObjectCollection includes = schema.getIncludes();
+ if (includes!=null){
+ Iterator tempIterator = includes.getIterator();
+ while (tempIterator.hasNext()) {
+ Object o = tempIterator.next();
+ if (o instanceof XmlSchemaImport){
+ XmlSchema schema1 = ((XmlSchemaImport) o).getSchema();
+ if (schema1!=null) compile(schema1);
+ }
+ }
+ }
//select all the elements. We generate the code for types
//only if the elements refer them!!!
-
XmlSchemaObjectTable elements = schema.getElements();
Iterator xmlSchemaElement1Iterator = elements.getValues();
while (xmlSchemaElement1Iterator.hasNext()) {
Modified: webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java?rev=349093&r1=349092&r2=349093&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java (original)
+++ webservices/axis2/trunk/java/modules/codegen/src/org/apache/axis2/wsdl/codegen/emitter/MultiLanguageClientEmitter.java Fri Nov 25 23:00:41 2005
@@ -198,7 +198,7 @@
private void emitSkeletonAutomatic(WSDLDescription wom) throws Exception{
Map bindings = wom.getBindings();
if (bindings==null || bindings.isEmpty()){
- //No binding is not present.use the interface mode
+ //No binding is present.use the interface mode
emitSkeletonInterface(wom);
}else{
//use the binding mode