• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
WebServicesCore Proxy example
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Prev by Date: Re: WSMethodInvocationInvoke & Basic Authentication
  • Next by Date: Re: Non functioning IBOutlet
  • Previous by thread: Re: Translating accented characters to HTML entity equivalents
  • Next by thread: NSMatrix and NSPopUpButton
  • Index(es):
    • Date
    • Thread