Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The by far easiest way to consume a web service on an iPhone is to use <a href="http://hessian.caucho.com/" rel="nofollow noreferrer">Hessian</a>. Implement the server in Java using the official Hessian distribution, or in .NET using <a href="http://www.hessiancsharp.org/" rel="nofollow noreferrer">HessianC#</a>.</p> <p>Let us assume you have defined the following interface for your web service, and implemented it as a <code>HessianServlet</code> (Just replace a <code>HttpServlet</code>):</p> <pre><code>public interface MyService { public String doWithStuff(String action, Object stuff); } </code></pre> <p>It is just as easy on .NET.</p> <p>On the client side use <a href="http://sourceforge.net/projects/hessiankit/" rel="nofollow noreferrer">HessianKit</a>, where you create proxies to the web service, and then use them just as if they where local object. First you must conbert the Java interface above to an Objective-C protocol.</p> <pre><code>@protocol MySertvice -(NSString)do:(NSString*)action withStuff:(id)stuff; @end </code></pre> <p>Then use it as a proxy, just as if it was a local object:</p> <pre><code>id&lt;MyService&gt; proxy = [CWHessianConnection proxyWithURL:serviceURL protocol:@protocol(MyService)]; NSLog(@"%@", [proxy do:@"Something" withStuff:arguments]); </code></pre> <p>Hessian in a binary web service protocol, meaning <strong>allot</strong> smaller payloads, which is good on a slow GSM connection. Hessian is also much easier to encode and decode, compared to XML and JSON, meaning your app can make calls and receive responses using less CPU, and memory for temporary objects.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload