axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adela Ciobra <acio...@siapcn.it>
Subject Re: [axis2-java] My own MustUnderstand.invoke for setting as processed the header block
Date Mon, 29 Nov 2010 14:32:10 GMT
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

Mime
View raw message