'How to use WS-Addressing and get messageId
I'm stuck on WS-Addressing with Apache CXF. I tried everything I found on the Web but without good results. There are two applications, a server and a client, that communicate through WS-Addressing. What I want to do is to obtain the "messageId" field with the server, so I can output it on logs.
Can you help me, please? I tried two different solutions but without results
- Using EndpointImpl
public static void main(String[] args) {
ChangeStudentDetailsImpl implementor = new ChangeStudentDetailsImpl();
EndpointImpl ep = (EndpointImpl) Endpoint.create(implementor);
ep.getFeatures().add(new WSAddressingFeature());
ep.publish("http://localhost:8087/MidtermServer/Implementor");
}
- Using Apache CXF
I really don't understand how to get params passed using WS Addressing Feature, using a client application or SoapUI
Any help is appreciated
Solution 1:[1]
After some tests, I found I can use apache CXF and get the request through
@Resource
private WebServiceContext ctx;
...
ctx.getMessageContext(); //into the function called
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alessandro D'Orazio |
