Attaching files to SOAP messages

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Attaching files to SOAP messages

Nicewarner Mike

I’m trying very hard to attach a file to a SOAP message using WSF for PHP.

The example in the documentation is very crude, and I’m not able to extrapolate from the example to make it work in my code.

What I get is this WSMessage:

WSMessage::__set_state(array(
   'str' => '<ns1:attach xmlns:ns1="http://php.wsf.wso2.net/samples/mtom">
        <ns1:fileName>E:\\Data\\MetricsUpload\\mn00258\\MetricsRequestForm.pdf</ns1:fileName>
        <ns1:image xmlmime:contentType="application/pdf" xmlns:xmlmime="http://www.w3.org/2004/06/xmlmime">
               <xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="<a href="cid:myid1">cid:myid1"></xop:Include>
        </ns1:image>
</ns1:attach>',
   'attachments' => 
  array (
    'myid1' => {A bunch of binary data},
  ),
))

 

Then I run the SOAP request:

$client->request($reqMessage);

 

What I get back is:

Error , NO Response Received

 

What am I doing wrong?

 

Thanks.

Michael F. Nicewarner
Manager of Marketing Automation
John Deere Financial
6400 NW 86th St
Johnston, IA  50131-6600
Phone: 515-267-4024, Fax: 515-267-3292
Email: [hidden email]

This message, including attachments, may be confidential.  If you believe this message was sent to you in error, do not read it.  If you are not the intended recipient, any retention, dissemination, distribution, or copying of this communication is strictly prohibited.  Please reply to the sender that you have received the message in error and delete it.

 


_______________________________________________
Wsf-php-user mailing list
[hidden email]
https://wso2.org/cgi-bin/mailman/listinfo/wsf-php-user
Loading...