我是Soap和WSDL的新手。我试图在PHP中使用Soap复制此示例事务。
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:open="http://example.com/">
<soapenv:Header/>
<soapenv:Body>
<open:processEvent>
<authenticationToken>
<userName>1</userName>
<password>password1234</password>
</authenticationToken>
<sourceThirdPartyId>1</sourceThirdPartyId>
<dealerEndpointId>4</dealerEndpointId>
<eventType>GetAdvisorConfig</eventType>
<payload></payload>
<payloadVersion>STAR-5.5.4</payloadVersion>
</open:processEvent>
</soapenv:Body>
</soapenv:Envelope>
到目前为止,我能够建立与soap服务器的连接,但我不确定如何插入所需的变量。
$soapClient = new SoapClient("https://example.com?wsdl", array('soap_version' => SOAP_1_2,'trace' => 1 ));
echo("\nDumping client object functions:\n");
var_dump($soapClient->__getFunctions());
$response = $soapClient->__soapCall("processEvent",array("processEvent"=>"GetAdvisorConfig"));
echo("\nReturning value of __soapCall() call: ".$response);