SOAP client issue: < & > removed from XML payload

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

 



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

--
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