我有一个soap客户端正在使用wcf服务。我在basichttpbinding上测试了所有内容,它运行得很好。当我将绑定切换到wshttpbinding时:
<endpoint binding="wsHttpBinding" bindingConfiguration="customWsBinding"
contract="LogisticServiceLibrary.ILogisticService" />并将soap版本更改为使用1.2:
$client = SOAP::Lite
->proxy($endpoint)
->soapversion('1.2');然后给出一个错误,下面是SOAPUI的输出:
Wed 11月30日18:36:14 EST 2011:DEBUG:>> "POST /LogisticService“
HTTP/1.1\r“Wed Nov 30 18:36:14 EST 2011:DEBUG:>> "TE:
美国东部时间11月30日18:36:14 gzip;q=0.3\r
连接: TE,close\r“Wed 11月30日18:36:14 EST 2011:DEBUG:>>
“接受: text/xml\r”Wed 11月30日18:36:14 EST 2011:DEBUG:>>
“接受:多部分/*\r”美国东部时间11月30日18:36:14 2011:DEBUG:>>
“接受:申请/肥皂\r”Wed 11月30日18:36:14东部时间
2011:DEBUG:>>“用户代理: SOAP::Lite/Perl/0.712\r”
18:36:14 EST 2011:DEBUG:>>“内容-长度: 49496\r”
18:36:14 EST 2011:DEBUG:>>“内容-类型:应用程序/soap+xml;
charset=utf-8\r“Wed 11月30日18:36:14 EST 2011:DEBUG:>>
"SOAPAction:http://tempuri.org/ILogisticService/IssueOrder[\r][\n]“
英国东部时间11月30日18:36:14 2011:DEBUG:>>“主机:本地主机:8008\r”
美国东部时间11月30日18:36:14 2011:DEBUG:>> "\r“11月30日18:36:14
EST 2011:DEBUG:>>“xmlns:namesp1=”http://namespaces.soaplite.com/perl
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance“
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/“
xmlns:xsd="http://www.w3.org/2001/XMLSchema“
soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/“
xmlns:soap="">http://schemas.xmlsoap.org/soap/envelope/"> xmlns="">http://tempuri.org/"> xmlns:i="http://www.w3.org/2001/XMLSchema-instance“xmlns=”
xmlns:a="http://schemas.datacontract.org/2004/07/LogisticServiceLibrary“
星期三11月30日18:36:14 2011:DEBUG:<< "HTTP/1.1 400坏“
请求\r“Wed 11月30日18:36:14 EST 2011:DEBUG:<< "HTTP/1.1 400
坏请求\r“美国东部时间11月30日18:36:14 2011:DEBUG:<<
“内容长度: 0\r”美国东部时间11月30日18:36:14 2011:DEBUG:<<
“服务器:Microsoft/1.0\r”Wed 11月30日18:36:14
2011:DEBUG:<<“日期:2011年11月30日,星期三23:36:14格林尼治标准时间
18:36:14东部时间2011:DEBUG:<< "\r“
上面写着400个坏请求..。知道怎么回事吗?
发布于 2011-12-01 01:30:31
使用WSHttpBinding要求客户端讲SOAP1.2,并理解ws-寻址、ws-reliablemessaging、ws-security、ws-policy和ws-policy断言。我怀疑SOAP::Lite理解其中的任何一种,因此出现了"Lite“术语。BasicHttpBinding是非常基本的,就像SOAP::Lite :)
https://stackoverflow.com/questions/8334734
复制相似问题