How do i make multi call with SudzC

Posted by laxonline on Stack Overflow See other posts from Stack Overflow or by laxonline
Published on 2012-12-13T11:02:36Z Indexed on 2012/12/13 11:03 UTC
Read the original article Hit count: 198

Filed under:
|
|
|

I am developing magento eCommerce stores in iPhone. For that, i have using Sudzc service class for SOAP WS call.

Now, I'm trying to create a cart session its working fine. im getting the cardid. And i need to add one product to cart with some arguments. below is the php request example i need to call same this

PHP Request Example

$proxy = new SoapClient('http://beta.saletab.com/api/soap/?wsdl');
$sessionId = $proxy->login('xxxx', 'zzzzzzzzzzzzzzzzzzzzzzzzz');

//print_r($sessionId);
$shoppingCartId = $proxy->call( $sessionId, 'cart.create');
$result = $proxy->call($sessionId,'cart_product.add',array($shoppingCartId,array('product_id'=>"3109",'qty' => 2)),0);

echo "REQUEST HEADERS:\n" . $result->__getLastRequestHeaders() . "\n";

IOS Request

im trying to send some product details like productid, sku & cardid

SDZMagentoService *service = [SDZMagentoService service];
NSString *sessionId = [IMAPP_DELEGATE getUserDefault:IMAPI_SESSIONID];    
NSString *cartId = [IMAPP_DELEGATE getUserDefault:IMAPI_CARTSESSIONID];    

NSDictionary *argu = [[NSDictionary alloc] initWithObjectsAndKeys:@"3109",@"product_id",@"2",@"qty",cartId,@"card_id", nil];
[service call:self action:@selector(cartTest:) sessionId:sessionId resourcePath:@"cart_product.add" args:argu];

© Stack Overflow or respective owner

Related posts about iphone

Related posts about api