Re: SOAP structs help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Still nothing.

My current output:
Notice: SOAP Error: Object id #2 in /Users/gsm/Sites/ii/dolihd/mvc/models/soapTest.php on line 10



Here are the current files I am working with:
testClient.php:
<?php
error_reporting(E_ALL);
$client = new SoapClient("http://fuji.local/~gsm/ii/dolihd-bookingServer/public/ booking2.wsdl");
$client->__getFunctions();
$client->__getTypes();
try {
$client->getBookings('2005-04-13', '2005-04-14', 5);
} catch (SoapFault $exception){
//print_r($client->__getLastRequest());
trigger_error("SOAP Error: ".$exception);
print_r($client->__getLastRequest());
}
//print_r($client->__getLastRequest());
?>


testSoap.php (my server):
<?php
function getBookings ($startDate, $endDate, $maxAppointments, $zipCode){
	return array ('2005-12-12', 2, array ());	
}

ini_set("soap.wsdl_cache_enabled", "0"); // disabling WSDL cache
$server = new SoapServer("http://fuji.local/~gsm/ii/dolihd-bookingServer/public/ booking2.wsdl");
$server->addFunction("getBookings");
$server->handle();
?>


booking2.wsdl:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; xmlns:wsdl="http://www.w3.org/2001/XMLSchema"; xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:book="http://new.webservice.namespace"; targetNamespace="http://new.webservice.namespace";>
<types>
<wsdl:schema elementFormDefault="qualified" targetNamespace="http://new.webservice.namespace";>
<wsdl:element name="skillSet">
<wsdl:complexType>
<wsdl:sequence>
<wsdl:element minOccurs="1" maxOccurs="1" name="skill" type="wsdl:int"/>
</wsdl:sequence>
</wsdl:complexType>
</wsdl:element>
<wsdl:element name="BookOptionStruct">
<wsdl:complexType>
<wsdl:sequence>
<wsdl:element minOccurs="1" maxOccurs="1" name="bookId" type="wsdl:int"/>
<wsdl:element minOccurs="1" maxOccurs="1" name="techId" type="wsdl:int"/>
<wsdl:element minOccurs="1" maxOccurs="1" name="date" type="wsdl:string"/>
<wsdl:element minOccurs="1" maxOccurs="1" name="timeband" type="wsdl:string"/>
</wsdl:sequence>
</wsdl:complexType>
</wsdl:element>
<wsdl:element name="BookException">
<wsdl:complexType>
<wsdl:sequence>
<wsdl:element minOccurs="1" maxOccurs="1" name="bookId" type="wsdl:int"/>
<wsdl:element minOccurs="1" maxOccurs="1" name="techId" type="wsdl:int"/>
<wsdl:element minOccurs="1" maxOccurs="1" name="date" type="wsdl:string"/>
<wsdl:element minOccurs="1" maxOccurs="1" name="timeband" type="wsdl:string"/>
</wsdl:sequence>
</wsdl:complexType>
</wsdl:element>
<wsdl:element name="BookSenderObject">
<wsdl:complexType>
<wsdl:sequence>
<wsdl:element name="startDate" type="wsdl:string" minOccurs="1" maxOccurs="1"/>
<wsdl:element name="endDate" type="wsdl:string" minOccurs="1" maxOccurs="1"/>
<wsdl:element name="maxAppointments" type="wsdl:int" minOccurs="1" maxOccurs="1"/>
<wsdl:element name="zipCode" type="wsdl:int" minOccurs="1" maxOccurs="1"/>
</wsdl:sequence>
</wsdl:complexType>
</wsdl:element>
</wsdl:schema>
</types>
<message name="getBookingsRequest">
<part name="startDate" type="wsdl:string"/>
<part name="endDate" type="wsdl:string"/>
<part name="max" type="wsdl:int"/>
<part name="zipCode" type="wsdl:int"/>
</message>
<message name="getBookingsResponse">
<part name="transactionExpiry" type="wsdl:string"/>
<part name="transactionId" type="wsdl:string"/>
<part name="bookingOptions" element="book:BookOptionStruct"/>
</message>
<message name="getBookingsException">
<part name="exception" element="book:BookException"/>
</message>
<portType name="BookingPortType">
<operation name="getBookings">
<input message="book:getBookingsRequest"/>
<output message="book:getBookingsResponse"/>
<fault name="bookingException" message="book:getBookingsException"/>
</operation>
</portType>
<binding style="rpc" name="BookingBinding" type="book:BookingPortType" transport="http://schemas.xmlsoap.org/soap/http";>
<operation name="getBookings" soapAction="urn:xmethods-delayed-quotes#getBookings">
<input>
<documentation>Retreive a set of available bookings.</documentation>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:xmethods-delayed-quotes"/>
</input>
<output>
<documentation>Sends a set of results back, or an exception.</documentation>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:xmethods-delayed-quotes"/>
</output>
<fault name="bookingException">
<documentation>Reason for failure.</documentation>
<soap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"; namespace="urn:xmethods-delayed-quotes"/>
</fault>
</operation>
</binding>
<service name="BookingService">
<port name="BookingPort" binding="book:BookingBinding">
<soap:address location="http://fuji.local/~gsm/ii/dolihd-bookingServer/public/ testSoap.php"/>
</port>
</service>
</definitions>




On Apr 20, 2005, at 13:07, George Schlossnagle wrote:

Try it in the catch block.



On Apr 20, 2005, at 1:03 PM, Greg Militello wrote:


I get nothing. The only output from my client.php script is:


Notice: SOAP Error: Object id #2

That is from my call to $client->getBookings();

<?php
$client = new SoapClient(BOOKING_SERVICE_BASE_URI."booking2.wsdl");

try {
	$client->getBookings('2005-04-13', '2005-04-14', 5, 14221);
} catch (SoapFault $exception){
	trigger_error("SOAP Error: ".$exception);
}
print_r($client->__getLastRequest());
?>

The script doesn't stop executing after the try, but $client->__getLastRequest() has no value.

-Greg


On Apr 20, 2005, at 12:37, George Schlossnagle wrote:


On Apr 20, 2005, at 12:18 PM, Greg Militello wrote:

I guess attachment don't work on this list so my WSDL isn't out there yet. Here it is:

and the output of __getLastRequest()?

George

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



George Schlossnagle

-- Prinicipal Consultant
-- OmniTI Computer Consulting
-- http://www.omniti.com

--
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


-- PHP Soap Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux