|
Posted by Michel Albert on 01/01/08 16:34
On Dec 27 2007, 10:07 pm, Michel Albert <exh...@gmail.com> wrote:
> I just run into a brick wall..... I wrote a soap-client in PHP5 and it
> all worked well, so I promised I could get it all wrapped up on time
> for the 1st of January. Now, on the deployment site, I have a machine
> which still runs on PHP4 (migrations are en-route, but will take some
> more time).
>
> The code in PHP5:
>
> --------------------
> ini_set("soap.wsdl_cache_enabled", 0);
> $client = new SoapClient('http://event_server:8080/wsevents/soap/
> api.wsdl');
> $res = $client->getHTMLTable(
> array(
> "user"=>$user,
> "key"=>$key,
> "date_from" => "2007-01-01T00:00:00",
> "date_to" => "2009-01-01T00:00:00",
> "types" => array(),
> "in_title" => '',
> "virtual_region" => -1,
> "thumbnail_size" => 96)
> );
> print_r($res);
> ----------------------
>
> This works all fine. Now, the same with PHP4 and Pear::SOAP
>
> ----------------------
> $endpoint = 'http://event_server:8080/wsevents/soap/api.wsdl';
> $eventService = new SOAP_Client($endpoint);
> $method = 'getHTMLTable';
> $params = array(
> 'user' => $user,
> 'key' => $key,
> 'virtual_region' => -1,
> 'in_title' => $title_search,
> 'date_from' => '2006-01-01T00:00:00',
> 'date_to' => '2009-01-01T00:00:00',
> 'types' => $types,
> 'thumbnail_size' => $thumbSize,
> );
> $table = $eventService->call($method, $params);
> ----------------------
>
> Now, the very weird thing (for me) is, that I get a SOAP_Fault object
> back which contains in it's "message" attribute the correct envelope
> (as far as I can tell). Yes, the "a test with 30 events" is the
> correct message (for now).
>
> What am I missing!?!?
>
> I am a bit shocked by this, as it should all work quite nicely. And I
> need it to work this weekend :(
> Is it something with the
> xmlns="http://event_server:8080/wsevents/soap/types"
> namespace? --- I am still quite new to SOAP...
> -------------------------
> soap_fault Object
> (
> [error_message_prefix] =>
> [mode] => 1
> [level] => 1024
> [code] => HTTP
> [message] => <soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/
> XMLSchema" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://
> event_server:8080/wsevents/soap/types">
> <soapenv:Body>
> <getHTMLTableResponse><result xsi:type="xsd:string">
> a test with 30 events
> </result></getHTMLTableResponse>
> </soapenv:Body>
> </soapenv:Envelope>
> [userinfo] =>
> [backtrace] => Array
> (
> ...
> ...
> ---------------------------------
anyone?
[Back to original message]
|