Java 消息上指定的SOAP操作&x27';,与HTTP SOAP操作不匹配&x27;https://cs.com/ICC2/GetServiceProduct'

Java 消息上指定的SOAP操作&x27';,与HTTP SOAP操作不匹配&x27;https://cs.com/ICC2/GetServiceProduct',java,web-services,soap,axis2,Java,Web Services,Soap,Axis2,我试图在java应用程序中使用客户机提供的web服务。我使用axis2-1.4.1从给定的WSDL生成存根类。但当我试图从存根类调用任何方法时,我得到以下错误。我是web服务新手,在过去的两天里一直在关注这个问题:-(非常感谢您的帮助 </s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header>

我试图在java应用程序中使用客户机提供的web服务。我使用axis2-1.4.1从给定的WSDL生成存根类。但当我试图从存根类调用任何方法时,我得到以下错误。我是web服务新手,在过去的两天里一直在关注这个问题:-(非常感谢您的帮助

</s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:a="http://www.w3.org/2005/08/addressing"><s:Header><a:Action s:mustUnderstand="1">http://www.w3.org/2005/08/addressing/fault</a:Action></s:Header><s:Body><s:Fault><s:Code><s:Value>s:Sender</s:Value><s:Subcode><s:Value>a:ActionMismatch</s:Value></s:Subcode></s:Code><s:Reason><s:Text xml:lang="en-US">**The SOAP action specified on the message, '', does not match the HTTP SOAP Action**, 'https://consumerconnectws.tui.transunion.com/ICC2/GetServiceProduct'. </s:Text></s:Reason><s:Detail><a:ProblemHeaderQName>a:Action</a:ProblemHeaderQName></s:Detail></s:Fault></s:Body></s:Envelope>"

Must Understand check failed for header http://www.w3.org/2005/08/addressing : Action
org.apache.axis2.AxisFault: Must Understand check failed for header http://www.w3.org/2005/08/addressing : Action
at org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:102)

web服务似乎不理解调用的操作
尝试下载服务的WSDL,并检查其中使用的名称空间是否与用于生成客户端的WSDL中使用的名称空间相同。

错误消息表明web服务具有服务调用未满足的
WS-Addressing
要求。
WS-Addressing
规范规定了一些属性但是允许web服务以传输机制不可知的方式运行的

使用以下代码片段在您的服务客户机上启用寻址模块

ServiceClient serviceClient = stub._getServiceClient(); //stub here refers to your generated connection stub
serviceClient.engageModule("addressing"); //throws an AxisFault if there's a problem

我尝试使用寻址模块,但出现错误-无法使用模块:addressing您缺少一些依赖项@sairam。请参阅下一步客户端跨多个合作伙伴(包括我们)共享此WSDL而且他们还没有收到任何投诉,所以很可能问题不在于名称空间,因为它可能会对每个人都造成影响。
ServiceClient serviceClient = stub._getServiceClient(); //stub here refers to your generated connection stub
serviceClient.engageModule("addressing"); //throws an AxisFault if there's a problem