You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by Nicholas Hart <nh...@real.com> on 2006/11/20 23:30:23 UTC
[Axis2] wsdl2java exception
I've installed the 1.1 release of axis2 on winxp, and I've tried
updating the jars with those located in the "Axis2 Maven Repository"
(http://www.apache.org/dist/java-repository/org.apache.axis2/), however,
I can't seem to get wsdl2java to generate code for C for one of my WSDL
files. I seem to have it working for another WSDL file, but it chokes
on one particular file.
The instigator appears to be the following:
Caused by: org.apache.axis2.schema.SchemaCompilationException:
{http://schemas.xmlsoap.org/soap/encoding/}Array is not supported.
But frankly I don't understand what that means and it doesn't seem to
tell where it's actually breaking. I'd appreciate any insight anyone has.
In our "wsdl:definitions" tag we set the following namespace attributes
(in addition to some others):
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="http://kani.common.real.com"
inside our schema we import the namespaces and declare a complex type
like so:
<import namespace="http://kani.common.real.com"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOf_tns1_CobrandMetaData">
<complexContent>
<restriction base="soapenc:Array">
<attribute ref="soapenc:arrayType"
wsdl:arrayType="tns1:CobrandMetaData[]"/>
</restriction>
</complexContent>
</complexType>
That seems to be the only place where we're using "Array" in that WSDL,
and we declared the other type ("CobrandMetaData") referenced prior to
the above declaration. Also, I believe this WSDL was generated with
Axis1 not Axis2, thought I would hope that isn't a problem.
Below is the full output when I run wsdl2java:
wsdl2java.bat -o _Axis2Output -l c -uri RhapsodyDirectAccountMgmt.wsdl
Using AXIS2_HOME: C:\dev\axis2-1.1
Using JAVA_HOME: c:\Program Files\Java\jdk1.5.0_07
Exception in thread "main"
org.apache.axis2.wsdl.codegen.CodeGenerationException:
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
Caused by: java.lang.RuntimeException:
java.lang.reflect.InvocationTargetException
at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:52)
at
org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
... 2 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:49)
... 3 more
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:820)
at
org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1076)
at
org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:989)
at
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:973)
at
org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
at
org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
at
org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
at
org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
at
org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
at
org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
at
org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
at
org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
... 8 more
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
Re: [Axis2] wsdl2java exception
Posted by Davanum Srinivas <da...@gmail.com>.
please upload your complete wsdl to that bug report.
thanks,
dims
On 11/20/06, Nicholas Hart <nh...@real.com> wrote:
> it looks like I'm experiencing the same error reported here:
>
> http://issues.apache.org/jira/browse/AXIS2-1466
>
> However, I'm having trouble getting the workaround mentioned to compile.
> If I add the "import" tag to my "wsdl:definitions" tag, then the tool
> complains about it:
>
> Caused by: javax.wsdl.WSDLException: WSDLException (at
> /wsdl:definitions/import): faultCode=INVALID_WSDL: Encountered il
> legal extension element 'import' in the context of a
> 'javax.wsdl.Definition'. Extension elements must be in a namespace
> other than WSDL's.
>
> any ideas how to workaround this issue? If it helps, here's what the
> top of my WSDL looks like:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="urn:rhapsodydirectaccountmgmt"
> xmlns:apachesoap="http://xml.apache.org/xml-soap"
> xmlns:impl="urn:rhapsodydirectaccountmgmt"
> xmlns:intf="urn:rhapsodydirectaccountmgmt"
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns1="http://kani.common.real.com"
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> <!--WSDL created by Apache Axis version: 1.4
> Built on Apr 22, 2006 (06:55:48 PDT)-->
> <wsdl:types>
> <schema targetNamespace="http://kani.common.real.com"
> xmlns="http://www.w3.org/2001/XMLSchema">
> <import namespace="urn:rhapsodydirectaccountmgmt"/>
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
>
>
>
>
>
>
> Nicholas Hart wrote:
> > I've installed the 1.1 release of axis2 on winxp, and I've tried
> > updating the jars with those located in the "Axis2 Maven Repository"
> > (http://www.apache.org/dist/java-repository/org.apache.axis2/), however,
> > I can't seem to get wsdl2java to generate code for C for one of my WSDL
> > files. I seem to have it working for another WSDL file, but it chokes
> > on one particular file.
> >
> > The instigator appears to be the following:
> >
> > Caused by: org.apache.axis2.schema.SchemaCompilationException:
> > {http://schemas.xmlsoap.org/soap/encoding/}Array is not supported.
> >
> > But frankly I don't understand what that means and it doesn't seem to
> > tell where it's actually breaking. I'd appreciate any insight anyone has.
> >
> > In our "wsdl:definitions" tag we set the following namespace attributes
> > (in addition to some others):
> > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> > xmlns:tns1="http://kani.common.real.com"
> >
> > inside our schema we import the namespaces and declare a complex type
> > like so:
> >
> > <import namespace="http://kani.common.real.com"/>
> > <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> > <complexType name="ArrayOf_tns1_CobrandMetaData">
> > <complexContent>
> > <restriction base="soapenc:Array">
> > <attribute ref="soapenc:arrayType"
> > wsdl:arrayType="tns1:CobrandMetaData[]"/>
> > </restriction>
> > </complexContent>
> > </complexType>
> >
> > That seems to be the only place where we're using "Array" in that WSDL,
> > and we declared the other type ("CobrandMetaData") referenced prior to
> > the above declaration. Also, I believe this WSDL was generated with
> > Axis1 not Axis2, thought I would hope that isn't a problem.
> >
> > Below is the full output when I run wsdl2java:
> >
> > wsdl2java.bat -o _Axis2Output -l c -uri RhapsodyDirectAccountMgmt.wsdl
> > Using AXIS2_HOME: C:\dev\axis2-1.1
> > Using JAVA_HOME: c:\Program Files\Java\jdk1.5.0_07
> > Exception in thread "main"
> > org.apache.axis2.wsdl.codegen.CodeGenerationException:
> > java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> > at
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
> >
> > at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
> > at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> > Caused by: java.lang.RuntimeException:
> > java.lang.reflect.InvocationTargetException
> > at
> > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:52)
> >
> > at
> > org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
> >
> > ... 2 more
> > Caused by: java.lang.reflect.InvocationTargetException
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> >
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> >
> > at java.lang.reflect.Method.invoke(Method.java:585)
> > at
> > org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:49)
> >
> > ... 3 more
> > 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:820)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1076)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:989)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:973)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> > at
> > org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
> >
> > at
> > org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> > at
> > org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> > at
> > org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> > ... 8 more
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-c-dev-help@ws.apache.org
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>
--
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org
Re: [Axis2] wsdl2java exception
Posted by Nicholas Hart <nh...@real.com>.
it looks like I'm experiencing the same error reported here:
http://issues.apache.org/jira/browse/AXIS2-1466
However, I'm having trouble getting the workaround mentioned to compile.
If I add the "import" tag to my "wsdl:definitions" tag, then the tool
complains about it:
Caused by: javax.wsdl.WSDLException: WSDLException (at
/wsdl:definitions/import): faultCode=INVALID_WSDL: Encountered il
legal extension element 'import' in the context of a
'javax.wsdl.Definition'. Extension elements must be in a namespace
other than WSDL's.
any ideas how to workaround this issue? If it helps, here's what the
top of my WSDL looks like:
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="urn:rhapsodydirectaccountmgmt"
xmlns:apachesoap="http://xml.apache.org/xml-soap"
xmlns:impl="urn:rhapsodydirectaccountmgmt"
xmlns:intf="urn:rhapsodydirectaccountmgmt"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:tns1="http://kani.common.real.com"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--WSDL created by Apache Axis version: 1.4
Built on Apr 22, 2006 (06:55:48 PDT)-->
<wsdl:types>
<schema targetNamespace="http://kani.common.real.com"
xmlns="http://www.w3.org/2001/XMLSchema">
<import namespace="urn:rhapsodydirectaccountmgmt"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
Nicholas Hart wrote:
> I've installed the 1.1 release of axis2 on winxp, and I've tried
> updating the jars with those located in the "Axis2 Maven Repository"
> (http://www.apache.org/dist/java-repository/org.apache.axis2/), however,
> I can't seem to get wsdl2java to generate code for C for one of my WSDL
> files. I seem to have it working for another WSDL file, but it chokes
> on one particular file.
>
> The instigator appears to be the following:
>
> Caused by: org.apache.axis2.schema.SchemaCompilationException:
> {http://schemas.xmlsoap.org/soap/encoding/}Array is not supported.
>
> But frankly I don't understand what that means and it doesn't seem to
> tell where it's actually breaking. I'd appreciate any insight anyone has.
>
> In our "wsdl:definitions" tag we set the following namespace attributes
> (in addition to some others):
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:tns1="http://kani.common.real.com"
>
> inside our schema we import the namespaces and declare a complex type
> like so:
>
> <import namespace="http://kani.common.real.com"/>
> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> <complexType name="ArrayOf_tns1_CobrandMetaData">
> <complexContent>
> <restriction base="soapenc:Array">
> <attribute ref="soapenc:arrayType"
> wsdl:arrayType="tns1:CobrandMetaData[]"/>
> </restriction>
> </complexContent>
> </complexType>
>
> That seems to be the only place where we're using "Array" in that WSDL,
> and we declared the other type ("CobrandMetaData") referenced prior to
> the above declaration. Also, I believe this WSDL was generated with
> Axis1 not Axis2, thought I would hope that isn't a problem.
>
> Below is the full output when I run wsdl2java:
>
> wsdl2java.bat -o _Axis2Output -l c -uri RhapsodyDirectAccountMgmt.wsdl
> Using AXIS2_HOME: C:\dev\axis2-1.1
> Using JAVA_HOME: c:\Program Files\Java\jdk1.5.0_07
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException:
> java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:224)
>
> at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
> at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> Caused by: java.lang.RuntimeException:
> java.lang.reflect.InvocationTargetException
> at
> org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:52)
>
> at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:177)
>
> ... 2 more
> Caused by: java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>
> at java.lang.reflect.Method.invoke(Method.java:585)
> at
> org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:49)
>
> ... 3 more
> 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:820)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processComplexContent(SchemaCompiler.java:1076)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processContentModel(SchemaCompiler.java:989)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:973)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processNamedComplexSchemaType(SchemaCompiler.java:909)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:864)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
>
> at
> org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1488)
> at
> org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1450)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:950)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:883)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:866)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:527)
>
> at
> org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:499)
>
> at
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:336)
> at
> org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:248)
> at
> org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:72)
> ... 8 more
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-c-dev-help@ws.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org