You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Appasamy Thirugnana <at...@sapient.com> on 2008/03/14 07:29:33 UTC
Must Understand check failed for header Exception
Hi,
In order to set soapenv:mustUnderstand="1"
I tried modifying the stub in my client the following manner while
adding header
if (messageHeader5 != null)
{
org.apache.axiom.om.OMElement omElementmessageHeader5 =
toOM(messageHeader5,
optimizeContent(
new javax.xml.namespace.QName(
"http://www.some.com/NewService.wsdl
<http://www.some.com/NewService.wsdl> ",
"Superset")));
addHeader(omElementmessageHeader5, env,true); ----->
Included the third parameter "true" to make mustUnderstand="1"
}
Now i am getting the evnevlope as expected with mustUnderstand="1"
but the request is not going out giving me the following exception
org.apache.axis2.AxisFault: Must Understand check failed for header
http://www.oasis-open.org/committees/ebxml-msg/schema/msg-header-2_0.xsd
: MessageHeader
at
org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(Utils.java
:486)
at
org.apache.axis2.description.OutInAxisOperationClient.handleResponse(Out
InAxisOperation.java:343)
at
org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOper
ation.java:389)
at
org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInA
xisOperation.java:211)
at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:163
)
at com.new.service.NewServiceStub.NewService(NewServiceStub.java:220)
at TestService1.main(TestService1.java:107)
I found that the soap header needs to be processed and its
"isProcessed" to be set to true to avoid excpetion
and I tried in stub with following code for processing the header which
is going out
Iterator it = env.getHeader().examineAllHeaderBlocks();
while(it.hasNext())
{
SOAPHeaderBlock headerBlock=
(SOAPHeaderBlock)it.next();
headerBlock.setProcessed();
System.out.println("Processed:->"+headerBlock.isProcessed()+""); --->Its
giving "true"
}
Still I am getting the error. Please tell me is there any other way to
get rid of this issue.
Thanks
Appu
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org