Jon
Jon

Reputation: 13

iphone XML attachments

My iPhone app will be receiving an xml feed from a Java web service. The xml is in a SOAP message. I can easily parse data from within the xml however there is a jpeg attachment to the SOAP message that I need to display within the iPhone app. Does anyone have example code or a link to some documentation on how to work with SOAP attachments on the iPhone?

Thanks

Upvotes: 1

Views: 348

Answers (1)

Randolpho
Randolpho

Reputation: 56419

I'm not 100% certain, but I'm reasonably sure that wsdl2objc supports binary attachments. Documentation is sparse, however.

That said, if you are parsing the message by hand, take a look at the Message format from w3c; it's just MIME attachments, which means it's going to base64 encoded. Unfortunately, the iPhone SDK doesn't have a base64 encoder/decoder, so you'll have to roll your own or use a third party library. This article should help you roll your own.

Upvotes: 1

Related Questions