Hello,

The following phenomenon occurs even though I use Apache-SOAP 2.2 rc 3.
Whenever I call a invoke(), must I regenerate Call object ? 

Please teach it.

Thanks,
Yutaka

Yutaka Kurei wrote:
> 
> Hello,
> 
> When I used Apache-SOAP 2.1 Attachment function, the following phenomenon occurred.
> 
> I made Servlet as SOAP client, and transmitted a file to SOAP server.
> On the side of the client, I did the followings with the same thread:
> 
>  * When practicing it, I used one Call object instance.
>  * I repeated a transmission of a file several times.
> 
> Then, every time I transmit it, on HTTP message that is transmitted to a server,
> the all files that I transmitted until that time are included in it as an attached 
>file.
> 
> I want to know whether this is a specification of Apache-SOAP or not.
> 
> Of course, if using a new Call object instance every time I transmit it,
> a previous phenomenon doesn't occur.
> 
> Regards,
> 
> Yutaka
> 
> 
>=========================================================================================
> Portion of a program on the side of the client :
> 
>=========================================================================================
> .....
> 
> Vector params = new Vector();
> params.addElement(new Parameter("file", String.class, "C:/" + fileName, null));
> DataSource ds = new ByteArrayDataSource(new File(fileName), null);
> DataHandler dh = new DataHandler(ds);
> params.addElement(new Parameter("dh", javax.activation.DataHandler.class, dh, null));
> 
> Call call = new Call();
> Call.setTargetObjectURI("urn:SoapFileTest");
> call.setMethodName("sendFile");
> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> call.setParams(params);
> 
> for(int i=0; i < counter; i++)
> {
>     resp = call.invoke(new URL(param0), "");
> }
> .....
> 
> 
>=========================================================================================
> [Content of  HTTP messages :]
> 
>=========================================================================================
> 
> ### 1'st call.invoke() Message ###
> 
> POST /soap/servlet/rpcrouter HTTP/1.0
> Host: xxxxx.xx.xxxxx.xx.xx:nn
> Content-Type: multipart/related; boundary="----=_Part_14_839374241.990079726101"; 
>type="text/xml";
> start="897570209.990079726101.apache-soap.SYSTEM.yyyyyy"
> Content-Length: 993
> SOAPAction: ""
> 
> ------=_Part_14_839374241.990079726101
> Content-Type: text/xml; charset=utf-8
> Content-Transfer-Encoding: 8bit
> Content-ID: <897570209.990079726101.apache-soap.SYSTEM.yyyyyy>
> Content-Length: 521
> 
> <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" 
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body> <ns1:sendFile xmlns:ns1="urn:SoapFileTest"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <file xsi:type="xsd:string">C:/file.txt</file>
> <dh href ="cid:859035041.990079726101.apache-soap.SYSTEM.yyyyyy"/>
> </ns1:sendFile>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> ------=_Part_14_839374241.990079726101
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
> Content-ID: <859035041.990079726101.apache-soap.SYSTEM.yyyyyy>
> Content-Length: 42
> 
> * This is a content of Transfer File *
> 
> ------=_Part_14_839374241.990079726101--
> 
> ### 2'nd call.invoke() Message ###
> 
> POST /soap/servlet/rpcrouter HTTP/1.0
> Host: xxxxx.xx.xxxxx.xx.xx:nn
> Content-Type: multipart/related; boundary="----=_Part_14_839374241.990079726101"; 
>type="text/xml";
> start="2042353057.990079737597.apache-soap.SYSTEM.yyyyyy"
> Content-Length: 1225
> SOAPAction: ""
> 
> ------=_Part_14_839374241.990079726101
> Content-Type: text/xml; charset=utf-8
> Content-Transfer-Encoding: 8bit
> Content-ID: <2042353057.990079737597.apache-soap.SYSTEM.yyyyyy>
> Content-Length: 522
>  <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" 
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:sendFile xmlns:ns1="urn:SoapFileTest" 
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <file xsi:type="xsd:string">C:/file.txt</file>
> <dh href ="cid:1695536545.990079737587.apache-soap.SYSTEM.yyyyyy"/>
> </ns1:sendFile>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> ------=_Part_14_839374241.990079726101
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
> Content-ID: <859035041.990079726101.apache-soap.SYSTEM.yyyyyy>
> Content-Length: 42
> 
> * This is a content of Transfer File *
> 
> ------=_Part_14_839374241.990079726101
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
> Content-ID: <1695536545.990079737587.apache-soap.SYSTEM.yyyyyy>
> Content-Length: 42
> 
> * This is a content of Transfer File *
> 
> ------=_Part_14_839374241.990079726101--
> 
> ### 3'rd call.invoke() Message ###
> 
> POST /soap/servlet/rpcrouter HTTP/1.0
> Host: xxxxx.xx.xxxxx.xx.xx:nn
> Content-Type: multipart/related; boundary="----=_Part_14_839374241.990079726101"; 
>type="text/xml";
> start="-1464347231.990079737828.apache-soap.SYSTEM.yyyyyy"
> Content-Length: 1458
> SOAPAction: ""
> 
> ------=_Part_14_839374241.990079726101
> Content-Type: text/xml; charset=utf-8
> Content-Transfer-Encoding: 8bit
> Content-ID: <-1464347231.990079737828.apache-soap.SYSTEM.yyyyyy>
> Content-Length: 523
>  <?xml version='1.0' encoding='UTF-8'?>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" 
>xmlns:xsd="http://www.w3.org/1999/XMLSchema">
> <SOAP-ENV:Body>
> <ns1:sendFile xmlns:ns1="urn:SoapFileTest" 
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <file xsi:type="xsd:string">C:/file.txt</file>
> <dh href ="cid:-1800415839.990079737828.apache-soap.SYSTEM.yyyyyy"/>
> </ns1:sendFile>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
> 
> ------=_Part_14_839374241.990079726101
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
> Content-ID: <859035041.990079726101.apache-soap.SYSTEM.yyyyyy>
> Content-Length: 42
> 
> * This is a content of Transfer File *
> 
> ------=_Part_14_839374241.990079726101
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
> Content-ID: <1695536545.990079737587.apache-soap.SYSTEM.yyyyyy>
> Content-Length: 42
> 
> * This is a content of Transfer File *
> 
> ------=_Part_14_839374241.990079726101
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
> Content-ID: <-1800415839.990079737828.apache-soap.SYSTEM.yyyyyy>
> Content-Length: 42
> 
> * This is a content of Transfer File *
> 
> ------=_Part_14_839374241.990079726101--
> 
> --
> *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
> Yutaka Kurei e-mail:[EMAIL PROTECTED]
> *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

-- 
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
 Yutaka Kurei e-mail:[EMAIL PROTECTED]
*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*

Reply via email to