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/07/12 16:41:40 UTC

[jira] Commented: (AXIS-1675) WSDL2Java doesn’t use return value when two out parameters exist.

    [ http://issues.apache.org/jira/browse/AXIS-1675?page=comments#action_12315587 ] 

Davanum Srinivas commented on AXIS-1675:
----------------------------------------

Hmm...what does JAXRPC 1.2 say? Axis1.X does not implement JAXRPC 2.0. and we're getting beat up every time we change codegen.

-- dims

> WSDL2Java doesn’t use return value when two out parameters exist.
> -----------------------------------------------------------------
>
>          Key: AXIS-1675
>          URL: http://issues.apache.org/jira/browse/AXIS-1675
>      Project: Apache Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC2
>  Environment: cvs 11/19/2004
>     Reporter: Sébastien Tardif
>     Assignee: Davanum Srinivas
>  Attachments: diff.txt, docHarbor.wsdl
>
> Title: WSDL2Java doesn’t use return value when two out parameters exist.
> From my WSDL I get this:
> void getDocument(Credential credential, Users users, DocumentRequest documentRequest, DocumentResponseHolder _return, ByteArrayHolder document) throws RemoteException;
> void getDocumentAsAttachment(Credential credential, Users users, DocumentRequest documentRequest, OctetStreamHolder document, holders.DocumentResponseHolder _return) throws RemoteException;
> As you can see operation [getDocument] has two out parameters: [document] and [return]. 
> Operation [getDocumentAsAttachment] has also two out parameters: [document] and [return].
> The result should be:
> DocumentResponse getDocument(Credential credential, Users users, DocumentRequest documentRequest, ByteArrayHolder document) throws RemoteException;
>     
> DocumentResponse getDocumentAsAttachment(Credential credential, Users users, DocumentRequest documentRequest, OctetStreamHolder document) throws RemoteException;
> The code in Axis try sometime to take one of the out parameters and take it as the return type but in my case it doesn’t trigger.
> To have a long time fix I suggest to just implement right now the JAX-RPC 2.0 way which is to map to the return value of the signature the element using name: [return] as shown below:
> From section 2.3.2 Parameter Order and Return Type of JAX-RPC 2.0 specification:
> Wrapper style mapping If there is a single out wrapper child then it forms the method return type, 
> if there is an out wrapper child with a local name of “return” then it forms the method return 
> type, otherwise the return type is void. 
> From section 3.8.2 Method and Parameters of JAX-RPC 2.0 specification:
> <xsd:element name="getPriceResponse" type="tns:getPriceResponseType"/>
> <xsd:complexType name="getPriceResponseType">
>  <xsd:sequence>
>   <xsd:element name="return" type="xsd:float"/>
>  </xsd:sequence>
> </xsd:complexType>

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