1

I am trying to set xsi:type and some attributes in the same request tag and send a php soap request. But, I am getting the following unmarshalling error. Can someone suggest a way to overcome this issue?

Soap Exception

Fatal error: Uncaught SoapFault exception: [soap:Client] Unmarshalling Error: unexpected element (uri:"", local:"_"). Expected elements are <{}iId>,<{}pId> in C:\wamp\www...

Soap Request:

<request xsi:type="ns1:PCType" xactionid="transactionid"> <pId>pId</pId> <iId>iId</iId> </request>

Code:

$request['_']['pId'] = 'pId';
$request['_']['iId'] = 'iId';

$request['xactionId'] = 'transactionid'; // it works when i comment this line :(

$request = new SoapVar($request, SOAP_ENC_OBJECT, "ns1:PCType", "" );
$r['request'] = $request;

$this->soapEnvelope = $r;

$apiResponse = $this->soapClient->__soapCall($this->apiFunc, $this->soapEnvelope, $this->soapHeader, array());
void
  • 881
  • 3
  • 20
  • 27

0 Answers0