Thanks for your quick response. I took a look at the link you posted, and
actually didn't gain much insight from it. Can you please clarify what you
wrote a little bit more:

I am not specifying a link to the wsdl in my bean. I wasn't clear whether
you were saying I should add this property to get this to not initiate on
startup, or that I shouldn't add it. 

Thanks
Richard



willem.jiang wrote:
> 
> Hi Richard
> Hi
> 
> For the client instantiation, it just need to create the service 
> model[1] first.
> 
>  If you add the wsdlLocation attribute in your SEI's WebService 
> annotation or specify the wsdlLocation property for the 
> JaxWsProxyFactoryBean with your service endpoint's address, the client 
> will hit the service before you call the proxy's operation.
> 
> Otherwise the client will not access service endpoint the before your 
> start to call the proxy's operation.
> 
> [1]http://cwiki.apache.org/CXF20DOC/cxf-architecture.html#CXFArchitecture-TheServiceModel
> 
> Willem
> 
> rsheldon wrote:
>> I've just started using CXF with Spring. I'm only using it to create SOAP
>> WS
>> clients (code generated from WSDL using CXF maven tools). 
>>
>> I'd like to be able to have the services not connect on startup, but wait
>> until they are first used - ie. lazy instantiation. Can this be done in
>> CXF?
>> Here's my very simple client configuration:
>>
>> <bean id="accountProxyFactory"
>> class="org.apache.cxf.jaxws.JaxWsProxyFactoryBean">
>>       <property name="serviceClass"
>> value="my.web.service.AccountService"/>
>>       <property name="address" value="${account.service}"/>
>>     </bean>
>>
>>     <bean id="accountService" class="my.web.service.AccountService"
>>       factory-bean="accountProxyFactory" factory-method="create"/>
>>
>> I can't see any attribute I can set on JaxWsProxyFactoryBean or it's
>> parent
>> ClientProxyFactoryBean that looks like it would work. There is a
>> "properties" property, but I can't find a reference to the valid
>> properties/values I can put into this map. 
>>
>> Can anyone help?? Is there an attribute or property I can set to prevent
>> immediate creation of the service?  
>>
>> Many thanks,
>> Richard
>>
>> Thanks
>> Richard
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Lazy-instantiation-of-Web-Service-Client-tp15427056p15434534.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to