Announcement Announcement Module
No announcement yet.
ProxyFactoryBean problem Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • ProxyFactoryBean problem


    Hopefully a simple problem, I've got a web service, but I don't want it initialised on startup (in case the web service is unavailable). So I've used a ProxyFactoryBean and set up the web service bean as the proxy target. But, the Spring container still tries to initialise it on startup, and since the WS is down, my app/junit tests wont run).

    This is the error I get:
    Failed to initialize service for JAX-RPC port [{}PaymentV3WebService]; nested exception is javax.xml.rpc.ServiceException: Error processing WSDL document:  <http://blahblah>
    Can someone point out what my mistake is please?

    	<bean id="paymentService" class="" lazy-init="true">
    		<property name="service" ref="paymentProxy" />
    	<bean id="paymentProxy" class="org.springframework.aop.framework.ProxyFactoryBean">
    	  <property name="targetSource">
    	    <bean class="" lazy-init="true">
    	      <property name="targetBeanName" >
    			<idref local="paymentProxyTarget"/>
        <bean id="paymentProxyTarget" class="" lazy-init="true"> 
            <!-- Non-RMI interface defining exposed methods for clients to call  -->
            <property name="serviceInterface" value=""/>
            <!-- RMI interface defining the exposed methods (maps to non-RMI interface defined above) -->
            <property name="portInterface" value=""/>  
            <!-- Point to the wsdl (where payment web service is deployed for env to use) -->
            <property name="wsdlDocumentUrl" value="${payment.wsdl}"/>        
            <!-- Target namespace defined in wsdl. -->
            <property name="namespaceUri" value="${payment.namespace}"/>
            <!-- Service name to call defined in wsdl. -->
            <property name="serviceName" value="PaymentWSImplService"/>
            <!-- Port (binding) to call defined under the service in wsdl -->
            <property name="portName" value="PaymentV3WebService"/>  
             <!-- This client is implemented using axis so use that factory type. -->
            <property name="serviceFactoryClass" value="org.apache.axis.client.ServiceFactory"/>