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

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


    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
    > 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.
previous month june 2007 next month
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Go to today