Do you have PHP setup to cache the WSDL files? PHP's SoapServer implementation (used by Magento) needs to examine the WSDL file at least once during a SOAP call, sometimes more than once. This can create exponential growth in your request times. Check the setting at
System -> Configuration -> Magento Core Api -> Enable WSDL Cache
and make sure ...
Apparently I fell prey to a common Magento pitfall, so I'm posting the answer in case anyone else is searching this particular error. Basically, the error was coming from the Magento installation I was trying to call via the SOAP API.
Initially I thought the error was generated by the client being unable to locate this definitions result, however the real ...
It is not possible with the out-of-box API alone; documentation seems pretty clear on this as it documents no way of establishing selections, options for a bundle
Aside from that, the lack of an api.xml file in the Mage_Bundle package is telling that there is no support. Contrast that with another product type which arrived after 1.0, such as ...
I finally found the reason for the problem and the solution:
The problem: SOAPv2 with WS-I does not use the single_data and multi_data attributes. Therefore the check in /app/code/core/Mage/Catalog/Model/Product/Api/V2.php in _prepareDataForSave fails.
The method _prepareDataForSave checks for single_data and multi_data which are both not part of the SOAP-...
Same error with another extension here. system.log says
Argument 1 passed to
be of the type array, string given, called in
I think the problem is the new method
You will need to define a clear use-case to get a specific answer to your question. Unless we have a detailled use-case here, I'd like to answer with general advice on that:
SOAP vs REST
SOAP and REST are two ways of accessing web-services.
SOAP uses XML for its requests. REST relies on HTTP requests via URL and is therefore really lightweight compared to ...
Custom data interface should be created to represent key-value pairs, e.g.
* Interface which represents associative array item.
* Get key
* @return string
public function getKey();
* Get value
I ended up doing something like the following in my data-install-1.0.0.php script, which creates a new role and user with 'all' privileges.
$api_key = "your_key_here";
$api_role = Mage::getModel('api/roles')
Alan, you are right, SOAP framework is completely different from the one in Magento 1 and was created specifically for Magento 2 needs to have Service layer interfaces same for REST, SOAP and PHP clients.
SOAP Authentication uses oAuth 2.0-like style of authentication using Bearer token. This is simple example on how to configure the SOAP client on PHP side:...
The street field contains street1 and street2 separated by a line break. In order to get one or the other just explode the string by \n.
$street = explode('\n', $street);
You can then just pull $street for street1 or $street for street2. Alternatively if you are accessing the customer address object you can just call street1 or street2 directly to ...
When using an observer for the event controller_action_postdispatch_contacts_index_post you can access the Post-Data via
public function controllerActionPostdispatchContactsIndexPost(Varien_Event_Observer $observer)
$data = $observer->getData();
$post = $data['controller_action']->getRequest()->getPost();
To listen for the event create ...
This is an already known and patched Magento Bug.
Magento Install Page Displays After SOAP v2 Index Page Refresh
Patch name: SUPEE-3762. Refreshing the SOAP v2 index page
in all administrators and customers viewing the Magento installation
Look up the following inside your script file
If you can't find Soap Client set to enabled like so:
Do the following:
Locate php.ini in your apache bin folder, I.e Apache/bin/php.ini
Remove the ; from the beginning of extension=php_soap.dll
Restart your Apache server
Look up your phpinfo(); again and check if you see a similar ...
I've done this for importing group prices with SOAPv2 for Magento CE 126.96.36.199 some time ago and wrote a a (german) blogpost about this (Google translate might help).
I added the important parts with an english explanation here and hope this helps you getting started.
Basically you need to rewrite the catalog/product_api_v2 model and extend the ...
Inject \Magento\Framework\Webapi\Soap\ClientFactory in the class where you need it:
public function __construct(\Magento\Framework\Webapi\Soap\ClientFactory $soapClientFactory)
$this->soapClientFactory = $soapClientFactory;
Then use it to instantiate a SoapClient instance:
$soapClient = $this->soapClientFactory->create($wsdl, $options);
Create A Custommodule:
class Amit_Customapi_Model_Api extends Mage_Api_Model_Resource_Abstract
public function myregion()
$countryList = explode(',', Mage::getStoreConfig(general/region/state_required));
and etc/api.xml is
Facing same issue on ubuntu OS + PHP7 I managed to solve this issue by running this command
sudo apt-get install php7.0-soap
And then restart apache
sudo service apache2 restart
Hope this may help someone.
With php5.x you can you can use
sudo apt-get install php5-soap
The problem you're experiencing is that .NET/C# is having trouble parsing the content type Magento is sending along with it's response. SOAP is notoriously finicky about receiving just the right stuff in just the right format. Couple that with PHP's rather poor implementation of the protocol and you're in for a lot of fun.
I'm looking at a Magento 1.9 for ...
SOAP V1: http://magentohost/index.php/api/soap/?wsdl (this one is more like RPC, no concrete operations defined in WSDL, just call)
SOAP V2: http://magentohost/index.php/api/v2_soap?wsdl=1 . For strongly-typed languages use this one and remember to enable WS-I compliance mode on Magento side: Services > Magento Core API > WS-I Compliance to Yes
You will get all the customer address related attributes by calling below url :
Method Name : GET
Same way for Authorization Bearer youraccesstoken
You will get the all the address related attributes name and its values like state , country etc.
Their you will find ...
In a SOAP web service, a WSDL file is the file that describes all the methods available in the service. This information is structured in such a way that the SoapClient will know the XML is needs to send to make the method calls.
The cryptic error message
Fatal error: Uncaught SoapFault exception: [WSDL] SOAP-ERROR: Parsing WSDL: Couldn't find in 'https:/...
The full workflow should be like this:
Create a shopping cart ('cart.create')
Set the customer/guest to the shopping cart ('cart_customer.set')
Set customer addresses, for example guest's addresses ('cart_customer.addresses')
add/update/remove products to the shopping cart ('cart_product.add', 'cart_product.update', cart_product.remove')
get the list of ...
A full backup is always recommended during any upgrade attempt. You should also make sure to do the upgrade in a dev/staging system first and test for errors.
The move from EE 1.12 -> 1.13 can be a bit tricky for some (depending on size of stores, etc). There are changes to the way url keys are handled. You need to make sure all of your url keys are ...
Simple error. You are using the wrong variable in SalesOrderInfo.
Your current code
Notice: That you set the session Id to $session, but then use $sessionId in salesOrderInfo.
$proxy = new SoapClient('http://www.mydomain.com/index.php/api/v2_soap?wsdl=1');
$session = $proxy->login('user', 'password'); // connect to the API
$result = $...
If you are sure that your product exists could it be that you do want to pass a numeric SKU (e.g. 1234)?
If you cast the product ID/SKU to a string, it looks like a number and you don't declare the identifierType "sku", the product identifier will be treated like a ID and so the product won't be found.
The solution: after the data array, add a store ...
SOAP server needs to be initialized with WSDL to understand how to process incoming requests (it basically loads WSDL from the specified URL in case of Magento). This happens in \Mage_Api_Model_Server_Adapter_Soap::_instantiateServer():
$this->_soap = new Zend_Soap_Server(
$this->getWsdlUrl(array("wsdl" => 1)),
array('encoding' => $...