Howto reference Application Specific elements from client

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

 



Hi All,

I need my soap request to look like this:

<?xml version='1.0' encoding='UTF8'?><
soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";><soapenv:Body><tns:MyCall
xmlns:tns="my.sx"><tns:op>getMyInfo</tns:op><tns:args
/></tns:MyCall></soapenv:Body></soapenv:Envelope>

I
can connect to the server using

try
{
 $client = new SoapClient(null,
	array(
	'trace' 				=> $trace_on,
	'connection_timeout' 	=> 5,
	'soap_version'			=> SOAP_1_1,
	'exceptions'			=> 0,
	'location' 				=> $hostname,
	'uri' 					=> 'urn:MyURN',
	'style'  				=> SOAP_DOCUMENT,
	'use' 					=> SOAP_ENCODED
			));
}
catch (SoapFault $exception)
{
echo 'ERROR CreateSoapClient faultcode: ' . $exception->faultcode . 'faultstring: ' . $exception->faultstring . '<br>';
}
if ($trace_on == 1)
{
 echo 'CreateSoapClient<br>';
 viewArray($client);
}

But using $client->__soapCall, I don't know how to get the namespace "tns:MyCall" to show in the body. Also I need the two elements tns:op and tns:args to show, along with the actual variables (op is MyInfo in above example, args is null).

I think I need to override the __doRequest method, but I have not been able to get it to work.
Can anyone point me in the right direction?

Many thanks for taking a look! Any suggestions would be greatly appreciated.

best regards,
Bill

[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux