Re: [SOAP] PHP to Perl to PHP
| From: | Shane Caraveo | Date: | Wed, 11 Sep 2002 18:14:25 +0000 |
| Subject: | Re: [SOAP] PHP to Perl to PHP | ||
| References: | 1 | Groups: | php.soap |
| Request: | Send a blank email to php-soap+get-245@lists.php.net to get a copy of this message | ||
In PHP, after the request, do print $soapclient->wire; That will show the sent and received data. I'd need to see that to have any idea what is happening. But it might be:
$ret = $soapclient->call("sales",$namespace);
looks like it should be:
$ret = $soapclient->call("sales",NULL,$namespace);
The second parameter of 'call' is the arguments to the function, the third parameter is for an array of options, though it will accept a string for the namespace. So it could look like:
$ret = $soapclient->call("sales",NULL,array('namespace'=>$namespace));
Shane
Rudi Starcevic wrote:
Hello, I'm trying, getting close now, to use PHP to call from one of my SOAP Servers running under Perl. Sometimes I plan to use Perl as my SOAP server and sometime I'll use PHP/Apache as my SOAP server - it depends on the nature of the data and what task needs to be achieved. I getting this errror in my PHP and if you have time please take alot at my code. I'd love some feedback. Here is my PHP error: soap_fault Object ([error_message_prefix] => [mode] => [level] => 1024 [code] => HTTP [message] => Invalid HTTP Response [userinfo] => 1024 [callback] => )Here is my PHP client code : <?php include("SOAP/Client.php"); $soapclient = new SOAP_Client("http://central:10000"); $namespace = 'urn:data'; $ret = $soapclient->call("sales",$namespace); print_r($ret);echo "<br>\n"; ?> Here is some Perl client code ( it's very similar to PHP and works fine ): #!/usr/bin/perl -w use SOAP::Lite; my $remoteCall = SOAP::Lite -> uri('data') -> proxy('http://192.168.0.1:10000') -> sales(); print $remoteCall->result(); Finally here is my Perl SOAP server code: #!/usr/bin/perl -w use SOAP::Transport::HTTP; # don't want to die on 'Broken pipe' or Ctrl-C $SIG{PIPE} = $SIG{INT} = 'IGNORE'; my $daemon = SOAP::Transport::HTTP::Daemon -> new (LocalPort => 10000 , Reuse => 1) -> dispatch_to('/home/soaplite/modules');print "Contact to SOAP server at ", $daemon->url, "\n"; $daemon->handle; Can you see what's wrong with my PHP client code ? Any suggestion's for a fix ? Thanks for your time. Kind regards Rudi.