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

John Hawkins updated AXISCPP-610:
---------------------------------

    Component: WSDL processing - Doc
                   (was: WSDL processing - RPC)

> No parts in WSDL crashing the wsdlws generator
> ----------------------------------------------
>
>          Key: AXISCPP-610
>          URL: http://issues.apache.org/jira/browse/AXISCPP-610
>      Project: Axis-C++
>         Type: Bug
>   Components: WSDL processing - Doc
>     Versions: 1.5 Beta
>  Environment: Win32
>     Reporter: Carsten Blecken
>     Priority: Minor

>
> The attached WSDL gives an error
>      [java] WARNING: Unable to find required classes 
> (javax.activation.DataHandl
> er and javax.mail.internet.MimeMultipart). Attachment support is disabled.
>      [java] java.util.NoSuchElementException
>      [java]     at java.util.HashMap$HashIterator.nextEntry(HashMap.java:785)
>      [java]     at java.util.HashMap$ValueIterator.next(HashMap.java:812)
>      [java]     at 
> org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.addDocumentStyleInputMes
> sageToMethodInfo(Unknown Source)
>      [java]     at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.setMethodInfo(Unknown 
> So
> urce)
>      [java] Code generation failed. Please see errors above.
>      [java]     at 
> org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(Unknown S
> ource)
>      [java]     at 
> org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.generateWrappers(Unknown
>  Source)
>      [java]     at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(Unknown Source)
> due to the lack of a part in the input message.
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="urn:somecompany/platform/v1_0" 
> xmlns="http://schemas.xmlsoap.org/wsdl/"; 
> xmlns:apachesoap="http://xml.apache.org/xml-soap"; 
> xmlns:impl="urn:somecompany/platform/v1_0" 
> xmlns:intf="urn:somecompany/platform/v1_0" 
> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; 
> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; 
> xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"; 
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
>  <wsdl:types>
>   <schema targetNamespace="urn:somecompany/platform/v1_0" 
> xmlns="http://www.w3.org/2001/XMLSchema";>
>   
>    <xsd:complexType name="UserTokenType">     
>       <xsd:sequence>
>                  <element name="Token" type="xsd:string"/>
>       </xsd:sequence>
>    </xsd:complexType>
>    <element name="UserTokenReturn" type="impl:UserTokenType"/>
>   
>   </schema>
>   
>  </wsdl:types>
>    <wsdl:message name="getUserTokenRequest">
>    </wsdl:message>
>    <wsdl:message name="getUserTokenResponse">
>       <wsdl:part element="impl:UserTokenReturn" name="getUserTokenReturn"/>
>    </wsdl:message>
>    <wsdl:portType name="MyAuthentication">
>       <wsdl:operation name="getUserToken">
>          <wsdl:input message="impl:getUserTokenRequest" 
> name="getUserTokenRequest"/>
>          <wsdl:output message="impl:getUserTokenResponse" 
> name="getUserTokenResponse"/>
>       </wsdl:operation>
>    </wsdl:portType>
>    <wsdl:binding name="MyAuthenticationSoapBinding" 
> type="impl:MyAuthentication">
>       <wsdlsoap:binding style="document" 
> transport="http://schemas.xmlsoap.org/soap/http"/>
>       <wsdl:operation name="getUserToken">
>          <wsdlsoap:operation soapAction=""/>
>          <wsdl:input name="getUserTokenRequest">
>             <wsdlsoap:body namespace="urn:somecompany/platform/v1_0" 
> use="literal"/>
>          </wsdl:input>
>          <wsdl:output name="getUserTokenResponse">
>             <wsdlsoap:body namespace="urn:somecompany/platform/v1_0" 
> use="literal"/>
>          </wsdl:output>
>       </wsdl:operation>
>    </wsdl:binding>
>    <wsdl:service name="MyAuthenticationService">
>       <wsdl:port binding="impl:MyAuthenticationSoapBinding" 
> name="MyAuthentication">
>          <wsdlsoap:address 
> location="http://localhost:8888/myapp/services/MyAuthentication?wsdl"/>
>       </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>
> Seems like in WSDL2Ws.addDocumentStyleInputMessageToMethodInfo a check for
> existence (hasNext()) has been missed.
>         paramlist = op.getInput().getMessage().getParts().values().iterator();
>         Part part = (Part) paramlist.next();    <-- this can be null
>         QName minfoqname;
>         element = symbolTable.getElement(part.getElementName());

-- 
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

Reply via email to