You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by joerobles820 <jo...@gmail.com> on 2014/03/21 22:16:22 UTC

Modifying PATH in CXF Message

Hi all,

How to modify /path/ information in org.apache.cxf.message.Message.

I got the /path/ info from the incoming message as shown below. Now I need
to set a part of the /path/ param with a new value and set it back to the
org.apache.cxf.message.Message. How do I do it?

*Message inMessage = message.getExchange().getInMessage();
pathInfo = ( String )inMessage.get( Message.PATH_INFO );*

I modified the pathinfo. I need to add it back to the inMessage.

Help is appreciated.

Thanks in adavance.



--
View this message in context: http://cxf.547215.n5.nabble.com/Modifying-PATH-in-CXF-Message-tp5741688.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Modifying PATH in CXF Message

Posted by joerobles820 <jo...@gmail.com>.
I am getting json request in pathinfo. I modified converted it to xml using
jason.org library. Now I want to pass it to my custom xsltinterceptor so it
can apply a xslt on this XML to create aother xml document.
I extending my inInterceptor extends from AbstractPhaseInterceptor<Message>.
In my custom class, I have the handle(Message). So basically I want to set
thepathInfo of the Message to the new pathInfo that has the xml creted from
json.


Hope this helps. 



--
View this message in context: http://cxf.547215.n5.nabble.com/Modifying-PATH-in-CXF-Message-tp5741688p5741699.html
Sent from the cxf-user mailing list archive at Nabble.com.

Re: Modifying PATH in CXF Message

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 21/03/14 21:16, joerobles820 wrote:
> Hi all,
>
> How to modify /path/ information in org.apache.cxf.message.Message.
>
> I got the /path/ info from the incoming message as shown below. Now I need
> to set a part of the /path/ param with a new value and set it back to the
> org.apache.cxf.message.Message. How do I do it?
>
> *Message inMessage = message.getExchange().getInMessage();
> pathInfo = ( String )inMessage.get( Message.PATH_INFO );*
>
> I modified the pathinfo. I need to add it back to the inMessage.
>
You can set it back using the same key. Why do you need to modify it ?
Sergey
> Help is appreciated.
>
> Thanks in adavance.
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Modifying-PATH-in-CXF-Message-tp5741688.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com