Hi Jane,

The generated WSDL is clearly invalid. I'll have a look and get back to you.

Thanks,
Keith.

On Dec 28, 2007 6:54 PM, Jane Allen <[EMAIL PROTECTED]> wrote:

> Yes, the WSDL file was generated with axis2's java2WSDL.bat script.
> Below is the WSDL file. Below that is the original java class that the
> WSDL was created from.
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl2:description xmlns:wsdl2="http://www.w3.org/ns/wsdl"; xmlns="
> http://www.w3.org/ns/wsdl"; xmlns:ns1="http://org.apache.axis2/xsd";
> xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; xmlns:wsoap="
> http://www.w3.org/ns/wsdl/soap"; xmlns:wsdlx="
> http://www.w3.org/ns/wsdl-extensions"; xmlns:xs="
> http://www.w3.org/2001/XMLSchema"; xmlns:whttp="
> http://www.w3.org/ns/wsdl/http"; xmlns:axis2ns1="http://ws.apache.org/axis2";
> targetNamespace="http://ws.apache.org/axis2";>
>     <wsdl2:types/>
>     <wsdl2:interface name="ServiceInterface">
>         <wsdl2:operation name="doInOnly" pattern="
> http://www.w3.org/ns/wsdl/in-only";>
>             <wsdl2:input element="#none" wsaw:Action="urn:doInOnly"/>
>         </wsdl2:operation>
>     </wsdl2:interface>
>     <wsdl2:binding name="SampleServiceSOAP11Binding"
> interface="null:ServiceInterface" type="http://www.w3.org/ns/wsdl/soap";
> wsoap:version="1.1">
>         <wsdl2:operation ref="null:doInOnly" wsoap:action="urn:doInOnly"/>
>     </wsdl2:binding>
>     <wsdl2:binding name="SampleServiceSOAP12Binding"
> interface="null:ServiceInterface" type="http://www.w3.org/ns/wsdl/soap";
> wsoap:version="1.2">
>         <wsdl2:operation ref="null:doInOnly" wsoap:action="urn:doInOnly"/>
>     </wsdl2:binding>
>     <wsdl2:binding name="SampleServiceHttpBinding"
> interface="null:ServiceInterface" type="http://www.w3.org/ns/wsdl/http";>
>         <wsdl2:operation ref="null:doInOnly"
> whttp:location="SampleService/doInOnly"/>
>     </wsdl2:binding>
>     <wsdl2:service name="SampleService" interface="null:ServiceInterface">
>         <wsdl2:endpoint name="SOAP11Endpoint"
> binding="null:SampleServiceSOAP11Binding" address="
> http://localhost:8080/axis2/services/SampleService";>
>             <wsdl2:documentation>This endpoint exposes a SOAP 11 binding
> over a HTTP</wsdl2:documentation>
>         </wsdl2:endpoint>
>         <wsdl2:endpoint name="SOAP12Endpoint"
> binding="null:SampleServiceSOAP12Binding" address="
> http://localhost:8080/axis2/services/SampleService";>
>             <wsdl2:documentation>This endpoint exposes a SOAP 12 binding
> over a HTTP</wsdl2:documentation>
>         </wsdl2:endpoint>
>         <wsdl2:endpoint name="HTTPEndpoint"
> binding="null:SampleServiceHttpBinding" address="
> http://localhost:8080/axis2/services/SampleService";>
>             <wsdl2:documentation>This endpoint exposes a HTTP binding over
> a HTTP</wsdl2:documentation>
>         </wsdl2:endpoint>
>     </wsdl2:service>
> </wsdl2:description>
>
> *
>
> package
> * org.apache.axis2.axis2userguide;
>
> *
>
>
>
> public
> * *class* SampleService {
>
> *public* *void* doInOnly(){
>
> *  return*;
>
> }
>
>
> ----- Original Message ----
> From: keith chapman <[EMAIL PROTECTED]>
> To: axis-user@ws.apache.org
> Sent: Thursday, December 27, 2007 9:14:27 PM
> Subject: Re: I cannot get the axis2 WSDL2java utility to generate code for
> a WSDL 2.0 wsdl file.
>
> 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.0file 
> obtained using Java2WSDL?
>
> Thanks,
> Keith.
>
> On Dec 28, 2007 5:06 AM, Jane Allen <[EMAIL PROTECTED]> 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/
>
>
> ------------------------------
> 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/

Reply via email to