Simon Fell > Its just code
Pop Quiz, given a HTTP/MIME request like this one here, how do you ensure that the Mime boundary string isn't used in the attachment payload, without buffering the whole thing in memory first ?
POST /axis/servlet/AxisServlet HTTP/1.0
Content-Type: Multipart/Related;
boundary="MIMEBoundary012345";
type="text/xml";
start="<38CCC118-AEB9-48F0-AE83-C56E405044B9@swa.pocketsoap.com>"
Accept-Charset: UTF-8, UTF-16
User-Agent: pocketSOAP/1.2.4
Host: utahsaints.simonathome.com:8081
Content-Length: 20102
SOAPAction: test
--MIMEBoundary012345
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-ID: <38CCC118-AEB9-48F0-AE83-C56E405044B9@swa.pocketsoap.com>
<S:Envelope
S:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:S='http://schemas.xmlsoap.org/soap/envelope/'
xmlns:a='urn:EchoAttachmentsService'>
<S:Body><a:echo>
<source href='cid:B05EC49A-365F-4382-83E8-7580F34E6C28@swa.pocketsoap.com'></source>
</a:echo>
</S:Body></S:Envelope>
--MIMEBoundary012345
Content-Type: application/x-zip
Content-Transfer-Encoding: binary
Content-ID: <B05EC49A-365F-4382-83E8-7580F34E6C28@swa.pocketsoap.com>
PK....
--MIMEBoundary012345--
Started looking at SwA again. The sending part is pretty straightforward [if not massively efficient without a HTTP stack with chunked transfer encoding support]. I can package up random binary attachments and have the Axis EchoAttachment sample send it back. Just the *ahem* minor task of parsing the response left todo. BTW, anyone know of a good portable C++ based MIME parser ?
I just released PocketSOAP v1.2.3
W3C announces Web Services Activity This includes a web services description working group !, looks like Gudge & Tim got their christmas wish after all !
http://www.pocketsoap.com/ gets a coffee mug.
What Object Does SOAP Access?. [Sam Ruby's Radio Weblog]