You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi, vnodkmar,
Currently, the only method you can override when you impl your own EventHandler is :
public void handleEvent(Event event){...}
That means you can't manipulate the Message or SoapMessage directly, such as get a header element. the Event class has special structure but unfortunately it has no Header mapping information which you can get for now.
Offline

As a possible workaround, maybe you can create an interceptor which used get the header element and put it to the Message, then, sam-agent will get it and store into DB.
import org.talend.esb.sam.agent.message.CustomInfo;
public void handleMessage(Message message) throws Fault {
......
Header header = ((SoapMessage)message).getHeader(...);
Node key = (Node)header.getObject();
String value = headerNode.getTextContent();
CustomInfo customInfo = CustomInfo.getOrCreateCustomInfo(message);
customInfo.put(key, value);
message.put(CustomInfo.class, customInfo);
......
}
and add both your interceptor and sam-agent feature into jaxws:endpoint or jaxws:client like this:
<jaxws:interceptors>
your interceptor
<jaxws:interceptors>
<jaxws:features>
<ref bean="eventFeature"/>
</jaxws:features>
Didn't test hopefully this workaround will work ~
Offline
Pages: 1