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 "Per Thomas Jahr (JIRA)" <ax...@ws.apache.org> on 2004/12/15 11:14:04 UTC
[jira] Commented: (AXIS-1430) Last received attachment sent with next request
[ http://nagoya.apache.org/jira/browse/AXIS-1430?page=comments#action_56699 ]
Per Thomas Jahr commented on AXIS-1430:
---------------------------------------
I think this issues should be reopened. Is there any reason for why one should call clearAttachments() after invoking a ws-method that uses attachments?
What about doing a clearAttachments call for each new request? I think this would be a more correct model.
> Last received attachment sent with next request
> -----------------------------------------------
>
> Key: AXIS-1430
> URL: http://nagoya.apache.org/jira/browse/AXIS-1430
> Project: Axis
> Type: Bug
> Versions: 1.2 Beta
> Reporter: Eoin Curran
>
> I have a client and server generated from wsdl. There are two methods, like this:
> <operation name="methodA">
> <soap:operation soapAction="methodA"/>
> <input>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> use="encoded" namespace="..."/>
> </input>
> <output>
> <mime:multipartRelated>
> <mime:part>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> use="encoded" namespace="..."
> parts="message"
> />
> </mime:part>
> <mime:part>
> <mime:content part="attach" type="*/*"/>
> </mime:part>
> </mime:multipartRelated>
> </output>
> <fault name="fault">
> <soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> use="encoded" namespace="..." name="fault"/>
> </fault>
> </operation>
> <operation name="methodB">
> <soap:operation soapAction="methodB"/>
> <input>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> use="encoded" namespace="..."/>
> </input>
> <output>
> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> use="encoded" namespace="..."/>
> </output>
> <fault name="fault">
> <soap:fault encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> use="encoded" namespace="..." name="fault"/>
> </fault>
> </operation>
> I call methodA, get an attachment, then call methodB. However, the client incorrectly creates a multipart request for methodB, with the attachment received from methodA attached. This then fails as the server expects a simple text/xml request for methodB.
> From what I can see, in the generated code for the stub,
> setAttachments(_call);
> adds the attachment to the request, which happen to be the same attachments received from the last response.
--
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