SOAP request in PHP with CURL

Tested and working! with https, user & password <?php //Data, connection, auth $dataFromTheForm = $_POST[‘fieldName’]; // request data from the form $soapUrl = “https://connecting.website.com/soap.asmx?op=DoSomething”; // asmx URL of WSDL $soapUser = “username”; // username $soapPassword = “password”; // password // xml post structure $xml_post_string = ‘<?xml version=”1.0″ encoding=”utf-8″?> <soap:Envelope xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”> <soap:Body> <GetItemPrice xmlns=”http://connecting.website.com/WSDL_Service”> … Read more

Compare and contrast REST and SOAP web services? [duplicate]

SOAP uses WSDL for communication btw consumer and provider, whereas REST just uses XML or JSON to send and receive data WSDL defines contract between client and service and is static by its nature. In case of REST contract is somewhat complicated and is defined by HTTP, URI, Media Formats and Application Specific Coordination Protocol. … Read more

What is the difference between SOAP 1.1, SOAP 1.2, HTTP GET & HTTP POST methods for Android?

Differences in SOAP versions Both SOAP Version 1.1 and SOAP Version 1.2 are World Wide Web Consortium (W3C) standards. Web services can be deployed that support not only SOAP 1.1 but also support SOAP 1.2. Some changes from SOAP 1.1 that were made to the SOAP 1.2 specification are significant, while other changes are minor. … Read more

I am confused about SOAP namespaces

It is related to the SOAP version. SOAP 1.2 uses http://www.w3.org/2003/05/soap-envelope for the namespace and SOAP 1.1 uses http://schemas.xmlsoap.org/soap/envelope/. For reference, see http://www.w3.org/TR/soap/ and look at the envelope section in the different version specs. Also, you can browse to each of those envelope URLs and check the version number to see exactly which version of … Read more

Can a WSDL indicate the SOAP version (1.1 or 1.2) of the web service?

SOAP 1.1 uses namespace http://schemas.xmlsoap.org/wsdl/soap/ SOAP 1.2 uses namespace http://schemas.xmlsoap.org/wsdl/soap12/ The wsdl is able to define operations under soap 1.1 and soap 1.2 at the same time in the same wsdl. Thats useful if you need to evolve your wsdl to support new functionality that requires soap 1.2 (eg. MTOM), in this case you dont … Read more

How do I install soap extension?

For Windows Find extension=php_soap.dll or extension=soap in php.ini and remove the commenting semicolon at the beginning of the line. Eventually check for soap.ini under the conf.d directory. Restart your server. For Linux Ubuntu: PHP7 Apache sudo apt-get install php7.0-soap sudo systemctl restart apache2 PHP5 sudo apt-get install php-soap sudo systemctl restart apache2 OpenSuse: PHP7 Apache … Read more