views:

17

answers:

0

Hi, I have setup Axis2 with Spring Framework integration. I followed Axis2 example from their website. I'm also using Eclipse to debug the web service and client.

Using Eclipse, I see that the web service is getting called because of the break point. The parameter is also being passed. Problem is when the web service returns the response, the client gets a NULL reference.

Below is my applicationContext.xml for Spring:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd"&gt;

<beans>
  <!-- Axis2 Web Service, but to Spring, its just another bean that has dependencies -->
  <bean id="springAwareService" class="ws.MyWebService">
  </bean>
</beans>

Below is my service.xml for Axis2:

<service name="SpringAwareService">
    <description>
        simple spring example
    </description>
    <parameter name="ServiceObjectSupplier" locked="false">org.apache.axis2.extensions.spring.receivers.SpringServletContextObjectSupplier</parameter>
    <parameter name="SpringBeanName" locked="false">springAwareService</parameter>
    <operation name="getDocumentCodingResult">
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
        <messageReceiver  mep="http://www.w3.org/2004/08/wsdl/in-out"  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </operation>

</service> 

This was working before without the Spring configuration. I'm also creating the client test code from the WSDL. Since this works without Spring, what am I missing?

I'm using the Eclipse generated client stubs to make the web service call, but getting a NULL response from web service. I don't see any errors in Tomcat logs either.

Thank you.