I tested it with a more recent version of CXF and it works fine. Did you try specifying an absolute path using something like: " file:/data/config.xml"?
Colm. On Fri, Oct 20, 2017 at 3:23 PM, [email protected] <[email protected]> wrote: > Colm, > > I used your suggestion and solved my problem. But I m running into a > similar > problem elsewhere where the resource file is not found by the > AbstractBindingBuilder class. Here is the exception: > > WARN [2017-10-20 12:56:45,022] org.apache.cxf.phase. > PhaseInterceptorChain: > Interceptor for > {http://EMVS.EU/20161/}Product#{http://EMVS.EU/20161/ > }ProcessProductMasterData > has thrown exception, unwinding now > ! org.apache.cxf.ws.policy.PolicyException: Could not find properties file > client/1080.1/encrypt.properties > ! at > org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder. > policyNotAsserted(AbstractBindingBuilder.java:315) > ! at > org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder. > getCrypto(AbstractBindingBuilder.java:1546) > ! at > org.apache.cxf.ws.security.wss4j.policyhandlers.AbstractBindingBuilder. > getEncryptionCrypto(AbstractBindingBuilder.java:1480) > ! at > org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler. > doEncryption(AsymmetricBindingHandler.java:418) > ! at > org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler. > doEncryptBeforeSign(AsymmetricBindingHandler.java:270) > ! at > org.apache.cxf.ws.security.wss4j.policyhandlers.AsymmetricBindingHandler. > handleBinding(AsymmetricBindingHandler.java:96) > ! at > org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$ > PolicyBasedWSS4JOutInterceptorInternal.handleMessage( > PolicyBasedWSS4JOutInterceptor.java:176) > ! at > org.apache.cxf.ws.security.wss4j.PolicyBasedWSS4JOutInterceptor$ > PolicyBasedWSS4JOutInterceptorInternal.handleMessage( > PolicyBasedWSS4JOutInterceptor.java:90) > ! at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept( > PhaseInterceptorChain.java:272) > ! at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:572) > ! at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:481) > ! at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382) > ! at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335) > ! at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) > ! at org.apache.cxf.jaxws.JaxWsClientProxy.invoke( > JaxWsClientProxy.java:136) > ! at com.sun.proxy.$Proxy103.processProductMasterData(Unknown Source) > > Im wondering if i could solve this in a similar way as overriding the > method > which loads the resource file to force it to load it from the file system. > > Here is the approach Im thinking: > In the stacktrace, I see *AbstractBindingBuilder* class has a method called > *getCrypto* which is the method that loads up the resource. I am thinking > of > overriding this. Any idea how to make use of this overridden class to > indicate PolicyBasedWSS4JOutInterceptor to make use of the overridden > class? > > > > -- > Sent from: http://cxf.547215.n5.nabble.com/cxf-user-f547216.html > -- Colm O hEigeartaigh Talend Community Coder http://coders.talend.com
