MessageContext is utilized to get all sort of information connected with current SOAP ask. In JAX-WS, this how you can get MessageContext in your administration execution class:
On the off chance that you are speculation who set the WebServiceContext in our class, its runtime. Prior to the SOAP strategy is called. The runtime infuse the WebServiceContext distinguishing by @Resource comment. Furthermore, from this WebServiceContext, we get MessageContext.
@WebService public class TestingService { @Resource WebServiceContext wsc; @WebMethod public String sayHi(String name) { MessageContext mc = wsc.getMessageContext(); } }
On the off chance that you are speculation who set the WebServiceContext in our class, its runtime. Prior to the SOAP strategy is called. The runtime infuse the WebServiceContext distinguishing by @Resource comment. Furthermore, from this WebServiceContext, we get MessageContext.
No comments:
Post a Comment