javaiphoneobjective-csoapcore-services

App with ios 4.3 and SOAP


I,ve created a pictures gallery with ios 4.3 and i want download, decode and save my pictures before start my app.

I want use SOAP with Java Server because i think that is more simple but i,ve had some problems with Core Services library, i need this library to communicate both sides.

It´s impossible add this framework.

I need solve this problems or other solutions. I´ve seen ASIHTTPRequest but it´s so difficult understand from zero.


Solution

  • SOAP is seldom the simple answer.

    ASIHTTPRequest is nice for network access, but not a silver bullet for SOAP. It is just as easy/hard to do with the built in classes from Foundation framework.

    First of you need to manually build your SOAP request bodies. Typing up template a XML file with placeholders that can be easily replaced is the simplest way to do it.

    Then take the constructed XML as the HTML body of a NSMutableURLRequest and send it using NSURLConnection.

    The response will be more XML wrapped in a NSData instance. Use NSXMLParser to decode it.

    But given that you want to write the server in Java and an easy solution; I would use Hessian over here http://hessian.caucho.com/ to implement the server.

    On the iOS side use HessianKit over here https://sourceforge.net/projects/hessiankit/ and do simple RPC calls.

    Disclaimer; I am the author of HessianKit.