Hi Prasad

Thanks for asking this question on the users list.
Typically the CXF code would use

Message.getContextualProperty(propertyName)

to check if a property has been set. I've looked at the code, the bus properties are being checked too.

You asked where it can be debugged, so I guess the best bet is to a breakpoint in Message.getContextualProperty but I guess only after the call reaches WSS4JInterceptor.

It appears a bus allocated to the endpoint is different to the one where the properties are set. If yes - you can have the endpoint linked to a specific bus id

Cheers, Sergey

On 19/02/15 09:46, psd wrote:
Hi,

I have many endpoints defined in my spring config & I needed to apply some
properties on each one of them, so I put them on bus, but it seems those
defined on bus are not available for some reason to the endpoints.

Here is my Bus configuration:
     <cxf:bus>
         <cxf:properties>
             <entry key="ws-security.enable.nonce.cache" value="false"/>
         </cxf:properties>
     </cxf:bus>

& here is one of the endpoint that I was testing:

        <jaxws:endpoint implementor="#ontServiceEntryPoint"
address="local://ontSoap" >
                <jaxws:inInterceptors>
                        <ref bean="ApiTokenSoapInterceptor" />
                        <ref bean="wss4jInterceptor" />
                        <ref bean="ApiContextSoapInterceptor" />
                </jaxws:inInterceptors>
                <jaxws:outFaultInterceptors>
                        <ref bean="ApiServiceOutFaultInterceptor" />
                </jaxws:outFaultInterceptors>
        </jaxws:endpoint>

I have to put
         <jaxws:properties>
             <entry key="ws-security.enable.nonce.cache" value="false"/>
         </jaxws:properties>
to make it work in endpoint.

Am I understanding it wrong way that properties defined on bus will by
default be available to all endpoints?

I'm using cxf version 3.0.2 (also tried same on latest 3.0.4) with WSS4j
2.0.2 (2.0.3 for cxf 3.0.4)

Thanks,
psd



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Properties-defined-on-Bus-are-not-available-on-Endpoints-tp5754469.html
Sent from the cxf-user mailing list archive at Nabble.com.


Reply via email to