Announcement Announcement Module
Collapse
No announcement yet.
Axis could not find deserializer for type Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Axis could not find deserializer for type

    Hi All,
    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>
Working...
X