SOAP client issue: < & > removed from XML payload

[email protected] (Stephen Gray)
Newsgroups php.soap
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.