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
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.
Related
I have a working POST request that will send a CAF audio file (recorded on the iPhone with AVAudioRecorder) to a web server -- the request itself is structured similarly to Send an audio FILE and JSON string in iOS.
The server correctly receives the file, but I'm having trouble converting it into a format that will play directly in a browser. In addition to every audio/iPhone/server post I could find on stack overflow, I've looked into ffmpeg and HTML5 audio as well, but couldn't find clear instructions on how to convert the received audio binary to a browser-playable format. Essentially, I need to understand how to accomplish Arun's server-side suggestion here.
I know that Audacity, Soundbooth, etc. will allow you to use the raw data and save it as another format, but I need this to be done programmatically on the server. If there are any suggestions they would be very much appreciated! Thank you.
How can I get a pdf data (stored in datastore as blob) from iphone if i make a request to google app engine?
When I use
self.response.out.write('asadasd');
in google app engine code
I can see this 'asadasd' in iPhone.
But i don't know how to set this communication so that i can get a pdf data from i phone.
Thanks in advance!
If I understand corretly, you want to send an pdf file to a webapplication, right?
I think it would be a solution to base64 code the binary data of the pdf on the iphone (that comes from your blob) and then send it via http post to the webapplication.
You should set the proper headers before writing to the output stream:
self.response.headers['Content-Type'] = 'application/pdf'
self.response.headers['Content-Disposition'] = 'attachment;filename=filename.pdf'
self.response.out.write(...)
I am making an iphone application.
I am a newb.
I want to fetch the data from my website. What should i do to implement this?
What needs to be done?
Help me please
Thanks
Any tutorials would be of great help.
If your problem is getting data from website to iphone then you can just use JSON Parsing to get data.
Just you have to pass all the data as JSON string in iPhone from your website. And then parse the data once received into your iPhone.
Here you can refer to this link
http://www.raywenderlich.com/5492/working-with-json-in-ios-5
Hope this helps you
You will be using the NSURLConnection, NSURLRequest and NSURL classes here is an example from Apple; http://developer.apple.com/library/mac/ipad/#documentation/Cocoa/Conceptual/URLLoadingSystem/Tasks/UsingNSURLConnection.html
Expose your data from your site as WebService, XML, JSON etc. Consume that using iPhone app.
Which language is being used your site?depending on that some sample could be provided.
Chapter 10 of James Kennard, Mastering Joomla! 1.5 : APIs and Webservices contains 8 pages about XML-RPC.
For real-live examples, search the Joomla! Extension Directory.
http://extensions.joomla.org/extensions/search/xml-rpc
Here is another one to kick-start http://www.slideshare.net/coolparth/rest-api-for-joomla
For the server side, I suggest using a web service to send the data to your client.
ORIGINAL AUTHOR'S REVISION:
The September issue of Linux Journal has an excellent article on writing mobile apps that work for Android AND iPhone/iPad using free tools and frameworks. Here is a link to the article online:
Developing Portable Mobile Web Applications
Previous answers suggest using NSURLConnection, but I find it to be a bit cumbersome to use on its own. I suggest using something that wraps NSURLConnection (or CFNetwork). Some examples: ASIHTTPRequest (CFNetwork-based), httpriot and Seriously (NSURLConnection/block-based).
I'm quite new in iPhone development and I need to develop an app.
I must get mp3 data from a web server, which provides a simple saving the mp3 in my app document or folder
and use it in an application, which should also dislpay a table with rows like:
song1
song2
song3
But at present I don't know at all how to get this web page, parse it and store into an array in the application.
Please do you have any suggestion / hint / sample code ?
Thank you in advance,
There is a tutorial on the apple developer site on how to make a http request and receive data here. Should get you going on how to fetch the web page.
For parsing you can use the NSScanner or a XML/HTML parser library like TouchXML depending on your needs.
I used web services to communicate with web server, the following tutorial helped me a lot.
http://icodeblog.com/2008/11/03/iphone-programming-tutorial-intro-to-soap-web-services/
I was able to send and retrieve binary content using web service but I had to encode it first to be able to send it through Soap request and decode back Soap Response.
Hope that can help you,
I'm developing an iPhone application for a radio station. I'm in need of parsing playlist.pls and playlist.qtl, to get the stream audio url present in it. I'm stuck with that.
Since pls uses ini format, you can parse it using Properties. qtl is an xml format, you can find a lot of examples of parsing xml.