(no subject)
(no subject)
- Subject: (no subject)
- From: Michael Jurewitz <email@hidden>
- Date: Thu, 30 Jun 2005 23:49:45 -0700
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:
This email sent to email@hidden