Riccardo, I am successfully able to call the test Hessian server from my Objective-C client. I then created my own Hessian Java web service using NetBeans, as shown below. I tested the service with a NetBeans test client and it works fine. However, my Objective-C client throws an HTTP 500 error. Do I have the URL correct in my client? What else could possibly be wrong?
Any suggestions would be very appreciated. Thank you, Steffen SERVER: package org.me.myproduct; import com.caucho.hessian.server.HessianServlet; import javax.jws.WebMethod; import javax.jws.WebParam; import javax.jws.WebService; import javax.ejb.Stateless; /** * * @author steffen */ @WebService() public class MyProductWS extends HessianServlet { /** * Web service operation */ @WebMethod(operationName = "begin_sync") public String do_something(@WebParam(name = "subscriber_id") String subscriber_id, @WebParam(name = "password") String password, @WebParam(name = "type") String type, @WebParam(name = "action") String action, @WebParam(name = "data") String data) { //TODO write your implementation code here: return "Hello, it's me!"; } } CLIENT: (in .h) @protocol MyProductWS -(NSString *) do_something:(NSString *)subscriber_id password:(NSString *)password type:(NSString *)type action:(NSString *)action data:(NSString *)data; @end (in .m) @try { NSURL* urlTest = [NSURL URLWithString:@"http://localhost:8080/MyProductWSApplication/MyProductWSService"]; id<MyProductWS> proxy = (id<MyProductWS>)[CWHessianConnection proxyWithURL:urlTest protocol:@protocol(MyProductWS)]; message = [proxy do_something:@"a" password:@"b" type:@"c" action:@"d" data:@"e"]; } @catch (NSException *exception) { @throw exception; } @finally { return message; } On Jan 2, 2011, at 2:11 PM, Riccardo Cohen wrote: > Hi Steffen > > Why don't you just setup a Resin opensource on your mac like I do, and > reach this local server with wifi on its IP ! this way you will be able > to test many things. > > If you need help for this please contact me on my email directly. I'd be > also glad to test the application on iPhone, I have just created an iOS > developer account on Apple.com and start to learn this stuff :) > > > > On 02/01/11 18:59, Steffen Demos wrote: >> Developers, >> >> I am implementing Hessian in Objective-C for the iPhone. I compile >> successfully, but yet throw an exception when attempting to access the >> BasicAPI web service with a call to hello. The exception reason states >> "*The service has no method named: hello*". Has the test service been >> modified or moved? Please note the url that I specify in my call below: >> >> NSURL* urlTest = >> [NSURLURLWithString:@"http://hessian.caucho.com/test/test"]; >> id<BasicAPI> proxy = >> (id<BasicAPI>)[CWHessianConnectionproxyWithURL:urlTest >> protocol:@protocol(BasicAPI)]; >> NSLog(@"hello: %@", [proxy hello]); >> >> I always search postings to find answers to my questions before posting. >> However, in this case I have not found how to do that. Please advise. >> >> Thank you, >> >> Steffen >> >> >> >> _______________________________________________ >> hessian-interest mailing list >> hessian-interest@caucho.com >> http://maillist.caucho.com/mailman/listinfo/hessian-interest > > -- > Riccardo Cohen > Architecte du Logiciel > http://www.architectedulogiciel.fr > BP 77536 > 37075 Tours Cedex 2 > +33 (0)6.09.83.64.49 > Membre du réseau http://www.reflexe-conseil-centre.org > > > _______________________________________________ > hessian-interest mailing list > hessian-interest@caucho.com > http://maillist.caucho.com/mailman/listinfo/hessian-interest
_______________________________________________ hessian-interest mailing list hessian-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/hessian-interest