我决定在这里发表我自己的答案,因为我已经失去了同在这几小时内,我认为,尽管接受的答案非常好,并指出我的方向是正确的(是的,它得到了一个投票),但它不够详细,不足以解释我的应用程序出了什么问题,至少在我的情况。
我跑在OpenESB的2.2 BPEL模块和我复合应用程序的测试案例,下面的错误是失败:
Caused by: System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction: .
做一些研究之后,我已经注意到,外部WSDL具有所有线索我们需要解决这个问题,比如,我用下面的Web服务,通过Web服务的业务流程来验证信用卡号码: http://www.webservicex.net/CreditCard.asmx?WSDL
如果检查<wsdl:operation
元素,你会清楚地看到它说明该o的soapAction
peration:
<wsdl:binding name="CCCheckerSoap" type="tns:CCCheckerSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="ValidateCardNumber">
<soap:operation soapAction="http://www.webservicex.net/ValidateCardNumber" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
...
但是,一旦你创建复合应用程序,并建立与调用这个外部WSDL服务,出于某些原因,BPEL项目(?BUG),复合应用程序服务组装的XML(CASA)结合与空soapAction
参数生成:
<binding name="casaBinding1" type="ns:CCCheckerSoap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="ValidateCardNumber">
<soap:operation soapAction="" style="document"/>
<input>
<soap:body use="literal"/>
</input>
一旦你复制适当的soapAction(http://www.webservicex.net/ValidateCardNumber)到这个参数,应用程序的测试案例将正确并返回预期的肥皂响应。
<soap:operation soapAction="http://www.webservicex.net/ValidateCardNumber" style="document"/>
所以,这是一个更具体的解决方案,我决定基于本博客文章中的信息记录:http://bluebones.net/2003/07/server-did-not-recognize-http-header-soapaction/。
It means (at least in my case) that you are accessing a web service with SOAP and passing a SOAPAction parameter in the HTTP request that does not match what the service is expecting.
其他可以用来做同样事情的工具是Fiddler和/或SoapUI。 – 2010-10-12 22:44:19
我用这个方法(Fiddler),发现我打了一个我的web服务的旧版本,它没有包含我的新方法。我的Web.Config仍指向一个旧的服务器。布莱什。 – Suamere 2014-06-16 19:17:24