axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From S?bastien Tardif (JIRA) <axis-...@ws.apache.org>
Subject [jira] Commented: (AXIS-1619) Wsdl2Java do not respect MIME type for "wrapped" document/literal inout parameters.
Date Fri, 12 Nov 2004 23:22:25 GMT
     [ http://nagoya.apache.org/jira/browse/AXIS-1619?page=comments#action_55420 ]
     
Sébastien Tardif commented on AXIS-1619:
----------------------------------------

Here the patch on latest version of CVS Nov 12, 2004:
Index: SymbolTable.java
===================================================================
RCS file: /home/cvspublic/ws-axis/java/src/org/apache/axis/wsdl/symbolTable/SymbolTable.java,v
retrieving revision 1.109
diff -r1.109 SymbolTable.java
1877c1877,1880
<
---
>             if ( p.getMIMEInfo() == null )
>             {
>                 p.setMIMEInfo(outParam.getMIMEInfo());
>             }
1879a1883
>


Before the patch:
public com.docharbor.webservices.DocumentResponse getDocumentAsAttachment(com.docharbor.webservices.Credential
credential, 

com.docharbor.webservices.Users users, com.docharbor.webservices.DocumentRequest documentRequest,
javax.xml.rpc.holders.ByteArrayHolder document) 

throws java.rmi.RemoteException;

After the patch:
public com.docharbor.webservices.DocumentResponse getDocumentAsAttachment(com.docharbor.webservices.Credential
credential, 

com.docharbor.webservices.Users users, com.docharbor.webservices.DocumentRequest documentRequest,
org.apache.axis.holders.OctetStreamHolder 

document) throws java.rmi.RemoteException;

> Wsdl2Java do not respect MIME type  for "wrapped" document/literal inout parameters.
> ------------------------------------------------------------------------------------
>
>          Key: AXIS-1619
>          URL: http://nagoya.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, docHarbor.xml
>
> 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://nagoya.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


Mime
View raw message