
The PHP SoapClient object has a _doRequest method, in which you can edit the XML.

In a normal case it is unnecessary to set a prefix for a namespace. You have to know, that the PHP SoapClient object nor the SoapVar object have a way to manually set a namespace prefix. Just do it for everey class member and you 'll get the expected result.įor advanced reason here 's an example how to change the prefix of the namespace.

$oEndUserRequest->compan圜ode = new SoapVar( Just encode your object as the follwing example shows. $res = $client->GetEndUsers($requestSoapVar) Įcho $client->_getLastResponseHeaders() Įvery member of your object must be a SoapVar object because there is a namespace for them. $requestSoapVar = new SoapVar($endUserRequest, SOAP_ENC_OBJECT,null,null,'EndUserRequest','') $endUserRequest->endUserName = 'Somename' $endUserRequest->customerNumber = '59471321' $endUserRequest->customerBranchNumber = '560'

"stream_context" => stream_context_create($streamContext), I'm New to webservices i'm trying to call webservice with soapClient() and it's generating Request XML which is not in expected formatīelow is XML Request generating by my code īelow is my code $client = new SoapClient('', array(
