Magento – Magento WSDL not Wsi Compliant

apiwsdlwsi

I have an issue with the compiled WSDL file not being standard compliant with 3rd party system, SAP.

A base magento install with WS-I compliance turned on in the admin is causing errors within SAP as the wsdl schema is returning nodes in the wrong order.

The message nodes should be grouped together, however as visible here:

The following nodes separate message blocks, which invalid the strict schema.

<portType name="Mage_Api_Model_Server_V2_HandlerPortType">...</portType>
<binding name="Mage_Api_Model_Server_V2_HandlerBinding" type="typens:Mage_Api_Model_Server_V2_HandlerPortType">...</binding>
<service name="MagentoService">...</service>

Has anyone else encountered this problem? And also has anyone ever needed or know how to reoorder nodes within the combined wsdl file?

Best Answer

I'm not sure your Magento system is running in WS-I mode or I'm not sure you're loading from the WSDL from the correct SOAP URL. When Magento's running is WS-I mode the portType tags render with a wsdl namespace prefix.

<wsdl:portType name="

Your error message indicates a portType without a namespace.

<portType name="

My guess is you're loading the incorrect SOAP URL. Magento actually has two SOAP WSDL end points. The first, (let's call it simple SOAP), is at

http://store.example.com/index.php/api/soap?wsdl=true

This was the original SOAP API, and was incompatible with most modern SOAP tool chains. (it was consumable via PHP's SoapClient)

The second SOAP API, or V2 API, has its WSDL endpoint at

http://store.example.com/index.php/api/v2_soap?wsdl=true

This V2 API was created to provide a SOAP api that was compatible with modern tool chains. The V2 API can run in WS-I mode, or non-WS-I mode. This is configurable at

System -> Configuration -> Magento Core API -> General Settings -> WS-I Compliance

For some reason your SAP system is seeing the wrong WSDL. Figure out why that is and your problems should (may) be solved.