如何从这个网站获取php中的soap数据 http://www2.rlcarriers.com/freight/shipping-resources/rate-quote-instructions
他们有“GetRateQuote(字符串APIKey,RequestObjects.RateQuoteRequest请求)” 这个函数如何从php soap
中调用它$ client = new SoapClient('http://api.rlcarriers.com/1.0.1/RateQuoteService.asmx?WSDL'); //的print_r($客户端); // $ result = $ client-> GetRateQuote('xxxxxxxxxxxxxxxxxxxxxx .......',);
的print_r($结果); ?> 我应该在第二个参数
中传递什么答案 0 :(得分:0)
尝试以下方法:
$client = new SoapClient("http://api.rlcarriers.com/1.0.1/ShipmentTracingService.asmx?WSDL", array("trace" => 1));
$request = array(
"APIKey" => "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"request" => array(
"TraceNumbers" => array(
0 => "xxxxxxxxx"
),
"TraceType" => "PRO",
"FormatResults" => "true",
"IncludeBlind" => "true",
"OutputFormat" => "Standard"
)
);
try {
$response = $client->TraceShipment($request);
print_r($response);
}
catch (SoapFault $exception) {
print_r($exception);
}