Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

WebServices -- Re: (no subject)



try turning on debugging for the transaction (not sure where this is documented

I did a presentation on this at O'Reilly in 2002

http://www.stepwise.com/SpecialCoverage/ORA2002/WebServicesIntro.pdf

page 25, 26, 27




On Jul 1, 2005, at 2:49 AM, Michael Jurewitz wrote:

I am using Mac OS X's WebServicesCore to query amazon via SOAP. Amazon says it can't find my SubscriptionId or SearchIndex, despite being provided in the code. Does anyone see anything obviously wrong? Here is what I have so far:


NSArray *values = [NSArray arrayWithObjects:@"AWSECommerceService", @"###MEMBER_ID###", @"ItemSearch", @"Music", @"dog", nil];
NSArray *keys = [NSArray arrayWithObjects:@"Service", @"SubscriptionId", @"Operation", @"SearchIndex", @"Keywords", nil];
NSMutableDictionary *parameters = [[NSDictionary alloc] initWithObjects:values forKeys:keys];


NSDictionary *dict = [AWSECommerceService ItemSearch:parameters];

Class and method definitions:

+ (id) ItemSearch:(CFTypeRef /* Complex type http:// webservices.amazon.com/AWSECommerceService/2005-03-23|ItemSearch */) in_body
{
id result = NULL;
ItemSearch* _invocation = [[ItemSearch alloc] init];
[_invocation setParameters: in_body];
result = [[_invocation resultValue] retain];
[_invocation release];
return result;
}


@implementation ItemSearch
- (void) setParameters:(CFTypeRef /* Complex type http:// webservices.amazon.com/AWSECommerceService/2005-03-23|ItemSearch */) in_body
{
id _paramValues[] = {
in_body,
};
NSString* _paramNames[] = {
@"body",
};
[super setParameters:1 values: _paramValues names: _paramNames];
}


- (id) resultValue
{
    return [[super getResultDictionary] objectForKey: @"body"];
}

- (WSMethodInvocationRef) genCreateInvocationRef
{
return [self createInvocationRef
/*endpoint*/: @"http://soap.amazon.com/onca/soap? Service=AWSECommerceService"
methodName: @"ItemSearch"
protocol: (NSString*) kWSSOAP2001Protocol
style: (NSString*) kWSSOAPStyleRPC
soapAction: @"http://soap.amazon.com";
methodNamespace: NULL /* No Method Namespace specified */
];
}


@end; /* ItemSearch */


-Michael Jurewitz

*********************************************
Northwestern University

2341 Sheridan Road
Evanston, IL
60201

Room:  847-332-9515
Cell:  909-717-5474
*********************************************



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


_______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden
References: 
 >(no subject) (From: Michael Jurewitz <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.