• 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
Re: WebKit and POST requests
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebKit and POST requests


  • Subject: Re: WebKit and POST requests
  • From: Mike Stanger <email@hidden>
  • Date: Fri, 22 Jun 2007 10:44:00 -0700

At 3:22 AM +1000 6/23/07, Sam Stigler wrote:
Does anyone know of examples of actually using the stubs that WSMakeStubs creates? I've gotten as far as making them, but I can't quite figure out how to actually call the code. In addition, I've found very little on this in the documentation or otherwise... when exactly is the WSMethodInvocationRef supposed to be called, and how should it be used in conjunction with the rest of the methods in the stub? (I did find the WikiBooks example at <http://en.wikibooks.org/wiki/Programming:WebObjects/Web_Services/Web_Service_Provider>http://en.wikibooks.org/wiki/Programming:WebObjects/Web_Services/Web_Service_Provider , but it's not quite as easy to understand as I'm looking for.)


It's actually not too hard (though I'm a bit of n00b, so if anybody sees errors, please chime in)...


For example, in the WSStub.h file for a particular WSDL that I used WSMakeStubs to generate the static stub files for, one of the advertised methods was listed as:

+ (id) sectionsForInstructor:(NSString *) in_staffComputingID in_token:(NSString *) in_token;

.... in my code that retrieves the results, I added the import for WSStub.h and used code like this:

....
sectionsForInstructor *theSections = [[sectionsForInstructor alloc] init];
[theSections setParameters: @"somestringvalue" in_token: @"thetokenvalue"]


... you then get the results from the query with resultValue and deal with whatever data structure you get back ... in this case, I'd expect to be getting back an array, so I'd use something like:

	NSArray *allSectionsArray = [theSections resultValue];

...might be a better way to do it, but this seems pretty simple.

Mike
--
+------------------------
|Mike Stanger
|Systems Consultant, Academic Computing Services
|SH1023 Simon Fraser University
|Burnaby, BC Canada V5A 1S6
|Phone: (604) 291-3361
|FAX: (604) 291-4242
|email: email@hidden
|http://www.sfu.ca/~mstanger
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: WebKit and POST requests (now WSDL and WSMakeStubs)
      • From: Sam Stigler <email@hidden>
References: 
 >WebKit and POST requests (From: Orr Philip <email@hidden>)
 >Re: WebKit and POST requests (From: Uli Kusterer <email@hidden>)
 >Re: WebKit and POST requests (From: John Stiles <email@hidden>)
 >Re: WebKit and POST requests (From: Dominik Pich <email@hidden>)
 >Re: WebKit and POST requests (From: Alastair Houghton <email@hidden>)
 >Re: WebKit and POST requests (From: Mike Stanger <email@hidden>)
 >Re: WebKit and POST requests (From: Sam Stigler <email@hidden>)

  • Prev by Date: Re: KVC and arrays
  • Next by Date: Re: KVC and arrays
  • Previous by thread: Re: WebKit and POST requests
  • Next by thread: Re: WebKit and POST requests (now WSDL and WSMakeStubs)
  • Index(es):
    • Date
    • Thread