SOAP client issue: < & > removed from XML payload
| From: | Stephen Gray | Date: | Wed, 07 Jan 2009 06:01:38 +0000 |
| Subject: | SOAP client issue: < & > removed from XML payload | ||
| Groups: | php.soap | ||
| Request: | Send a blank email to php-soap+get-2871@lists.php.net to get a copy of this message | ||
Hi everyone,
I've got a problem with a program using a PHP SOAP client that gets XML from a Perl SOAP server. The problem is that the angle brackets (< and
) are removed from the XML sent by the server by the SOAP client. I am sure this is a problem with the PHP client not the server, as when I replaced the PHP client with a Perl client the problem went away.The code for the PHP client is as follows: __START CODE__ <?php require_once 'SOAP/Client.php'; $endpoint = "http://localhost/cgi-bin/test.pl"; $soapoptions = array('namespace' => 'urn:Test', 'trace' => 1, 'timeout' => 600); $soapclient = new SOAP_Client($endpoint); $params = ""; $response = $soapclient->call('Main', $params, $soapoptions); ?> <html> <head> </head> <body> <p> <?php echo $response; ?> </p> </body> </html> __END CODE__ Just in case it's relevant the code for the Perl server is: __START CODE__ #!/usr/bin/perl -w use SOAP::Transport::HTTP; use Test; SOAP::Transport::HTTP::CGI -> dispatch_to('Test')
-> handle;
package Test;
sub Main {
return "<tag1><tag2>testing</tag2></tag1>";
}
__END CODE__
Does anyone have any idea what might be the problem? Any help much appreciated.
Thanks,
Steve Gray