SOAP-ERROR: Encoding: object has no 'xxxxx' property
Posted: Thu Nov 17, 2011 12:13 pm
Hi!
I am exploiting a WebService and having the following error message. I think that the problem is before I send the SOAP request, but I really don't know what's happening.
[text]Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no 'CheckIn' property in /var/www/html/geth.php:56 Stack trace: #0 /var/www/html/geth.php(56): SoapClient->__call('SearchH...', Array) #1 /var/www/html/geth.php(56): SoapClient->SearchH(Object(SimpleXMLElement)) #2 {main} thrown in /var/www/html/geth.php on line 56 [/text]
here's the whole code (url's have been edited for confidentiallity):
I am exploiting a WebService and having the following error message. I think that the problem is before I send the SOAP request, but I really don't know what's happening.
[text]Fatal error: Uncaught SoapFault exception: [Client] SOAP-ERROR: Encoding: object has no 'CheckIn' property in /var/www/html/geth.php:56 Stack trace: #0 /var/www/html/geth.php(56): SoapClient->__call('SearchH...', Array) #1 /var/www/html/geth.php(56): SoapClient->SearchH(Object(SimpleXMLElement)) #2 {main} thrown in /var/www/html/geth.php on line 56 [/text]
here's the whole code (url's have been edited for confidentiallity):
Code: Select all
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<?php
$soapClient = new SoapClient('http://demo2.com/wsV3/HotelFlow.svc?WSDL');
$cadena_XML = '
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:m0="http://schemas.remote.com/webservices/hotelv3">
<SOAP-ENV:Header>
<m:AuthenticationHeader xmlns:m="http://schemas.remote.com/webservices/authentication">
<m:LoginName>user</m:LoginName>
<m:Password>password</m:Password>
<m:Culture>en_US</m:Culture>
<m:Version8.5</m:Version>
</m:AuthenticationHeader>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<m:SearchH xmlns:m="http://remote.com/webservices/hotelv3">
<m:request>
<m0:HotelIdsInfo>
<m0:HotelIdInfo id="970"/>
</m0:HotelIdsInfo>
<m0:CheckIn>2011-12-13</m0:CheckIn>
<m0:CheckOut>2011-12-16</m0:CheckOut>
<m0:RoomsInformation>
<m0:RoomInfo>
<m0:AdultNum>1</m0:AdultNum>
<m0:ChildNum>0</m0:ChildNum>
<m0:ChildAges>
<m0:ChildAge age="0"/>
</m0:ChildAges>
</m0:RoomInfo>
</m0:RoomsInformation>
<m0:MaxPrice>0</m0:MaxPrice>
<m0:StarLevel>0</m0:StarLevel>
<m0:AvailableOnly>true</m0:AvailableOnly>
</m:request>
</m:SearchH>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
';
$xml = simplexml_load_string($cadena_XML);
$SearchHResponse = $soapClient->SearchH($xml);
echo '<br><br><B>RESPUESTA SearchH</B><br>' ;
print_r($SearchHResponse);
?>