1

following is my code

$client = new SoapClient('My api url');

$session = $client->login('username', '*********');

$result = $client->customerAddressInfo($session, $address_id);

Following is the error

Uncaught SoapFault exception: [102] Address not exists.

Can anyone explain where am i going wrong.

4
  • Welcome to Magento SE, can you please share your detail code in question. Your current code is not sufficient for understanding. Feb 6, 2016 at 5:19
  • <?php ini_set("display_errors",1); $client = new SoapClient('api url'); $session = $client->login('username', 'password'); $result = $client->customerAddressInfo($session, '4'); var_dump($result); ?> Feb 6, 2016 at 5:21
  • I want shipping address of order Feb 6, 2016 at 5:33
  • I had alternate solution to get order shipment detail through API. Please check detail in my answer. Feb 6, 2016 at 5:46

1 Answer 1

1

To get order shipment detail via API use below code:

<?php

$client = new SoapClient('http://127.0.0.1/magento1921/api/soap/?wsdl');
$session = $client->login('admin', '0f9a9394cb511775b84bbeb88750126d');
$result = $client->call($session, 'sales_order.info', '100000205');
echo "<pre>";
print_r($result['shipping_address']);

Above code will return you order details array including billing, shipping, items, etc.

To get order shipping address user $result['shipping_address'].

Hope this will help you.

Note: Please change API URL, Login Detail, and Order # with your detail.

2
  • Thank you Jayesh Patel I had it in my response array itself. Feb 6, 2016 at 5:56
  • Great, what you did for that? Feb 6, 2016 at 5:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.