In his blog, Edwin Biemond described how to build a asynchronous http web service in Java (Java code first then generate wsdl using JAX-WS).
Summary of the tricks:
• using annotation @OneWay() for asynchronous operation when you define your web service operation using @WebMethod().
• in de http request headers include ws-addressing wsa:MessageID (so that the recepient of the callback can correlate the callback reply message with the request message) and wsa:ReplyTo/wsa:Address (so that the asyn service knows to which url it has to send the callback reply)
• in de callback reply headers include ws-addressing wsa:RelatesTo, which has the same value with the request's MessageID (so that the recepient of the callback can correlate the callback reply message with the request message)
See also blogs compilation about messaging for integration: http://soa-java.blogspot.nl/2012/01/asynchronous-messaging-for-integration.html
Please share comment.
Source: Steve's blog http://soa-java.blogspot.com
References
A good overview for ws-addressing, ws-policy, ws-reliable messaging, SOA transactions, security
http://eaipatterns.com/
Hohpe's Enterprise Integration Patterns
No comments:
Post a Comment