From: kristof c. <kri...@ns...> - 2008-09-24 06:58:42
|
Hi, I have a question about calling a soap service with mime attachments: This is my code: my $ent = build MIME::Entity Encoding => "base64", Path => "/test.jpg", Filename => "test.jpg", Disposition => "inline"; @parts = ($ent); $soap_response = SOAP::Lite -> proxy("http://192.168.168.163:8887/cgi-bin/WebObjects/Vit2Print.woa/SAAJ/Vit2PrintFileTransmit ") ->parts(\@parts) -> uploadImage("aa","bb"); }; normally we expect the message to be : MIME-Version: 1.0 Content-Type: Multipart/Related; boundary=MIME_boundary; type=text/xml; start="<cla...@cl...>" Content-Description: This is the optional message description. --MIME_boundary Content-Type: text/xml; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-ID: <cla...@cl...> <?xml version='1.0' ?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> .. <theSignedForm href="cid:cla...@cl..."/> .. </SOAP-ENV:Body> </SOAP-ENV:Envelope> --MIME_boundary Content-Type: image/tiff Content-Transfer-Encoding: binary Content-ID: <cla...@cl...> ...binary TIFF image... --MIME_boundary-- But with soap::lite we lose the multipart/related header. (indicated in red) Can we do something about that ? This is a multi-part message in MIME format... ------------=_1222162390-89317-0 Content-Type: text/xml Content-Disposition: inline Content-Location: /main_envelope Content-ID: <main_envelope> <?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " xmlns:soapenc= "http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema " soap:encodingStyle="http://schem as.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/ "><soap:Body><uploadImage><c-gensym3 xsi:type="xsd:string">aa</c-gensym3><c-gensym5 xsi:type="xsd:string">bb</c-gensym5></uploadImage></soap:Body></ soap:Envelope> ------------=_1222162390-89317-0 Content-Type: image/gif; name="test.jpg" Content-Disposition: attachment; filename="test.jpg" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-Mailer: MIME-tools 5.420 (Entity 5.420) AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA ______________________________________________________________________ Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium Looking for Web-to-Print Solutions? Visit our website : http://www.vit2print.com This e-mail, and any attachments thereto, is intended only for use by the addressee(s) named herein and may contain legally privileged and/or confidential information and/or information protected by intellectual property rights. If you are not the intended recipient, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail and/or any file transmitted with it, is strictly prohibited and may be unlawful. If you have received this e-mail by mistake, please immediately notify the sender and permanently delete the original as well as any copy of any e-mail and any printout thereof. We may monitor e-mail to and from our network. NSS nv Tieltstraat 167 8740 Pittem Belgium |