axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicholas Hart <nh...@real.com>
Subject [Axis2] wsdlwjava problem generating code for arrays
Date Fri, 08 Dec 2006 01:17:52 GMT

Thanks again for the previous help.  I'm successfully generating 
compilable code for most cases.  My next problem is with arrays.  I've 
attached my wsdl file.  wsdl2java.bat ("-l c -a -u -d adb") generates 
this error:

...
Caused by: org.apache.axis2.schema.SchemaCompilationException: 
{http://schemas.xmlsoap.org/soap/encoding/}Array is not supported.
	at 
org.apache.axis2.schema.SchemaCompiler.findClassName(SchemaCompiler.java:810)
	at 
org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1066)
...

If I change the return type for the function getStringArray from 
"tns1:ArrayOf_xsd_string" to "xsd:string", then the code seems to 
enerate just fine.

I think I saw this same problem in issue 1466 ( 
http://issues.apache.org/jira/browse/AXIS2-1466 ), but when I tried 
following the workaround instructions I got a different error.  It looks 
to me like the listed workaround is incorrect, because adding the 
"import" tag before the "wsdl:types" tag causes the error below:

Exception in thread "main" 
org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
	at 
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:114)
	at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
	at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: javax.wsdl.WSDLException: WSDLException (at 
/wsdl:definitions/import): faultCode=INVALID_WSDL: Encountered illegal 
extension element 'import' in the context of a 'javax.wsdl.Definition'. 
Extension elements must be in a namespace other than WSDL's.
	at com.ibm.wsdl.xml.WSDLReaderImpl.parseExtensibilityElement(Unknown 
Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source)
	at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source)
...


Is there someone who can explain how to get wsdl2java to handle these 
arrays?  Thanks again.



Mime
View raw message