axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anne Thomas Manes" <atma...@gmail.com>
Subject Re: [AXIS2-1.0] WSDL2Java: NullPointerException
Date Thu, 27 Jul 2006 16:44:18 GMT
You have a typo in the binding:

      <output name="requestForMembershipoResponse">
                                                              ---
Also, you must remove all the namespace attributes in your <soap:body>
definitions.
they should simply be:

      <soap:body use="literal"/>

You use the namespace attribute only when using "rpc" style.

Regards,
Anne


On 7/27/06, Nirmit Desai <nirdesai@us.ibm.com> wrote:
>
> Hi,
>
> I am trying to generate code from the WSDL  below,
> It throws the following exception:
>
> Exception in thread "main"
> org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:94)
>         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:32)
>         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:21)
> Caused by: org.apache.axis2.AxisFault: null; nested exception is:
>         java.lang.NullPointerException
>         at
> org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:243)
>         at
> org.apache.axis2.wsdl.codegen.CodeGenerationEngine.<init>(CodeGenerationEngine.java:87)
>         ... 2 more
> Caused by: java.lang.NullPointerException
>         at
> org.apache.axis2.description.WSDL2AxisServiceBuilder.createSchemaForPorttype(WSDL2AxisServiceBuilder.java:595)
>         at
> org.apache.axis2.description.WSDL2AxisServiceBuilder.generateWrapperSchema(WSDL2AxisServiceBuilder.java:554)
>         at
> org.apache.axis2.description.WSDL2AxisServiceBuilder.populateService(WSDL2AxisServiceBuilder.java:228)
>         ... 3 more:
>
> ===============================================
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="ClubInfo"
>     targetNamespace="http://sobe.ibm.com/ClubInfo"
>     xmlns="http://schemas.xmlsoap.org/wsdl/"
>     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>     xmlns:tns="http://sobe.ibm.com/ClubInfo"
>     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>     xmlns:xsd1="http://sobe.ibm.com/xsd"
>     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
>     <types>
>         <schema targetNamespace="http://sobe.ibm.com/xsd"
>             xmlns="http://www.w3.org/2001/XMLSchema"
>             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>             elementFormDefault="qualified">
>             <complexType name="Void"/>
>             <complexType name="ContextStruct">
>                   <sequence>
>                         <element name="memberID" type="xsd:string"/>
>                         <element name="clubRegistrationEPR" type=
> "xsd:string"/>
>                   </sequence>
>             </complexType>
>             <element name="getMembershipInfoParam" type="xsd1:Void"/>
>             <element name="getMembershipInfoReturn" type="xsd:string"/>
>             <element name="requestForMembershipParam" type="xsd:string"/>
>             <element name="requestForMembershipReturn" type=
> "xsd1:ContextStruct"/>
>         </schema>
>     </types>
>     <message name="getMembershipInfo">
>         <part element="xsd1:getMembershipInfoParam" name="in"/>
>     </message>
>     <message name="getMembershipInfoResponse">
>         <part element="xsd1:getMembershipInfoReturn" name="out"/>
>     </message>
>     <message name="requestForMembership">
>         <part element="xsd1:requestForMembershipParam" name="in"/>
>     </message>
>     <message name="requestForMembershipResponse">
>         <part element="xsd1:requestForMembershipReturn" name="out"/>
>     </message>
>     <portType name="ClubInfoPortType">
>         <operation name="getMembershipInfo">
>             <input message="tns:getMembershipInfo" name="getMembershipInfo"
> />
>             <output message="tns:getMembershipInfoResponse" name=
> "getMembershipInfoResponse"/>
>         </operation>
>         <operation name="requestForMembership">
>             <input message="tns:requestForMembership" name=
> "requestForMembership"/>
>             <output message="tns:requestForMembershipResponse" name=
> "requestForMembershipResponse"/>
>         </operation>
>     </portType>
>     <binding name="ClubInfoPortBinding"
>         type="tns:ClubInfoPortType">
>         <soap:binding style="document" transport=
> "http://schemas.xmlsoap.org/soap/http"/>
>         <operation name="getMembershipInfo">
>             <soap:operation soapAction="getMembershipInfo" style="document"
> />
>             <input name="getMembershipInfo">
>                 <soap:body namespace="http://sobe.ibm.com/xsd" use=
> "literal"/>
>             </input>
>             <output name="getMembershipInfoResponse">
>                 <soap:body namespace="http://sobe.ibm.com/xsd" use=
> "literal"/>
>             </output>
>         </operation>
>         <operation name="requestForMembership">
>             <soap:operation soapAction="requestForMembership" style=
> "document"/>
>             <input name="requestForMembership">
>                 <soap:body namespace="http://sobe.ibm.com/xsd" use=
> "literal"/>
>             </input>
>             <output name="requestForMembershipoResponse">
>                 <soap:body namespace="http://sobe.ibm.com/xsd" use=
> "literal"/>
>             </output>
>         </operation>
>     </binding>
>     <service name="ClubInfo">
>         <port binding="tns:ClubInfoPortBinding"
>             name="ClubInfoPort">
>             <soap:address
>                 location=
> "http://smokey.watson.ibm.com:8080/axis2/services/ClubInfo"/>
>         </port>
>     </service>
> </definitions>
> ====================================================================
>
>
> any clues?
>
> Thanks,
>
> -Nirmit
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

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


Mime
View raw message