• 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 (now WSDL and WSMakeStubs)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: WebKit and POST requests (now WSDL and WSMakeStubs)


  • Subject: Re: WebKit and POST requests (now WSDL and WSMakeStubs)
  • From: Sam Stigler <email@hidden>
  • Date: Sun, 24 Jun 2007 19:29:19 +1000

Hi,
Here's an update on the situation: By inserting an NSLog() statement just before the call to [super getResultDictionary] in the stub, I was able to print the result dictionary. It's always an error from Amazon saying that I'm missing a required parameter (the same one every time, "ListType"), no matter how I fiddle with the parameters that I'm passing in as an NSDictionary (most recently entirely composed of NSStrings) using -setParameters: . I think I've basically traced this to a flaw in how the stub was created, with it only passing the invocation with one parameter (which was hardcoded as "body") instead of the at least three that were in my dictionary. I tried fiddling with the generated files to try make it work by converting everything to Foundation parameters, e.g., an NSMutableArray** instead of a C array, but ended up running into so many memory problems (most of whose causes were not immediately evident) that I gave up on that after a few hours.
I was looking on the lists.apple.com archive and noticed a post from Matt Neuburg about a year ago in which he basically said that WebServicesCore doesn't work for many sites; could my issue be symptomatic of this? Or am I misreading the whole situation?


Thanks for any help you can give me.

Sam


On Jun 23, 2007, at 3:54 PM, Sam Stigler wrote:


Thanks; that example is very helpful. What I'm trying to do is access Amazon's web services via SOAP. I tried basically replicating what you did (see below), but I keep on getting nil (0x0) resultValues. After studying the WSDL for a little while I'm guessing it has something with the fact that I'm trying to substitute in a NSDictionary for a complexType that WSMakeStubs didn't make a method for; can you (or anyone else), please verify that? Here's my code:

NSDictionary *ListSearchRequestDict = [NSDictionary dictionaryWithObjectsAndKeys:[emailAddress stringValue],@"Email",@"WishList",@"ListType",nil];
ListSearch *theSearch = [[ListSearch alloc] init];
// Missing here: Something like "ListSearchRequest *searchRequest = [[ListSearchRequest alloc] init]" (this is what WSMakeStubs didn't generate.)
NSDictionary *listSearchParameters = [NSDictionary dictionaryWithObjectsAndKeys:@"MY_ACCESS_KEY",@"AWSAccessKeyId",ListSe archRequestDict,@"Request",nil];
[theSearch setParameters:listSearchParameters];
id search = [theSearch resultValue];


The WSDL file can be found at http://webservices.amazon.com/ AWSECommerceService/AWSECommerceService.wsdl? .

Thanks again,
Sam


On Jun 23, 2007, at 3:44 AM, Mike Stanger wrote:


<snip>



... 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.

_______________________________________________

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


  • Prev by Date: Re: Unselectable NSTableView with selectable cell controls
  • Next by Date: NSScrollView: General Question When does scrollRectToVisible does not scroll?
  • Previous by thread: Re: AppleScript not sending my Cocoa app proper floats on Intel
  • Next by thread: NSScrollView: General Question When does scrollRectToVisible does not scroll?
  • Index(es):
    • Date
    • Thread