Thank you for the quick response. Could you point me to an example of using JAXWS proxy-client's factory? Did you mean org.apache.cxf.jaxws.JaxWsProxyFactoryBean class?
Thanks, Giriraj. On Wed, Jul 16, 2014 at 5:55 PM, Jose María Zaragoza <[email protected]> wrote: > 2014-07-16 23:29 GMT+02:00 Giriraj Bhojak <[email protected]>: > > Hello, > > I have used Spring based configuration to define a jaxws client. > > The spring bean looks something on following lines: > > > > <jaxws:client id="id" > > serviceClass="SomeClass" address=someAddress> > > <jaxws:inInterceptors> > > <ref bean="inInterceptor" /> > > <bean > > class="org.apache.cxf.ws.security.wss4j.DefaultCryptoCoverageChecker" /> > > </jaxws:inInterceptors> > > <jaxws:outInterceptors> > > <ref bean="outInterceptor" /> > > </jaxws:outInterceptors> > > </jaxws:client> > > > > I need to use the same client definition for more than one client. I > don't > > see scope attribute in <jaxws:client> > > Is there a way to use same definition for multiple clients? > > Maybe you can have a look at: > http://cxf.apache.org/faq.html#FAQ-AreJAX-WSclientproxiesthreadsafe? > > > > > > Also, I am using <bean > > class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor" > as the out > > interceptor. > > There is a key 'encryptionUser' that can be used to provide user's name > for > > encryption. > > <entry key="encryptionUser" value="endPoint1" /> > > Is there a way I can use same bean definition of WSS4JOutInterceptor and > > specify different 'encryptionUser' for each invocation of the jaxws > client? > > > > Basically, I want to have a way to use same spring bean definitions to > call > > different web services endpoints. > > I'm not sure if it's a good idea. > Maybe you could use a JAXWS proxy-client's factory and set > interceptors for each proxy-client in runtime. > As every factory of objects, you could implement some kind of cache > > > > Could someone please help me with it? > > > > Thanks, > > Giriraj. >
