Skip to content

Instantly share code, notes, and snippets.

@ederrafo
Created August 18, 2015 23:34
Show Gist options
  • Save ederrafo/7322c26033497e232dc1 to your computer and use it in GitHub Desktop.
Save ederrafo/7322c26033497e232dc1 to your computer and use it in GitHub Desktop.
<?php
$uri = 'http://75.101.154.44/webservice/server_general.php?WSDL';
$options = array('trace' => 1, 'compression' => SOAP_COMPRESSION_ACCEPT );
$_client = new soapclient($uri,$options);
$request = '
<User xsi:type="xsd:string">car/dgvp</User>
<Pwd xsi:type="xsd:string">anmhs/tzp</Pwd>
<ClienteID xsi:type="xsd:int">112</ClienteID>
<File_ID xsi:type="xsd:int">4223</File_ID>';
$body = new \SoapVar($request, XSD_ANYXML);
try{
$response = $_client->CancelationByFiles($body);
} catch (SoapFault $exception) {
echo "<strong>EXCEPTION=</strong>".$exception;
exit;
}
echo '<h2>Last request</h2><pre>' . htmlspecialchars($_client->__getLastRequest(), ENT_QUOTES). '</pre>';
echo '<h2>Request</h2><pre>' . htmlspecialchars($request, ENT_QUOTES). '</pre>';
echo '<h2>Response</h2><pre>';
print_r(htmlspecialchars($response, ENT_QUOTES)). '</pre>';
die();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment