1

I can't find a good example anywhere of how to use postman application for testing the Magento 1.9 SOAP Api. The REST Api is not enough for my needs.

I have tried a POST request using https://example.com/api/v2_soap?wsdl=1 as the URL, and in the body : raw , XML ( text/xml ) .

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP-ENV:Body>
        <MAGE:login xmlns:MAGE="http://example.com/api/v2_soap/?wsdl=1">
            <MAGE:username>username</MAGE:username>
            <MAGE:apiKey>password</MAGE:apiKey>
        </MAGE:login>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

And the response is just the WDSL page. I'm a bit baffled by that and have tried various combinations of removing the ?wsdl=1 parameter .

  • Request @all magento developers : please first try to give an answer of question instead of edit.. – H_Parekh Jun 14 '18 at 13:21
0

This looks like some odd request XML, but I suspect the main issue is posting data to a URL that includes wsdl=1.

Try posting to https://example.com/api/v2_soap

This is the XML I use, which I know works in case there is also an XML issue: <soapenv:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:urn="urn:Magento"> <soapenv:Header/> <soapenv:Body> <urn:login soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <username xsi:type="xsd:string">{{username}}</username> <apiKey xsi:type="xsd:string">{{apiKey}}</apiKey> </urn:login>
</soapenv:Body> </soapenv:Envelope>

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.