Hello,
I have a problem with a soap request using nusoap. I tried to make it via the nusoap wizard but it was not working, too.
The url to the wsdl is : http://myserver/hotels/wsdl/hotelservice200616.wsdl
Thats what I am doing at the moment:
// set the URL or path to the WSDL document
$wsdl = "http://myserver/hotels/wsdl/hotelservice200616.wsdl";
// instantiate the SOAP client object
$soap = new soapclient($wsdl,"wsdl");
// get the SOAP proxy object, which allows you to call the methods directly
$proxy = $soap->getProxy();
$parameters['request']['cid'] = "xxxxx";
$parameters['request']['currencyCode'] = "";
$parameters['request']['address'] = "";
$parameters['request']['postalCode'] = "";
$parameters['request']['city'] = "";
$parameters['request']['stateProvince'] = "";
$parameters['request']['country'] = "";
$parameters['request']['destinationId'] = "";
$parameters['request']['arrivalDate'] = "";
$parameters['request']['departureDate'] = "";
$parameters['request']['rooms'] = array('room'=>array('numberOfAdults'=>2);
$parameters['request']['numberOfBedrooms'] = "";
$parameters['request']['numberOfResults'] = "";
$parameters['request']['propertyType'] = "";
$parameters['request']['propertyName'] = "";
$parameters['request']['minStarRating'] = "";
$parameters['request']['amenities'] = "";
$parameters['request']['latitude'] = "";
$parameters['request']['longitude'] = "";
$parameters['request']['searchRadius'] = "";
$parameters['request']['searchRadiusUnit'] = "";
$parameters['request']['cacheKey'] = "";
$parameters['request']['cacheLocation'] = "";
$parameters['request']['hotelIdList'] = "";
$parameters['request']['sortMethod'] = "";
$parameters['request']['showSoldout'] = "";
$parameters['request']['completeHcomAvail'] = "";
$result = $soap->call("getCityAvailability", $parameters);
if($error = $soap->getError()){ die($error);}
print "<pre>";
print_r ($result);
print "</pre>";
|
The message I will get after the request is:
Quote: |
soapenv:Server.userException: org.xml.sax.SAXException: Could not set Class com.travelnow.ui.bean.hotel.RoomGroup Field rooms to value null - Exception null |
The problem is "$parameters['request']['rooms']".
I tried different things but nothing works. The phped nusoap-wizard canĀ“t work with complex types.
Maybe someone can help.
Sorry for my bad English.
Regards
Ronny