1

I have an EJB3 stateless session bean providing JAX-WS webservice on WebLogic 10.3.5

@WebService
@Stateless
public class DocumentService {
  @Resource
  WebServiceContext wsctx;

  ...
 }

I would have to store the whole SOAP requests for later use in the database. All I could find on this topic is that I can get the message with the

SOAPMessageContext.getMessageContext().

method. However it seems that the MessageContext which can be aquired with wsctx.getMessageContext() is not a SOAPMessageContext in weblogic.

Is there a way to get the xml message from the request?

Thanks in advance! Gábor

pentike
  • 418
  • 4
  • 14
  • I think what you need to access is something like mentioned [here](http://stackoverflow.com/questions/9121129). In particular have a look at [handler-chains](http://docs.oracle.com/cd/E15051_01/wls/docs103/webserv_adv/handlers.html) (there are [examples](http://stackoverflow.com/a/6345152/267197) on this forum as well). – dma_k Feb 20 '12 at 19:00
  • Thanks! It works. One thing to pay attention regarding handler chains is that the `handler-chain.xml` is relative to the annotated JWS file. It is in the documentation, but I missed it first and took some time to figure out the problem since there was no error message indicating the config file was not found. – pentike Feb 21 '12 at 10:22

0 Answers0