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

  • ProxyFactoryBean problem

    Hi

    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:
    Code:
    Failed to initialize service for JAX-RPC port [{urn:paymentwebservice.uk.lsb.com}PaymentV3WebService]; nested exception is javax.xml.rpc.ServiceException: Error processing WSDL document:  <http://blahblah>
    Can someone point out what my mistake is please?

    Code:
    	<bean id="paymentService" class="com.lsb.uk.paymentwebserviceclient.bo.PaymentBOImpl" lazy-init="true">
    		<property name="service" ref="paymentProxy" />
    	</bean>
    	
    	<bean id="paymentProxy" class="org.springframework.aop.framework.ProxyFactoryBean">
    	  <property name="targetSource">
    	    <bean class="org.springframework.aop.target.LazyInitTargetSource" lazy-init="true">
    	      <property name="targetBeanName" >
    			<idref local="paymentProxyTarget"/>
    	      </property>
    	    </bean>
    	  </property>
    	</bean>    	
    
        <bean id="paymentProxyTarget" class="com.lsb.uk.paymentwebserviceclient.ws.AxisPortProxyFactoryBean" lazy-init="true"> 
            <!-- Non-RMI interface defining exposed methods for clients to call  -->
            <property name="serviceInterface" value="com.lsb.uk.paymentwebserviceclient.ws.PaymentService"/>
            <!-- RMI interface defining the exposed methods (maps to non-RMI interface defined above) -->
            <property name="portInterface" value="com.lsb.uk.paymentwebservice.ws.PaymentWS"/>  
            <!-- 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"/>
        </bean>
    Thanks
Working...
X