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 "S?bastien Tardif (JIRA)" <ax...@ws.apache.org> on 2004/10/25 19:50:46 UTC

[jira] Updated: (AXIS-1619) Wsdl2Java do not respect MIME type for "wrapped" document/literal inout parameters.

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

Sébastien Tardif updated AXIS-1619:
-----------------------------------

    Attachment: docHarbor.wsdl

> Wsdl2Java do not respect MIME type  for "wrapped" document/literal inout parameters.
> ------------------------------------------------------------------------------------
>
>          Key: AXIS-1619
>          URL: http://issues.apache.org/jira/browse/AXIS-1619
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC1
>  Environment: Axis/CVS 9/23/2004
>     Reporter: Sébastien Tardif
>  Attachments: docHarbor.wsdl
>
> Defect happen when WSDL has those:
> - wrapped document/literal style
> - use Mime type for implementing Soap with Attachment (SwA) 
> - has operation that need more that one output parameters
> - you want the operation having a "out" parameter like String in "String myOperation(int myInt, DataHandler mySwAttachment)
> By default if you don’t do anything extra in the WSDL, the generated Java code will will look like this: “void myOperation(int myInt, StringHolder myString, DataHandler mySwAttachment)”
> So to have the return type as String you have to specify in the WSDL that mySwAttachment is an inout parameter. This can be done by including mySwAttachment in both the input and output definition. 
> When using RPC/Literal style this is done in the message section like:
> <wsdl:message name="input">
> 		<wsdl:part name="myInt" type=”xsd:int"/>
> 		<wsdl:part name="mySwAttachment" type="xsd:base64Binary"/>
> </wsdl:message>
> <wsdl:message name="output">
> 		<wsdl:part name="myString " type=”xsd:string"/>
> 		<wsdl:part name="mySwAttachment" type="xsd:base64Binary"/>
> </wsdl:message>
> As you can see mySwAttachment is duplicated in the input and output. So the Java method will be generated like we want:
> "String myOperation(int myInt, DataHandler mySwAttachment)”
> But if you use wrapped document/literal style you must only have one part by message element so you need to move the parts to a XML Schema complex type.
> But when you do that and you duplicate mySwAttachment in the schema/type for the list of input and output, you got this when generate the Java method:
>  
> “String myOperation(int myInt, ByteArrayHolder mySwAttachment)”
> Which mean that Axis recognized the inout parameter but use the wrong type. The type was supposed to be DataHandlerHolder instead of ByteArrayHolder.
> I have attached a real world WSDL, the problem is with operation “getDocumentAsAttachment”

-- 
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
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira