axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jane Allen <janealle...@yahoo.com>
Subject Re: I cannot get the axis2 WSDL2java utility to generate code for a WSDL 2.0 wsdl file.
Date Fri, 28 Dec 2007 16:17:30 GMT
Although I don't understand what the extra declaration does, it fixed the problem.
Thank you for your help.



----- Original Message ----
From: Anne Thomas Manes <atmanes@gmail.com>
To: axis-user@ws.apache.org
Sent: Friday, December 28, 2007 11:04:18 AM
Subject: Re: I cannot get the axis2 WSDL2java utility to generate code for a WSDL 2.0 wsdl
file.

Try adding the following namespace declaration:

        xmlns:null="http://ws.apache.org/axis2"

Anne

On Dec 28, 2007 10:37 AM, Jane Allen <janeallen29@yahoo.com> wrote:
>
> Java2WSDL.bat -cn SampleService -wv 2.0
>
>
> ----- Original Message ----
> From: keith chapman <keithgchapman@gmail.com>
> To: axis-user@ws.apache.org
>
> Sent: Friday, December 28, 2007 10:19:10 AM
> Subject: Re: I cannot get the axis2 WSDL2java utility to generate code for a
> WSDL 2.0 wsdl file.
>
> Hi Jane,
>
> What are the arguments you used during java2WSDL?
>
> Thanks,
> Keith.
>
>
> On Dec 28, 2007 6:54 PM, Jane Allen <janeallen29@yahoo.com > 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>
> >
> >
> >
> > packageorg.apache.axis2.axis2userguide;
> >
> >
> >
> >
> >
> > publicclass SampleService {
> >
> > public void doInOnly(){
> >
> >  return;
> >
> > }
> >
> >
> >
> >
> >
> > ----- Original Message ----
> > From: keith chapman <keithgchapman@gmail.com >
> > 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.0 file
> obtained using Java2WSDL?
> >
> > Thanks,
> > Keith.
> >
> >
> > On Dec 28, 2007 5:06 AM, Jane Allen <janeallen29@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".
> > > 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
> > >
> > > ________________________________
>  Never miss a thing. Make Yahoo your homepage.
> >
> >
> >
> > --
> > Keith Chapman
> > WSO2 Inc.
> > Oxygen for Web Services Developers.
> > http://wso2.org/
> >
> >
> >
> >
> >
> > ________________________________
>  Never miss a thing. Make Yahoo your homepage.
>
>
>
> --
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/
>
>
>  ________________________________
> Never miss a thing. Make Yahoo your homepage.

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


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


Mime
View raw message