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 Adela Ciobra <ac...@siapcn.it> on 2010/11/29 15:32:10 UTC

Re: [axis2-java] My own MustUnderstand.invoke for setting as processed the header block

Hello to all,

First, I'm Adela and I'm using axis2 Java, version 1.4.1.
I am dealing with consuming a web service from a supplier. 
They require in the message header mustUnderstand='1'. The problem is
that they send us in the message header the following error: 

"org.apache.axis2.AxisFault: Must Understand check failed for header
http://www.ebxml.org/namespaces/messageHeader : MessageHeader at
org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:102)"

So, to handle MustUnderstand and to avoid error, I created my own
method:

class MustUnderstarnd extends AbstractHandler{ public InvocationResponse
invoke() .. 

to set 'processed' the header block, so the checkMustUnderstand wouldn't
return an error.


I also added this lines inside my code:

ServiceStub stub = new ServiceStub( wsUrl );

AxisConfiguration conf=
stub._getServiceClient().getAxisConfiguration().getAxisConfiguration();

ArrayList<AbstractHandler> al = new ArrayList<AbstractHandler>();
al.add(new MustUnderstandHandler());
conf.setInPhasesUptoAndIncludingPostDispatch(al);                                                                                               

Also, as you can see from the attachment, I took data from the header
message response, because axis2 doesn't provide this info..

The problem is, using the method that is in attachment, for the second
request the envelope header is null. So the only solution that I found
until now is to restart the tomcat.. But this is not a very good
solution :D I think that this method is overwriting something, but as
much as debug I'm doing I can't figure out what..

Thanks for your time,
Adela

Re: [axis2-java] My own MustUnderstand.invoke for setting as processed the header block

Posted by Yo...@mizuhocbus.com.
Please check this out

http://wso2.org/library/tutorials/understand-famous-did-not-understand-mustunderstand-header-s-error

Regards
Yogesh Dhake 
Desk - 201 626 9623



Adela Ciobra <ac...@siapcn.it> 
12/03/2010 05:38 AM
Please respond to
java-user@axis.apache.org


To
java-user@axis.apache.org
cc
Bartolomeo Nicolotti SIAP <bn...@siapcn.it>, Livio Costamagna SIAP 
<lc...@siapcn.it>
Subject
Re: [axis2-java] My own MustUnderstand.invoke for setting as    processed 
the header block






Hello hello,
Can someone please answer to my question?

Thanks and regards,
Adela Ciobra

On Mon, 2010-11-29 at 16:32 +0200, Adela Ciobra wrote:
> Hello to all,
> 
> First, I'm Adela and I'm using axis2 Java, version 1.4.1.
> I am dealing with consuming a web service from a supplier. 
> They require in the message header mustUnderstand='1'. The problem is
> that they send us in the message header the following error: 
> 
> "org.apache.axis2.AxisFault: Must Understand check failed for header
> http://www.ebxml.org/namespaces/messageHeader : MessageHeader at
> 
org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:102)"
> 
> So, to handle MustUnderstand and to avoid error, I created my own
> method:
> 
> class MustUnderstarnd extends AbstractHandler{ public InvocationResponse
> invoke() .. 
> 
> to set 'processed' the header block, so the checkMustUnderstand wouldn't
> return an error.
> 
> 
> I also added this lines inside my code:
> 
> ServiceStub stub = new ServiceStub( wsUrl );
> 
> AxisConfiguration conf=
> stub._getServiceClient().getAxisConfiguration().getAxisConfiguration();
> 
> ArrayList<AbstractHandler> al = new ArrayList<AbstractHandler>();
> al.add(new MustUnderstandHandler());
> conf.setInPhasesUptoAndIncludingPostDispatch(al);     
> 
> Also, as you can see from the attachment, I took data from the header
> message response, because axis2 doesn't provide this info..
> 
> The problem is, using the method that is in attachment, for the second
> request the envelope header is null. So the only solution that I found
> until now is to restart the tomcat.. But this is not a very good
> solution :D I think that this method is overwriting something, but as
> much as debug I'm doing I can't figure out what..
> 
> Thanks for your time,
> Adela
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org



======================================================================================================
This transmittal and any attachments may contain confidential, privileged or sensitive information and is solely for the use of the intended recipient. If you are not the intended recipient, you are hereby notified that you have received this transmittal and any attachments in error and any review, dissemination, distribution or copying thereof is strictly prohibited. If you have received this transmittal and any attachments in error please notify the sender and immediately destroy the message and all its attachments. Any opinions herein expressed may be those of the author and not necessarily of Mizuho Corporate Bank, Ltd., Mizuho Corporate Bank (USA), Mizuho Securities USA Inc. or any other affiliates of Mizuho Financial Group ("Mizuho"). Mizuho accepts no responsibility for the accuracy or completeness of any information herein contained.
E-Mail received by or sent from officer of Mizuho Securities USA Inc. (which is a registered U.S. broker-dealer and the entity through which Mizuho generally conducts its investment banking, capital markets, and securities business in the United States) is electronically archived and recorded and is subject to review and monitoring by and/or disclosure to persons other than the recipient, including (but not limited to) Mizuho Securities USA Inc. supervisory personnel. Such communications may be produced to regulatory authorities or others with legal rights to the information.
If you have any questions, or if you no longer wish to receive e-mail in accordance with Japanese Act on Regulation of the Transmission of Specified Electronic Mail, please contact the sender of this e-mail.
お問い合わせまたは特定電子メール法に 基づく送信停止のご要望等は、本電子メールの送信者にその旨ご連絡ください。



Re: [axis2-java] My own MustUnderstand.invoke for setting as processed the header block

Posted by Adela Ciobra <ac...@siapcn.it>.
Hello hello,
Can someone please answer to my question?

Thanks and regards,
Adela Ciobra

On Mon, 2010-11-29 at 16:32 +0200, Adela Ciobra wrote:
> Hello to all,
> 
> First, I'm Adela and I'm using axis2 Java, version 1.4.1.
> I am dealing with consuming a web service from a supplier. 
> They require in the message header mustUnderstand='1'. The problem is
> that they send us in the message header the following error: 
> 
> "org.apache.axis2.AxisFault: Must Understand check failed for header
> http://www.ebxml.org/namespaces/messageHeader : MessageHeader at
> org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:102)"
> 
> So, to handle MustUnderstand and to avoid error, I created my own
> method:
> 
> class MustUnderstarnd extends AbstractHandler{ public InvocationResponse
> invoke() .. 
> 
> to set 'processed' the header block, so the checkMustUnderstand wouldn't
> return an error.
> 
> 
> I also added this lines inside my code:
> 
> ServiceStub stub = new ServiceStub( wsUrl );
> 
> AxisConfiguration conf=
> stub._getServiceClient().getAxisConfiguration().getAxisConfiguration();
> 
> ArrayList<AbstractHandler> al = new ArrayList<AbstractHandler>();
> al.add(new MustUnderstandHandler());
> conf.setInPhasesUptoAndIncludingPostDispatch(al);                                                                                               
> 
> Also, as you can see from the attachment, I took data from the header
> message response, because axis2 doesn't provide this info..
> 
> The problem is, using the method that is in attachment, for the second
> request the envelope header is null. So the only solution that I found
> until now is to restart the tomcat.. But this is not a very good
> solution :D I think that this method is overwriting something, but as
> much as debug I'm doing I can't figure out what..
> 
> Thanks for your time,
> Adela
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org