You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org> on 2005/06/10 16:56:46 UTC

[jira] Assigned: (AXIS-1992) WSDL2Java causes NullPointerException

     [ http://issues.apache.org/jira/browse/AXIS-1992?page=all ]

Davanum Srinivas reassigned AXIS-1992:
--------------------------------------

    Assign To: Venkat Reddy

> WSDL2Java causes NullPointerException
> -------------------------------------
>
>          Key: AXIS-1992
>          URL: http://issues.apache.org/jira/browse/AXIS-1992
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2
>     Reporter: Ryan Bell
>     Assignee: Venkat Reddy

>
> The following doc/literal w/ attachments wsdl causes this NullPointerException when using WSDL2Java on axis 1.2.  
> java.lang.NullPointerException
> 	at org.apache.axis.wsdl.toJava.Utils.getNewQName(Utils.java:928)
> 	at org.apache.axis.wsdl.toJava.JavaStubWriter.writeOperation(JavaStubWriter.java:1112)
> 	at org.apache.axis.wsdl.toJava.JavaStubWriter.writeFileBody(JavaStubWriter.java:464)
> 	at org.apache.axis.wsdl.toJava.JavaWriter.generate(JavaWriter.java:130)
> 	at org.apache.axis.wsdl.toJava.JavaBindingWriter.generate(JavaBindingWriter.java:148)
> 	at org.apache.axis.wsdl.toJava.JavaGeneratorFactory$Writers.generate(JavaGeneratorFactory.java:421)
> 	at org.apache.axis.wsdl.gen.Parser.generate(Parser.java:475)
> 	at org.apache.axis.wsdl.gen.Parser.access$000(Parser.java:44)
> 	at org.apache.axis.wsdl.gen.Parser$WSDLRunnable.run(Parser.java:361)
> 	at java.lang.Thread.run(Thread.java:534)
> Strangely enough, if you change the "body" part name and corresponding binding element to "aBody" there is no error.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://localhost/ws/services/Test" 
>   name="Test"
>   xmlns:impl="http://localhost/ws/services/Test" 
>   xmlns:tns1="http://impl.services.ws" 
>   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
>   xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" 
>   xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>  <wsdl:types>
>   <schema elementFormDefault="qualified" targetNamespace="http://impl.services.ws" xmlns="http://www.w3.org/2001/XMLSchema">
>    <element name="sendTest">
>     <complexType>
>      <sequence>
>       <element name="test" type="xsd:string"/>
>      </sequence>
>     </complexType>
>    </element>
>    <complexType name="DocArray">
>      <sequence>
>       <element maxOccurs="unbounded" minOccurs="0" name="xDocs" type="xsd:hexBinary"/>
> 	 </sequence>
>    </complexType>
>    
>    <element name="sendTestResponse">
>     <complexType>
>      <sequence>
>        <element maxOccurs="unbounded" minOccurs="0" name="sendTestReturn" type="xsd:string"/>
>      </sequence>
>     </complexType>
>    </element>
>   </schema>
>  </wsdl:types>
>    <wsdl:message name="sendTestRequest">
>       <wsdl:part element="tns1:sendTest" name="body"/>
>       <wsdl:part type="tns1:DocArray" name="docs"/>
>    </wsdl:message>
>    <wsdl:message name="sendTestResponse">
>       <wsdl:part element="tns1:sendTestResponse" name="parameters"/>
>    </wsdl:message>
>    <wsdl:portType name="Test">
>       <wsdl:operation name="sendTest">
>          <wsdl:input message="impl:sendTestRequest" name="sendTestRequest"/>
>          <wsdl:output message="impl:sendTestResponse" name="sendTestResponse"/>
>       </wsdl:operation>
>    </wsdl:portType>
>    <wsdl:binding name="TestSoapBinding" type="impl:Test">
>       <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>       <wsdl:operation name="sendTest">
>          <wsdlsoap:operation soapAction=""/>
>          <wsdl:input name="sendTestRequest">
>           <mime:multipartRelated>
>             <mime:part>
>               <wsdlsoap:body parts="body" use="literal"/>
>             </mime:part>
>             <mime:part>
>               <mime:content part="docs" type="*/*"/>
>             </mime:part>
>           </mime:multipartRelated>
>          </wsdl:input>
>          <wsdl:output name="sendTestResponse">
>             <wsdlsoap:body use="literal"/>
>          </wsdl:output>
>       </wsdl:operation>
>    </wsdl:binding>
>    <wsdl:service name="TestService">
>       <wsdl:port binding="impl:TestSoapBinding" name="Test">
>          <wsdlsoap:address location="http://localhost/Test"/>
>       </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira