With pure JAXWS/JAXB, the only ways to do it are:
1) Provider based service
2) Implement a SOAPMessageHandler (or LogicalHandler if all you need is
the logical parts) that stores the XML in the context with scope of
Application. You could then pick it up from the WebServiceContext.
With CXF, you MIGHT be able to just configure the SAAJInInterceptor and
then cast the WebServiceContext to the CXF implementation and dig into
it to find the SAAJ model. Haven't really tried that though.
Dan
On Tuesday 22 April 2008, Glen Mazza wrote:
> I believe the answer to my following question is "no", that I would
> need to use the JAX-WS provider interface[1] if I wanted to do this,
> but here goes:
>
> For a SEI implementation as [2] below, *within* the method
> doubleIt(BigInteger numberToDouble) {}, is there a way for me to
> retrieve the underlying XML that constitutes the SOAP request--all I
> really need is the SOAP request body because it's already in the XML
> format I need.
>
> (Note I think I'll probably still use the provider interface anyway, I
> would just like to know if I have that option using JAXB above.)
>
> Thanks,
> Glen
>
> [1] http://www.javapassion.com/handsonlabs/wsjaxwsadv/#Exercise_2
> [2] http://www.jroller.com/gmazza/date/20080417#WFstep6
--
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog