You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jane Allen <ja...@yahoo.com> on 2007/12/28 00:36:26 UTC

I cannot get the axis2 WSDL2java utility to generate code for a WSDL 2.0 wsdl file.

I cannot get the axis2 WSDL2java utility to generate java code when the input is a WSDL version 2.0 wsdl file.
It does generate code for the same java POJO if I use a WSDL 1.3 wsdl file.
I used the axis2 java2WSDL utility to generate the wsdl files.

I could use some help.

Here's the error output:

C:>"C:\Program Files\axis2-1.3\bin\wsdl2java.bat" -uri "C:\Projects\Axis2SampleService\SampleService.wsdl" -p org.apache.axis2.axis2userguide -o "C:\Projects\axis2_service_genned_from_wsdl" -d adb -s -wv 2 -ss -sd -ssi
Using AXIS2_HOME:   C:\Program Files\axis2-1.3
Using JAVA_HOME:    C:\Program Files\Java\jdk1.6.0_02
Woden[Error],0:0,WSDL505,Could not create a QName from the string "null:ServiceInterface" in element "{http://www.w3.org/ns/wsdl}binding".
Woden[Error],0:0,WSDL505,Could not create a QName from the string "null:doInOnly" in element "{http://www.w3.org/ns/wsdl}
operation".
Woden[Error],0:0,WSDL505,Could not create a QName from the string "null:ServiceInterface" in element "{http://www.w3.org/ns/wsdl}binding".
Woden[Error],0:0,WSDL505,Could not create a QName from the string "null:doInOnly" in element "{http://www.w3.org/ns/wsdl}
operation".
Woden[Error],0:0,WSDL505,Could not create a QName from the string "null:ServiceInterface" in element "{http://www.w3.org/ns/wsdl}binding".
Woden[Error],0:0,WSDL505,Could not create a QName from the string "null:doInOnly" in element "{http://www.w3.org/ns/wsdl}
operation".
Woden[Error],0:0,WSDL505,Could not create a QName from the string "null:ServiceInterface" in element "{http://www.w3.org/ns/wsdl}service".
Woden[Error],0:0,WSDL505,Could not create a QName from the string "null:SampleServiceSOAP11Binding" in element "{http://www.w3.org/ns/wsdl}endpoint".
Woden[Error],0:0,WSDL505,Could not create a QName from the string "null:SampleServiceSOAP12Binding" in element "{http://www.w3.org/ns/wsdl}endpoint".
Woden[Error],0:0,WSDL505,Could not create a QName from the string "null:SampleServiceHttpBinding" in element "{http://www.w3.org/ns/wsdl}endpoint".
Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:147)
        at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
        at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
Caused by: org.apache.axis2.AxisFault
        at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
        at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateService(WSDL20ToAxisServiceBuilder.java:236)
        at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:101)
        ... 2 more
Caused by: java.lang.NullPointerException
        at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processService(WSDL20ToAxisServiceBuilder.java:305)
        at org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateService(WSDL20ToAxisServiceBuilder.java:233)
        ... 3 more


      ____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Re: I cannot get the axis2 WSDL2java utility to generate code for a WSDL 2.0 wsdl file.

Posted by keith chapman <ke...@gmail.com>.
Hi Jane,

Could you post your WSDL 2.0 file please. It does look like the WSDL has
some errors and hence the failure in code genaration. Was the WSDL 2.0 file
obtained using Java2WSDL?

Thanks,
Keith.

On Dec 28, 2007 5:06 AM, Jane Allen <ja...@yahoo.com> wrote:

> I cannot get the axis2 WSDL2java utility to generate java code when the
> input is a WSDL version 2.0 wsdl file.
> It does generate code for the same java POJO if I use a WSDL 1.3 wsdl
> file.
> I used the axis2 java2WSDL utility to generate the wsdl files.
>
> I could use some help.
>
> Here's the error output:
>
> C:>"C:\Program Files\axis2-1.3\bin\wsdl2java.bat" -uri
> "C:\Projects\Axis2SampleService\SampleService.wsdl" -p
> org.apache.axis2.axis2userguide -o
> "C:\Projects\axis2_service_genned_from_wsdl" -d adb -s -wv 2 -ss -sd -ssi
> Using AXIS2_HOME:   C:\Program Files\axis2-1.3
> Using JAVA_HOME:    C:\Program Files\Java\jdk1.6.0_02
> Woden[Error],0:0,WSDL505,Could not create a QName from the string
> "null:ServiceInterface" in element "{http://www.w3.org/ns/wsdl}binding<http://www.w3.org/ns/wsdl%7Dbinding>
> ".
> Woden[Error],0:0,WSDL505,Could not create a QName from the string
> "null:doInOnly" in element "{http://www.w3.org/ns/wsdl}
> operation".
> Woden[Error],0:0,WSDL505,Could not create a QName from the string
> "null:ServiceInterface" in element "{http://www.w3.org/ns/wsdl}binding<http://www.w3.org/ns/wsdl%7Dbinding>
> ".
> Woden[Error],0:0,WSDL505,Could not create a QName from the string
> "null:doInOnly" in element "{http://www.w3.org/ns/wsdl}
> operation".
> Woden[Error],0:0,WSDL505,Could not create a QName from the string
> "null:ServiceInterface" in element "{http://www.w3.org/ns/wsdl}binding<http://www.w3.org/ns/wsdl%7Dbinding>
> ".
> Woden[Error],0:0,WSDL505,Could not create a QName from the string
> "null:doInOnly" in element "{http://www.w3.org/ns/wsdl}
> operation".
> Woden[Error],0:0,WSDL505,Could not create a QName from the string
> "null:ServiceInterface" in element "{http://www.w3.org/ns/wsdl}service<http://www.w3.org/ns/wsdl%7Dservice>
> ".
> Woden[Error],0:0,WSDL505,Could not create a QName from the string
> "null:SampleServiceSOAP11Binding" in element "{
> http://www.w3.org/ns/wsdl}endpoint <http://www.w3.org/ns/wsdl%7Dendpoint>
> ".
> Woden[Error],0:0,WSDL505,Could not create a QName from the string
> "null:SampleServiceSOAP12Binding" in element "{
> http://www.w3.org/ns/wsdl}endpoint <http://www.w3.org/ns/wsdl%7Dendpoint>
> ".
> Woden[Error],0:0,WSDL505,Could not create a QName from the string
> "null:SampleServiceHttpBinding" in element "{
> http://www.w3.org/ns/wsdl}endpoint <http://www.w3.org/ns/wsdl%7Dendpoint>
> ".
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(
> CodeGenerationEngine.java:147)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
> Caused by: org.apache.axis2.AxisFault
>         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>         at
> org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateService(
> WSDL20ToAxisServiceBuilder.java:236)
>         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(
> CodeGenerationEngine.java:101)
>         ... 2 more
> Caused by: java.lang.NullPointerException
>         at
> org.apache.axis2.description.WSDL20ToAxisServiceBuilder.processService(
> WSDL20ToAxisServiceBuilder.java:305)
>         at
> org.apache.axis2.description.WSDL20ToAxisServiceBuilder.populateService(
> WSDL20ToAxisServiceBuilder.java:233)
>         ... 3 more
>
> ------------------------------
> Never miss a thing. Make Yahoo your homepage.<http://us.rd.yahoo.com/evt=51438/*http://www.yahoo.com/r/hs>
>



-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/