我需要使用PHP发送以下SOAP请求:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sup="url">
<soapenv:Header/>
<soapenv:Body>
<ControlledEnquiryRequest xmlns="url">
<Authentication>
<SubscriberDetails>
<Username>*****</Username>
<Password>***</Password>
</SubscriberDetails>
</Authentication>
<ControlledRequest>
<Asset>
<Name>Tranquility</Name>
</Asset>
<ParameterList/>
<PrimaryProduct>
<Code>Platinum</Code>
</PrimaryProduct>
</ControlledRequest>
</ControlledEnquiryRequest>
</soapenv:Body>
</soapenv:Envelope>
目前我已经:
$requestParams = array(
'CustomerCode' => '*****',
'Password' => '***'
);
$client = new SoapClient('url?wsdl');
$response = $client->ControlledEnquiryRequest($requestParams);
print_r($response);
但是我收到500错误。我也不确定如何通过其他名称和产品代码?
显然我使用的是实际网址,而不是“网址”。在Soap UI中,它得到了一个结果,但我无法理解它是否适应PHP。