0

如果我没有摆脱这个错误。我该如何解决这个错误。

  $kPSServiceServis = new KPSServiceServis($wsdl);
    // sample call for KPSServiceServis::ServisUTCZamani()
    if($kPSServiceServis->ServisUTCZamani(new KPSTypeServisUTCZamani(/*** update parameters list ***/)))
        print_r($kPSServiceServis->getResult());
    else
        print_r($kPSServiceServis->getLastError());

错误消息(为便于阅读而包装):

Array ( [KPSServiceServis::ServisUTCZamani] => SoapFault Object (
    [message:protected] => Cannot process the message because the content type
                          'text/xml; charset=utf-8' was not the expected type
                          'application/soap+xml; charset=utf-8'.
    [string:Exception:private] => ......

] =>  rate:KPSWsdlClass:private] =>
[internArrayToIterateIsArray:KPSWsdlClass:private] =>
[internArrayToIterateOffset:KPSWsdlClass:private] => ) ) ) ) 
[previous:Exception:private] => [faultstring] =>
    Cannot process the message because the content type 'text/xml; charset=utf-8'
    was not the expected type 'application/soap+xml; charset=utf-8'.
[faultcode] => HTTP ) )
4

1 回答 1

1

c# 和 java 中给出的 web 服务代码。你以为是用c#写的一个win32控制台应用程序。

return shell_exec("KPS.exe" "username" "password" "parameters");    

KPS.exe你的用户名、密码,并给你结果,你根据参数取的结果会返回一个exe程序。

那么无论你使用这个应用程序,你都可以解析返回的值。

https://kps.saglik.gov.tr/ 链接已经存在的代码

于 2014-07-19T14:20:56.063 回答