我想使用下面的网络服务。
http://www.ttmarkaindirimi.com:8063/DiscountIntegrationPointService
$options = array(
'soap_version' => SOAP_1_1,
'exceptions' => true,
'trace' => 1,
'cache_wsdl' => WSDL_CACHE_NONE
);
$client = new SoapClient('http://212.175.9.207:8063/DiscountIntegrationPointService?wsdl',$options);
$validateData = array(
'Amount' => 1000,
'ApplicationId' => 6,
'ChannelID' => 5,
'CurrencyCode' => 949,
'Date' => '09.04.2013T12:00:00',
'DiscountCode' => 'XXX',
'EmailAddress' => 'YYY',
'Password' => 'ZZZ',
'RefCode' => 0,
'RewardID' => 1009
);
try {
$return = $client->DiscountCodeValidation($validateData);
//$return = $client->__soapCall('DiscountCodeValidation', array('DiscountCodeValidation' => $validateData));
} catch (SoapFault $exc) {
pre($exc->getMessage());
pre($client->__getLastRequestHeaders());
pre($client->__getLastRequest());
echo "Response:\n" . $client->__getLastResponse() . "\n";
}
但是没有要求。
我应该如何发送请求?
谢谢你。
这些是函数、响应和请求。
Array
(
[0] => DiscountCodeValidationResponse DiscountCodeValidation(DiscountCodeValidation $parameters)
[1] => DiscountCodeConfirmedResponse DiscountCodeConfirmed(DiscountCodeConfirmed $parameters)
[2] => DiscountCodeInquiryResponse DiscountCodeInquiry(DiscountCodeInquiry $parameters)
)
stdClass Object
(
[DiscountCodeValidationResult] => stdClass Object
(
[DiscountAmount] => 0
[DiscountRate] => 0
[ResponseCode] => 1
[ResponseMessage] => -
)
)
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://tempuri.org/"><SOAP-ENV:Body><ns1:DiscountCodeValidation/></SOAP-ENV:Body></SOAP-ENV:Envelope>
POST /DiscountIntegrationPointService/http HTTP/1.1 主机:212.175.9.207:8063 连接:Keep-Alive 用户代理:PHP-SOAP/5.3.17 内容类型:text/xml;charset=utf-8 SOAPAction:“ http://tempuri.org/IDiscountIntegrationPointService/DiscountCodeValidation ”内容长度:230
001- HTTP/1.1 200 OK 内容长度:537 内容类型:文本/xml;charset=utf-8 服务器:Microsoft-HTTPAPI/2.0 日期:2013 年 4 月 9 日星期二 21:50:54 GMT