Announcement Announcement Module
Collapse
No announcement yet.
Creating JaxRpc proxy client for axis2 Web Service problem Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Creating JaxRpc proxy client for axis2 Web Service problem

    Hello all,

    I searched the forums and Google for an answer to this problem, but to no avail. I have an axis2 web service setup on a Tomcat 5.0.28 app server. Everything seems to be deployed and working fine there. I tried to use the example given here: http://www.springframework.org/docs/.../remoting.html in section 17.5.2 (Accessing Web Services). The call stack from the JSF page to the bean that I created all looks fine, but I end up with the following error:

    Code:
    Caused by: java.util.NoSuchElementException
    	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:785)
    	at java.util.HashMap$ValueIterator.next(HashMap.java:812)
    	at org.apache.axis.client.Call.setOperation(Call.java:1422)
    	at org.apache.axis.client.Call.setOperation(Call.java:1526)
    	at org.apache.axis.client.Service.createCall(Service.java:534)
    	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.performJaxRpcCall(JaxRpcPortClientInterceptor.java:533)
    	at org.springframework.remoting.jaxrpc.JaxRpcPortClientInterceptor.invoke(JaxRpcPortClientInterceptor.java:507)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
    	at $Proxy1.getHelloWorld(Unknown Source)
    	at com.webservice.TestServiceClient.doTest(TestServiceClient.java:22)
    	at com.bean.WebServiceBean.doTest(WebServiceBean.java:13)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:324)
    	at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
    I'm not sure if this is because the web service is generated using axis2 while spring seems to be using axis libraries. I would think that this shouldn't be the case because a web service is a web service, and the proxy should work if I'm calling a .NET web service, right?

    Any ideas?

    Here's my applicationContext.xml stuff that's relevant (I have hidden specific company names and products):

    Code:
      <!-- =========================== Web Services ============================ -->
      <bean id="TestWebService" class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean">
        <property name="serviceInterface" value="com.webservice.TestService"/>
        <property name="wsdlDocumentUrl" value="http://localhost:8080/axis2/services/TestServiceEndpoint?wsdl"/>
        <property name="namespaceUri" value="http://webservice.com"/>
        <property name="serviceName" value="TestServiceEndpoint"/>
        <property name="portName" value="TestServiceEndpointSOAP12port_http"/>
        <property name="lookupServiceOnStartup" value="false"/>
      </bean>
    
      <bean id="TestWebServiceClient" class="com.webservice.TestServiceClient">
        <property name="testService" ref="TestWebService"/>
      </bean>
    Last edited by exodus; Mar 16th, 2007, 07:11 PM. Reason: Adding code tags.

  • #2
    Have you looked at the support axis2 has for spring?

    http://ws.apache.org/axis2/1_1_1/spring.html

    HTH,
    Robert

    Comment


    • #3
      Yes, I have looked at that, but it doesn't seem to be what I want. That shows how to wire up a Spring Bean into an Axis web service. It also showed in other documentation how to expose a POJO Spring bean as a web service. What I am doing here is attempting to make a web service client as shown above in the link/section I provided. I surely could be missing something in the documentation you mentioned, but I've been over it several times.

      Comment

      Working...
      X