How to create SOAP 1.2 request
15,973
<?php
$client = new SoapClient("URL/OF/YOUR/WSDL", array('soap_version' => SOAP_1_2));
$result = $client('GetProducts');
?>
Comments
-
Martin819 almost 2 years
I need help with creating SOAP 1.2 request. All i have is this:
SAMPLE REQUEST:
POST /WS/PriceList.asmx HTTP/1.1 Host: gateway.systemb2b.com Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetProducts xmlns="http://gateway.systemb2b.com/schemas/Product" /> </soap12:Body> </soap12:Envelope>
SAMPLE RESPONSE:
HTTP/1.1 200 OK Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"> <soap12:Body> <GetProductsResponse xmlns="http://gateway.systemb2b.com/schemas/Product"> <GetProductsResult>xml</GetProductsResult> </GetProductsResponse> </soap12:Body> </soap12:Envelope>
Thanks a lot.
-
Player1 over 5 yearsThis is the answer that I am looking for.
-
Hille almost 4 yearsWelcome to SO! Please explain what your code does, otherwise no one is able to learn something and is just continuing to copy & paste which is not the goal here.