我无法使用php将我的数据发布到webservice

时间:2013-04-09 21:47:31

标签: php web-services soap

我想使用下面的网络服务。

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 连接:保持活力 用户代理:PHP-SOAP / 5.3.17 Content-Type:text / xml;字符集= utf-8的 SOAPAction:“http://tempuri.org/IDiscountIntegrationPointService/DiscountCodeValidation” 内容长度:230

001- HTTP / 1.1 200好的 内容长度:537 Content-Type:text / xml;字符集= utf-8的 服务器:Microsoft-HTTPAPI / 2.0 日期:星期二,2013年4月9日21:50:54 GMT

0 个答案:

没有答案