小编Sar*_*and的帖子

PHP SoapClient Cannot process the message because the content type 'text/xml;

I cannot connect to webservice and send/receive data

Error

HTTP,Cannot process the message because the content type 'text/xml; charset=utf-8' was not the expected type 'application/soap+xml; charset=utf-8'.

Code

    $parameters = [
        'UserName' => 12324,
        'Password' => 432123,
        'Bill_Id' => 153585611140,
        'Payment_Id' => 8560103,
    ];

    $url="https://bill.samanepay.com/CheckBill/BillStateService.svc?wsdl";
    $method = "VerifyBillPaymentWithAddData";

    $client = new SoapClient($url);

    try{

        $info = $client->__call($method, array($parameters));

    }catch (SoapFault $fault){  

        die($fault->faultcode.','.$fault->faultstring);

    }

Notice : not work Soap version 1,1 and other resolve sample for this error in stackoverflow.

php xml soap web-services soap-client

3
推荐指数
1
解决办法
6231
查看次数

标签 统计

php ×1

soap ×1

soap-client ×1

web-services ×1

xml ×1