On Wednesday 25 August 2010 7:05:01 am vijayvaleti wrote:
> Hi Dan,
> 
> It is working for me after including following import statements in my
> client config file.
>              <import resource="classpath:META-INF/cxf/cxf.xml" />
>       <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
>       <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
> 
> Could you please explain me why we need to add the above imports?

When you don't use the imports, when a Bus is needed, it will create a default 
bus which would be using it's own spring context.   When the Bus looks for 
configuration, it would just look in that spring context since it wouldn't 
know about your context.  I THINK if you use a jaxws:client thing instead of a 
spring bean, it MAY wire the current context into the default bus.  Not really 
sure though.   However, if you use normal spring beans, not much we can do 
unless we create spring specific subclasses (which we could) that would be 
Spring ApplicationContextAware to to wire things.   Would be more of a 
documentation issue of "when to use JaxWsProxyFactoryBean or 
SpringJaxWsProxyFactoryBean" and such.


> I also have a couple of queries regarding the Conduit.
> 
> 1. is it possiable to define the conduit(Htttp-timeout) for diffrenet
> services which residing at same address?

Yea.   Exactly like you did.  However, you could also do it URL based:
<http-conf:conduit  name="http://localhost:8080/AuthService.*";>...
<http-conf:conduit  name="http://localhost:8080/SecureService.*";>...



> example:
> 
> <http-conf:conduit
> name="{http://test.com/}AuthorizationServicePort.http-conduit";>
>       <http-conf:client ConnectionTimeout="5000"      ReceiveTimeout="5000" />
> </http-conf:conduit>
> 
> <http-conf:conduit
> name="{http://test.com/}SecuirtServicePort.http-conduit";>
> <http-conf:client ConnectionTimeout="3000"    ReceiveTimeout="3000" />
> </http-conf:conduit>
> 
> 2. is it possibale to set the timeout per operation basis?

Not in config, no.   In code, before making the call, you can grab the 
HttpConduit and modify settings right before the call.  

> 3. whether the Http-Conduit what we define in config is threadsafe?

Yes. The http:conduit element doesn't actually create anything.  It's actually 
and abstract thing that is used to configure HttpConduit objects later.

> 4. The connections(HTTP) what ever created while making a communication
> with endpoint is maintained in pool (http connection caching) if not there
> is any way to cache the connection using the config like number of
> connections ?

The HttpURLConnection thing we use under the covers does maintain a pool of 
connections.   There isn't much that can be done to configure it client side 
though. 


-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to