Page 1 of 1

SOAP Message with attachment

Posted: Fri Dec 18, 2009 11:55 am
by jdyken
Does anyone know how to add an attachment to a SOAP message? Also - does anyone know how to read an attachment from the SOAP server? Does PHP natively support attachments within it's SOAP implementation?

Running PHP 5.2.8

A million thank yous!

Re: SOAP Message with attachment

Posted: Fri Dec 18, 2009 12:33 pm
by JNettles
What do you mean by attachment? Like an email attachment, as in a file?

Re: SOAP Message with attachment

Posted: Fri Dec 18, 2009 1:18 pm
by jdyken
Yes. Like an email MIME attachment.

<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instan ... s1:process soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="urn:TripFlow"><message href="cid:2F09F494BA05FE2F4ECACEFC94C47E30" xsi:type="ns1:DataHandler"/></ns1:process></soapenv:Body></soapenv:Envelope>

Where the message references the attachment.

Re: SOAP Message with attachment

Posted: Fri Dec 18, 2009 3:41 pm
by JNettles
What sort of file are you trying to transfer? I always just read the entire file, ship it over SOAP and then reassemble on the other side.

Re: SOAP Message with attachment

Posted: Fri Dec 18, 2009 4:12 pm
by jdyken
Turns out that PHP 5 does not natively support SOAP attachments.

We're trying out NuSOAP for PHP 5.
http://code.google.com/p/nusoap-for-php5/

I'm optimistic!