首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何将soap客户端配置为使用wshttpbinding的WCF服务?

如何将soap客户端配置为使用wshttpbinding的WCF服务?
EN

Stack Overflow用户
提问于 2011-11-30 23:49:05
回答 1查看 1K关注 0票数 1

我有一个soap客户端正在使用wcf服务。我在basichttpbinding上测试了所有内容,它运行得很好。当我将绑定切换到wshttpbinding时:

代码语言:javascript
复制
<endpoint binding="wsHttpBinding" bindingConfiguration="customWsBinding"
          contract="LogisticServiceLibrary.ILogisticService" />

并将soap版本更改为使用1.2:

代码语言:javascript
复制
$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个坏请求..。知道怎么回事吗?

EN

回答 1

Stack Overflow用户

发布于 2011-12-01 01:30:31

使用WSHttpBinding要求客户端讲SOAP1.2,并理解ws-寻址、ws-reliablemessaging、ws-security、ws-policy和ws-policy断言。我怀疑SOAP::Lite理解其中的任何一种,因此出现了"Lite“术语。BasicHttpBinding是非常基本的,就像SOAP::Lite :)

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8334734

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档