You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Harish Kumar <ha...@yahoo.com> on 2013/09/24 21:54:12 UTC

Axis Fault: Must Understand check failed for header

Hi,

      I am using Axis2 1.5, to consume WCF service. Axis2 Client is based on java(1.7)
mentioned below sample code and Error. WCF Service is running in secure mode and i have generated
client stub directly from wcf url. I have also imported required certificate into client Keystore.

When i invoke operation on WCF service, i get error as org.apache.axis2.AxisFault: Must Understand check failed for header http://www.w3.org/2005/08/addressing : Action.

I googled and tried various solution but did not help. For Example tried following.
stub._getServiceClient().getServiceContext().getConfigurationContext().setProperty(AddressingConstants.ADD_MUST_UNDERSTAND_TO_ADDRESSING_HEADERS,
    Boolean.FALSE);

Can anyone suggest, how to fix it? 

Code

====       
System.setProperty("javax.net.ssl.keyStore", "C:\\Program Files (x86)\\Java\\jdk1.7.0\\jre\\lib\\security\\cacerts");
System.setProperty ("javax.net.ssl.keyStorePassword", "changeit");
System.setProperty("javax.net.ssl.keyStoreType", "jks");
System.setProperty("javax.net.ssl.trustStore","C:\\Program Files (x86)\\Java\\jdk1.7.0\\jre\\lib\\security\\cacerts");
System.setProperty("javax.net.ssl.trustStorePassword","changeit");
System.setProperty("javax.net.ssl.trustStoreType","jks");
   
SKMSSystemInfoServiceStub  stub = new SKMSSystemInfoServiceStub();
GetUtilitySecurityLevelInfoDocument utilDoc = GetUtilitySecurityLevelInfoDocument.Factory.newInstance();
GetUtilitySecurityLevelInfo  info = utilDoc.addNewGetUtilitySecurityLevelInfo();
GetUtilitySecurityLevelInfoRequest request = info.addNewRequest();
request.setUtilityCode("utc");
stub.getUtilitySecurityLevelInfo(utilDoc);

Error
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:105)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:171)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:364)
at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
at org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)


Thanks,
Harish

Re: Axis Fault: Must Understand check failed for header

Posted by Kishanthan Thangarajah <ks...@gmail.com>.
Can you try engaging the "addressing" module on the client side and try
again?

For example it can be done by the following code segment

ServiceClient serviceClient = stub._getServiceClient();
serviceClient.engageModule("addressing");

You need to have addressing module related libraries in your client class
path.


On Wed, Sep 25, 2013 at 1:24 AM, Harish Kumar <ha...@yahoo.com>wrote:

> Hi,
>
>       I am using Axis2 1.5, to consume WCF service. Axis2 Client is based
> on java(1.7)
> mentioned below sample code and Error. WCF Service is running in secure
> mode and i have generated
> client stub directly from wcf url. I have also imported required
> certificate into client Keystore.
>
> When i invoke operation on WCF service, i get error as org.apache.axis2.AxisFault:
> Must Understand check failed for header
> http://www.w3.org/2005/08/addressing : Action.
>
> I googled and tried various solution but did not help. For Example tried
> following.
>
> stub._getServiceClient().getServiceContext().getConfigurationContext().setProperty(AddressingConstants.ADD_MUST_UNDERSTAND_TO_ADDRESSING_HEADERS,
>      Boolean.FALSE);
>
> Can anyone suggest, how to fix it?
>
> Code
> ====
> System.setProperty("javax.net.ssl.keyStore", "C:\\Program Files
> (x86)\\Java\\jdk1.7.0\\jre\\lib\\security\\cacerts");
> System.setProperty ("javax.net.ssl.keyStorePassword", "changeit");
> System.setProperty("javax.net.ssl.keyStoreType", "jks");
>  System.setProperty("javax.net.ssl.trustStore","C:\\Program Files
> (x86)\\Java\\jdk1.7.0\\jre\\lib\\security\\cacerts");
> System.setProperty("javax.net.ssl.trustStorePassword","changeit");
> System.setProperty("javax.net.ssl.trustStoreType","jks");
>
> SKMSSystemInfoServiceStub  stub = new SKMSSystemInfoServiceStub();
>  GetUtilitySecurityLevelInfoDocument utilDoc =
> GetUtilitySecurityLevelInfoDocument.Factory.newInstance();
> GetUtilitySecurityLevelInfo  info =
> utilDoc.addNewGetUtilitySecurityLevelInfo();
> GetUtilitySecurityLevelInfoRequest request = info.addNewRequest();
> request.setUtilityCode("utc");
> stub.getUtilitySecurityLevelInfo(utilDoc);
>
> Error
> 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:105)
>  at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:171)
> at
> org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:364)
> at
> org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:421)
>  at
> org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:229)
>  at
> org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)
>
>
> Thanks,
> Harish
>