Skip to content

Instantly share code, notes, and snippets.

@hvsombrilla
Created May 27, 2021 13:35
Show Gist options
  • Save hvsombrilla/7e1a0badcfda6c1643c19bff99a05a9a to your computer and use it in GitHub Desktop.
Save hvsombrilla/7e1a0badcfda6c1643c19bff99a05a9a to your computer and use it in GitHub Desktop.
Codigo Soap
<?php
$cliente = new SoapClient('http://30.10.99.50:81/WsConsumeQuote/Vehicle.asmx?wsdl', array("trace" => 1, "exception" => 1));
$header = new SoapHeader('http://tempuri.org/', 'Login',[
'User' => 'int13991',
'Password' => '#######'
]);
$cliente->__setSoapHeaders($header);
$resultado = $cliente->VehicleMakes(['User' => 'int13991']);
print_r($resultado);
print_r($cliente->__getLastRequest());
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/"><SOAP-ENV:Header><ns1:Login><ns1:User>int13991</ns1:User><ns1:Password>LAMISMADE365</ns1:Password></ns1:Login></SOAP-ENV:Header><SOAP-ENV:Body><ns1:VehicleMakes/></SOAP-ENV:Body></SOAP-ENV:Envelope>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment