Announcement Announcement Module
Collapse
No announcement yet.
Axis deserializer cannot be found Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Bump... Still looking for an answer to this....

    BTJ

    Comment


    • #17
      could not find deserializer for type

      Hi i am having problem while invoking webservice with axis
      since 2 weeks i was trying to figure out .please help me regarding this

      the error is:
      ------------

      org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is org.springframework.remoting.RemoteAccessException : Cannot access remote service [{http://www.openuri.org/}ADPortalWebServiceSoap]; nested exception is org.xml.sax.SAXException: Deserializing parameter 'BPDataReqResult': could not find deserializer for type {http://temp.openuri.org/WebService/BPData.xsd}BPDATARESP
      org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:408)
      org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:350)
      javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
      javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

      root cause

      org.springframework.remoting.RemoteAccessException : Cannot access remote service [{http://www.openuri.org/}ADPortalWebServiceSoap]; nested exception is org.xml.sax.SAXException: Deserializing parameter 'BPDataReqResult': could not find deserializer for type {http://temp.openuri.org/WebService/BPData.xsd}BPDATARESP
      org.springframework.remoting.rmi.RmiClientIntercep torUtils.convertRmiAccessException(RmiClientInterc eptorUtils.java:177)
      org.springframework.remoting.rmi.RmiClientIntercep torUtils.convertRmiAccessException(RmiClientInterc eptorUtils.java:152)
      org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.performJaxRpcCall(JaxRpcPortClientIn terceptor.java:595)
      org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.invoke(JaxRpcPortClientInterceptor.j ava:552)
      org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :185)
      org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:209)
      $Proxy2.BPDataReq(Unknown Source)
      com.idearc.feeos.web.spring.action.SpringappContro ller.handleRequest(SpringappController.java:60)
      org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:45)
      org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:806)
      org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:736)
      org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:396)
      org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:350)
      javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
      javax.servlet.http.HttpServlet.service(HttpServlet .java:802)

      root cause

      org.xml.sax.SAXException: Deserializing parameter 'BPDataReqResult': could not find deserializer for type {http://temp.openuri.org/WebService/BPData.xsd}BPDATARESP
      org.apache.axis.AxisFault.makeFault(AxisFault.java :101)
      org.apache.axis.client.Call.invoke(Call.java:2470)
      org.apache.axis.client.Call.invoke(Call.java:2366)
      org.apache.axis.client.Call.invoke(Call.java:1812)
      org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.performJaxRpcCall(JaxRpcPortClientIn terceptor.java:592)
      org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.invoke(JaxRpcPortClientInterceptor.j ava:552)
      org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :185)
      org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:209)
      $Proxy2.BPDataReq(Unknown Source)
      com.idearc.feeos.web.spring.action.SpringappContro ller.handleRequest(SpringappController.java:60)
      org.springframework.web.servlet.mvc.SimpleControll erHandlerAdapter.handle(SimpleControllerHandlerAda pter.java:45)
      org.springframework.web.servlet.DispatcherServlet. doDispatch(DispatcherServlet.java:806)
      org.springframework.web.servlet.DispatcherServlet. doService(DispatcherServlet.java:736)
      org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:396)
      org.springframework.web.servlet.FrameworkServlet.d oGet(FrameworkServlet.java:350)
      javax.servlet.http.HttpServlet.service(HttpServlet .java:689)
      javax.servlet.http.HttpServlet.service(HttpServlet .java:802)



      appplicationcontext.xml
      -----------------------------------

      <bean id="accountWebService" class="fullgoogleapi.BPPortProxyFactoryBean">
      <property name="serviceFactoryClass">
      <value>org.apache.axis.client.ServiceFactory</value>
      </property>
      <property name="serviceInterface" value="fullgoogleapi.ADPortalWebService"/>
      <property name="wsdlDocumentUrl" value="http://nbttest1.superpages.com:9001/ADPortalWebService/ADPortalWebService.jws?WSDL"/>
      <property name="namespaceUri" value="http://www.openuri.org/"/>
      <property name="serviceName" value="ADPortalWebService"/>
      <property name="portName" value="ADPortalWebServiceSoap"/>
      </bean>


      JaxRpcPortProxyFactoryBean
      -----------------------------

      public class BPPortProxyFactoryBean extends JaxRpcPortProxyFactoryBean {

      protected void postProcessJaxRpcService(Service service) {
      TypeMappingRegistry registry = service.getTypeMappingRegistry();
      TypeMapping mapping = registry.createTypeMapping();
      registerBeanMapping(mapping, BPDATARESP.class, "BPDATARESP");
      registerBeanMapping(mapping, BUSINESS_PROFILE.class, "BUSINESS_PROFILE");
      // registerBeanMapping(mapping, DirectoryCategory.class, "DirectoryCategory");
      System.out.print("this.getNamespaceUri() >>"+this.getNamespaceUri() );
      registry.register("http://schemas.xmlsoap.org/soap/encoding/", mapping);
      }

      protected void registerBeanMapping(TypeMapping mapping, Class type, String name) {
      QName qName = new QName(this.getNamespaceUri(), name);
      mapping.register(type, qName,
      new BeanSerializerFactory(type, qName),
      new BeanDeserializerFactory(type, qName));
      }


      part of WSDL is :
      -------------
      <?xml version="1.0" encoding="utf-8"?>
      <definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:conv="http://www.openuri.org/2002/04/soap/conversation/" xmlns:cw="http://www.openuri.org/2002/04/wsdl/conversation/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:jms="http://www.openuri.org/2002/04/wsdl/jms/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://www.openuri.org/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.openuri.org/">
      <types>
      <s:schema xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:bpd="http://temp.openuri.org/WebService/BPData.xsd" elementFormDefault="qualified" targetNamespace="http://www.openuri.org/">
      <s:import namespace="http://temp.openuri.org/WebService/BPData.xsd"/>
      <s:element name="BPDATARESP" nillable="true" type="bpd:BPDATARESP"/>
      <s:element name="UPDATETEMPLATEIDRESP" nillable="true" type="bpd:UPDATETEMPLATEIDRESP"/>
      <s:element name="VERIFYTEMPLATERESP" nillable="true" type="bpd:VERIFYTEMPLATERESP"/>
      <s:element name="ENHANCEDBPDATARESP" nillable="true" type="bpd:ENHANCEDBPDATARESP"/>
      <s:element name="UPDATEBPPUBSTATUSRESP" nillable="true" type="bpd:UPDATEBPPUBSTATUSRESP"/>
      <xs:complexType name="BPDATARESP">
      <xs:sequence>
      <xs:element name="BUSINESS_PROFILE" type="tns:BUSINESS_PROFILE" nillable="false" minOccurs="1" maxOccurs="1"/>
      </xs:sequence>
      </xs:complexType>

      <service name="ADPortalWebService">
      <port name="ADPortalWebServiceSoap" binding="s0:ADPortalWebServiceSoap">
      <soap:address location="http://nbttest1.superpages.com:9001/ADPortalWebService/ADPortalWebService.jws"/>
      </port>
      <port name="ADPortalWebServiceHttpGet" binding="s0:ADPortalWebServiceHttpGet">
      <http:address location="http://nbttest1.superpages.com:9001/ADPortalWebService/ADPortalWebService.jws"/>
      </port>
      <port name="ADPortalWebServiceHttpPost" binding="s0:ADPortalWebServiceHttpPost">
      <http:address location="http://nbttest1.superpages.com:9001/ADPortalWebService/ADPortalWebService.jws"/>
      </port>
      </service>
      </definitions>

      Comment


      • #18
        This looks like the solution

        Hi,

        I had the same issue with Axis1 and got it resolved by adding the return type detail to the client side code as follows:

        call.addParameter("i1", org.apache.axis.encoding.XMLType.XSD_INT, ParameterMode.IN);
        call.setReturnType(javax.xml.rpc.ParameterMode.XMLType.XSD_STRING);

        Comment


        • #19
          I really like your informative and useful stuff.

          It really looks great to me.

          Thanks

          Comment


          • #20
            This was very helpful..Thank you for posting this...

            Final Year IEEE Projects

            Comment


            • #21
              you have to register serializer and deserializer in server side also

              Hi Nicole,
              I also have the same problem after some understanding i came to know that we have to do this way in server side also
              ie in wsdd file
              <service name="MyService" provider="java:RPC" style="wrapped">
              <requestFlow>
              <handler type="track"/>
              </requestFlow>
              <parameter name="allowedMethods" value="*" />
              <parameter name="className" value="JaxRpcMyService" />
              <beanMapping qname="imsWs:MyResponse" xmlns:imsWs="urn:ImsWebservice" languageSpecificType="java:MyResponse" serializer="org.apache.axis.encoding.ser.BeanSeria lizerFactory"
              deserializer="org.apache.axis.encoding.ser.BeanDes erializerFactory"/>
              <!-- <arrayMapping qname="ns:ArrayOfthingy" xmlns:ns="someNamespaceURI"
              languageSpecificType="java:my.java.array.thingy[]"
              innerType="ns2:thingy" xmlns:ns2="anotherNamespaceURI"
              encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
              -->

              Comment

              Working...
              X