habibjutt
1/6/2017 - 1:18 PM

soap request using wsdl url.php

$soap_request = '<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://consultaExpediciones.servicios.webseur">
  <SOAP-ENV:Body>
    <ns1:consultaDetalleExpedicionesStr>
      <ns1:in0>L</ns1:in0>
      <ns1:in1>83080189513844</ns1:in1>
      <ns1:in2>velvet83</ns1:in2>
      <ns1:in3>velvet83</ns1:in3>
    </ns1:consultaDetalleExpedicionesStr>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
    $header = array(
        "Content-type: text/xml;charset=\"utf-8\"",
        "Accept: text/xml",
        "Cache-Control: no-cache",
        "Pragma: no-cache",
        "Content-length: " . strlen($soap_request),
    );
    $soap_do = curl_init();
    curl_setopt($soap_do, CURLOPT_URL, "https://ws.seur.com/webseur/services/WSConsultaExpediciones");
    curl_setopt($soap_do, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($soap_do, CURLOPT_POST, true);
    curl_setopt($soap_do, CURLOPT_POSTFIELDS, $soap_request);
    curl_setopt($soap_do, CURLOPT_HTTPHEADER, $header);

    $result = (curl_exec($soap_do));
    $result = xml2array(trim($result), 0);
    echo "<pre>";
    print_r($result);
    echo "</pre>";
    die();