WebServicesCore Proxy example
WebServicesCore Proxy example
- Subject: WebServicesCore Proxy example
- From: petite_abeille <email@hidden>
- Date: Thu, 13 Mar 2003 20:57:29 +0100
Hello,
Here is a little example on how to use the objc runtime to create a
WSMethodInvocation on the fly.
Mandatory example:
NSURL* anURL = [NSURL URLWithString:
@"
http://www.oreillynet.com/meerkat/xml-rpc/server.php"];
id <System> aProxy = [RPCProxy proxyWithURL: anURL protocol:
@protocol(System)];
NSArray* anArray = [aProxy listMethods];
Here is how it goes:
- The RPCProxy is initialized with an url indicating the location of a
server and an objc protocol describing the server methods.
- When a method is dispatched to the proxy, it gets handled by
forwardInvocation:.
- Based on a given NSInvocation, a WSMethodInvocationRef is created and
dispatched to the server.
Et voila.
Source code provided for your entertainment:
http://homepage.mac.com/petite_abeille/FileSharing1.html
Cheers,
PA.
P.S.
This has been (very briefly) tested against an XML-RPC server only.
Your mileage may vary with anything else (e.g. SOAP).
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.