Hi

On Wed, Sep 22, 2010 at 8:22 PM, Puro, Jeff (HBO-NS) <[email protected]>wrote:

> I am attempting to create a Provider that implements the MessageBodyWriter
> interface.  I would like my provider to use XStream to convert the passed in
> object to XML and then perform an XSLT transformation on the xml before
> writing the results to the OutputStream.  This is easy enough to do, but I
> would also like to be able to pass in additional parameters relating to the
> request and perhaps anything else as it relates to the CXF message exchange.
>  Is there any way to do this?  It seems that the method signature for the
> writeTo method does not provide a way to access the request etc...
>
>
You can have

@Context HttpServletRequest request;
@Context UriInfo info;
@Context HttpHeaders headers;

injected into the provider. You might want to have CXF specific
MessageContext injected - which will let you get to all of the above
contexts

cheers, Sergey


> Regards,
>
> Jeff
>
> ---------------------------------------------------------------------
> This e-mail is intended only for the use of the addressees.  Any copying,
> forwarding, printing or other use of this e-mail by persons other than the
> addressees is not authorized.  This e-mail may contain information that is
> privileged, confidential and exempt from disclosure. If you are not the
> intended recipient, please notify us immediately by return e-mail (including
> the original message in your reply) and then delete and discard all copies
> of the e-mail.
>
> Thank you.
>
> ---------------------------------------------------------------------
>
>

Reply via email to