1

I am trying to consume a web service provided by client in my java application. I used axis2-1.4.1 to generate the stub classes from the given WSDL. But when I am trying to call any of the methods from the stub class, I get below error. I am new to web service and stuck in this issue from last 2 days :-( Any help would be really appreciated.

</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)

When I checked the request headers in logs, I noticed the SOAP action is passed content type header like below. I tried same thing with version axis2-1.5.6 but no luck.

"Content-Type: application/soap+xml; charset=UTF-8; action="https://consumerconnectws.tui.transunion.com/ICC2/GetServiceProduct"[\r][\n]"
sairam
  • 11
  • 1
  • 3

2 Answers2

2

The error message indicates that the web service has a WS-Addressing requirement that your service call is not fulfilling. The WS-Addressing specification dictates some attributes that allows web services to operate in a transport mechanism-agnostic manner.

Engage the addressing module on your service client using the following snippet

ServiceClient serviceClient = stub._getServiceClient(); //stub here refers to your generated connection stub
serviceClient.engageModule("addressing"); //throws an AxisFault if there's a problem
kolossus
  • 20,559
  • 3
  • 52
  • 104
  • I tried engaging the addressing module but it gave me error - Unable to engage module : addressing – sairam Feb 03 '15 at 21:11
  • You are missing some dependencies @sairam. See [this question](http://stackoverflow.com/q/2526012/1530938) for the next steps – kolossus Feb 03 '15 at 21:22
0

It seems the web service does not understand the action called https://consumerconnectws.tui.transunion.com/ICC2/GetServiceProduct Try to download the WSDL of the service and check if the namespaces used therein are the same as in the WSDL you used to generate your client.

Rudi Angela
  • 1,463
  • 1
  • 12
  • 20
  • Client shared this WSDL across multiple partners (including us) and they didn't receive any complaint yet. So most likely the issue may not be with the namespaces as it could break for everybody. – sairam Feb 03 '15 at 21:13