You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Frizz <fr...@googlemail.com> on 2014/06/25 06:22:53 UTC
How to access jaxws:properties in a CXF Interceptor
I have defined a WS client in an XML file like this:
<beans ...
<jaxws:client name="{http://www.example.org/contract/DoubleIt
}DoubleItService">
<jaxws:properties>
<entry key="myKey" value="12345"/>
</jaxws:properties>
</jaxws:client>
</beans>
How can I access jaxws:properties in a CXF Interceptor?
I mean in the handleMessage() method, how do I get the <jaxws:client> ?
RE: How to access jaxws:properties in a CXF Interceptor
Posted by XiLai Dai <xl...@talend.com>.
Hi,
message.getContextualProperty("myKey")
will works for you.
Regards.
-----Original Message-----
From: Frizz [mailto:frizzthecat@googlemail.com]
Sent: Wednesday, June 25, 2014 12:23 PM
To: users@cxf.apache.org
Subject: How to access jaxws:properties in a CXF Interceptor
I have defined a WS client in an XML file like this:
<beans ...
<jaxws:client name="{http://www.example.org/contract/DoubleIt
}DoubleItService">
<jaxws:properties>
<entry key="myKey" value="12345"/>
</jaxws:properties>
</jaxws:client>
</beans>
How can I access jaxws:properties in a CXF Interceptor?
I mean in the handleMessage() method, how do I get the <jaxws:client> ?
RE: How to access jaxws:properties in a CXF Interceptor
Posted by Andrei Shakirin <as...@talend.com>.
Hi,
The easiest way is read these properties from message using org.apache.cxf.message.Message.getContextualProperty(String key) in your interceptor.
Method tries to get the property from message, client, endpoint, etc in determined order.
Regards,
Andrei.
> -----Original Message-----
> From: Frizz [mailto:frizzthecat@googlemail.com]
> Sent: Mittwoch, 25. Juni 2014 06:23
> To: users@cxf.apache.org
> Subject: How to access jaxws:properties in a CXF Interceptor
>
> I have defined a WS client in an XML file like this:
>
> <beans ...
> <jaxws:client name="{http://www.example.org/contract/DoubleIt
> }DoubleItService">
> <jaxws:properties>
> <entry key="myKey" value="12345"/>
> </jaxws:properties>
> </jaxws:client>
> </beans>
>
> How can I access jaxws:properties in a CXF Interceptor?
>
> I mean in the handleMessage() method, how do I get the <jaxws:client> ?