Member 14540553
Спасибо
он creado una solución para sabre a quien lo necesite.
//error_reporting(E_ALL);
//ini_set('display_errors', true);
//ini_set('display_startup_errors', true);
$test = '<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:eb="http://www.ebxml.org/namespaces/messageHeader" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Header>
<eb:MessageHeader SOAP-ENV:mustUnderstand="1" eb:version="1.0">
<eb:From>
<eb:PartyId>Client</eb:PartyId>
</eb:From>
<eb:To>
<eb:PartyId>SWS</eb:PartyId>
</eb:To>
<eb:CPAId>3D</eb:CPAId>
<eb:ConversationId>MyConversationID</eb:ConversationId>
<eb:Service>Service</eb:Service>
<eb:Action>getReservationRQ</eb:Action>
<eb:MessageData>
<eb:MessageId>{{msgID}}</eb:MessageId>
<eb:Timestamp>{{timestamp}}</eb:Timestamp>
</eb:MessageData>
</eb:MessageHeader>
<wsse:Security xmlns:wsse="http://schemas.xmlsoap.org/ws/2002/12/secext" xmlns:wsu="http://schemas.xmlsoap.org/ws/2002/12/utility">
<wsse:BinarySecurityToken>2992664818457740415!1227677!0!1!E2E-1</wsse:BinarySecurityToken>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns7:GetReservationRQ xmlns:ns7="http://webservices.sabre.com/pnrbuilder/v1_15" Version="1.15.0">
<ns7:Locator>JXJ</ns7:Locator>
<ns7:RequestType>Stateful</ns7:RequestType>
<ns7:ReturnOptions UnmaskCreditCard="true">
<ns7:SubjectAreas>
<ns7:SubjectArea>PRICING_INFORMATION</ns7:SubjectArea>
</ns7:SubjectAreas>
</ns7:ReturnOptions>
</ns7:GetReservationRQ>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>';
//Change this variables.
$location_URL = 'https://webservices.havail.sabre.com';
$action_URL = "http://webservices.sabre.com/pnrbuilder/v1_15";
$client = new SoapClient(null, array(
'location' => $location_URL,
'uri' => "",
'trace' => 1,
));
try{
$order_return = $client->__doRequest($test,$location_URL,$action_URL,1);
//Get response from here
echo "respuesta: <br>";
$search = array("soap-env:","eb:","stl15:");
$replace = array("","","");
$xml = str_replace($search, $replace, $order_return);
//echo htmlentities($newphrase); //con espacios
//echo htmlentities($order_return); //sin espacion
$xml = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA);
$array = json_decode(json_encode($xml), TRUE);
echo "<pre>";echo print_r($array);echo "
";
}catch (SoapFault $exception){
вложенностями(get_class($исключение));
вложенностями($исключение);
}