0
我已經使用__soapcall()發送肥皂請求。使用__soapcall()的郵件正文的SOAP請求格式不正確PHP
$parameters = array(
'ID' => '0001',
'TimeStamp' => '2016-06-20T17:03:27Z',
'SenderID' => 'B2eww8',
);
$URL = 'https://example.com';
$client = new \SoapClient(null, array(
'location' => $URL,
'uri' => "http://example.com/SOAP/WSDL/abc.xsd",
'trace' => 1
));
$return = $client->__soapCall("TestSoapRequest", $parameters);
var_dump($return);
然後請求看起來像。
<SOAP-ENV:Body>
<ns1:TestSoapRequest>
<param0 xsi:type="xsd:string">0001</param2>
<param1 xsi:type="xsd:string">2016-06-20T17:03:27Z</param3>
<param2 xsi:type="xsd:string">B2eww8</param4>
</ns1:TestSoapRequest>
</SOAP-ENV:Body>
但所需的格式,
<soapenv:Body>
<ns1:TestSoapRequest xmlns:ns1="http://www.caqh.org/SOAP/WSDL/CORERule2.2.0.xsd">
<ID>0001</ID>
<TimeStamp>2014-05-22T17:03:27Z</TimeStamp>
<SenderID>B2eww8</SenderID>
</ns1:TestSoapRequest>
</soapenv:Body>
我怎樣才能實現這一目標。