Jump to content

Web Services (rpc/literal) - wrong parameter packaging


Recommended Posts

Hey,

 

I'm trying to build a PHP Web Services client that uses the rpc/literal standard. The problem is, that the envelope it sends to the server is different to what it should send.

 

What it should send:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
	<authenticate xmlns="services.core.err.de">
		<username>server</username>
		<password>server</password>
	</authenticate>
</soapenv:Body>
</soapenv:Envelope>

 

What it actually sends:

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://www.w3.org/2003/05/soap-envelope"
xmlns:ns1="services.core.err.de">
<env:Body>
	<ns1:authenticate>
		<param0>server</param0>
		<param1>server</param1>
	</ns1:authenticate>
</env:Body>
</env:Envelope>

 

My code:

$client_options = array('location' => 'http://www.localhost:8080/Authentication',
		'uri'      => 'services.core.err.de',
		'style' => SOAP_RPC,
		'use' => SOAP_LITERAL);
$client = new SoapClient(null,
	$client_options);

$call_function = 'authenticate';
$call_params = array('username'=>'server', 'password'=>'server');
$result = $client->__soapCall($call_function,
			$call_params);

 

Any idea why my code is producing the wrong envelopes?

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.