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

  • Deserialization problem

    Hi,

    I was trying to implement one webservices client which will call webservices exposed from webmethods and i am getting below error.

    Code:
    org.xml.sax.SAXException: Deserializing parameter 'Output':  could not find deserializer for type {https://abctest.svr.us.e.net/UsrControlRoom/wsdl/linkAction}Output
    	at org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:277)
    	at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
    	at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
    The WSDL file below.

    Code:
    <?xml version="1.0" encoding="UTF-8" ?>
    <wsdl:definitions
    	xmlns:tns="https://tss4f083c1abctest.svr.us.e.net/UsrControlRoom/wsdl/linkAction"
    	xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
    	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
    	xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
    	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
    	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="linkAction"
    	targetNamespace="https://abctest.svr.us.e.net/UsrControlRoom/wsdl/linkAction">
    	<wsdl:types>
    		<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    			xmlns:tns="https://abctest.svr.us.e.net/UsrControlRoom/wsdl/linkAction"
    			targetNamespace="https://abctest.svr.us.e.net/UsrControlRoom/wsdl/linkAction">
    			<xsd:complexType name="Input">
    				<xsd:sequence>
    					<xsd:element name="requestType" nillable="true"
    						type="xsd:string" />
    					<xsd:element name="listenerOrTriggerName"
    						nillable="true" type="xsd:string" />
    					<xsd:element name="sndRcvCd" nillable="true"
    						type="xsd:string" />
    					<xsd:element name="recvAppId" nillable="true"
    						type="xsd:string" />
    					<xsd:element name="sendAppId" nillable="true"
    						type="xsd:string" />
    					<xsd:element name="channelId" nillable="true"
    						type="xsd:string" />
    				</xsd:sequence>
    			</xsd:complexType>
    			<xsd:complexType name="Output">
    				<xsd:sequence>
    					<xsd:element name="requestStatus" nillable="true"
    						type="xsd:string" />
    				</xsd:sequence>
    			</xsd:complexType>
    			<xsd:element name="Input" type="tns:Input" />
    			<xsd:element name="Output" type="tns:Output" />
    		</xsd:schema>
    	</wsdl:types>
    	<wsdl:message name="linkAction_PortType_Input">
    		<wsdl:part name="parameters" element="tns:Input" />
    	</wsdl:message>
    	<wsdl:message name="linkAction_PortType_Output">
    		<wsdl:part name="parameters" element="tns:Output" />
    	</wsdl:message>
    	<wsdl:portType name="linkAction_PortType">
    		<wsdl:operation name="linkAction">
    			<wsdl:input message="tns:linkAction_PortType_Input" />
    			<wsdl:output message="tns:linkAction_PortType_Output" />
    		</wsdl:operation>
    	</wsdl:portType>
    	<wsdl:binding name="UsrControlRoom_wsdl_linkAction_Binder"
    		type="tns:linkAction_PortType">
    		<soap:binding style="document"
    			transport="http://schemas.xmlsoap.org/soap/http" />
    		<wsdl:operation name="linkAction">
    			<soap:operation
    				soapAction="UsrControlRoom_wsdl_linkAction_Binder_linkAction"
    				style="document" />
    			<wsdl:input>
    				<soap:body parts="parameters" use="literal" />
    			</wsdl:input>
    			<wsdl:output>
    				<soap:body parts="parameters" use="literal" />
    			</wsdl:output>
    		</wsdl:operation>
    	</wsdl:binding>
    	<wsdl:service name="linkAction">
    		<wsdl:port name="UsrControlRoom_wsdl_linkAction_Port"
    			binding="tns:UsrControlRoom_wsdl_linkAction_Binder">
    			<soap:address
    				location="https://abctest.svr.us.e.net:56741/ws/UsrControlRoom.wsdl:linkAction" />
    		</wsdl:port>
    	</wsdl:service>
    </wsdl:definitions>
    Please help me to resolve this issue.

    Thanks,
    Laks.
    Last edited by laknarayan; Oct 20th, 2009, 12:59 PM.

  • #2
    Find below the client program

    Code:
    private static ApplicationContext context = new ClassPathXmlApplicationContext("com/jpmorgan/router/test/usrouter-webservice.xml");
        private static TestWebServiceRemote service = (TestWebServiceRemote) context.getBean("linkActionService");
        
        public static void main(String[] args) {
        	Output output = null;
        	Map<String, String> inputRequestMap = new HashMap<String, String>();
    		inputRequestMap.put(ServiceConst.LINKED_REQ_TYPE, "Stors");
    		inputRequestMap.put(ServiceConst.LINKED_LISTENER_NAME,"Test");
    		inputRequestMap.put(ServiceConst.LINKED_SEND_RECV_CD, "S");
    		inputRequestMap.put(ServiceConst.LINKED_SND_APPL_ID,"STORS");
    		inputRequestMap.put(ServiceConst.LINKED_RECV_APPL_ID, "GFP");
    		inputRequestMap.put(ServiceConst.LINKED_CHNL_ID,"01");
    		try {
    			//output = service.linkAction(inputRequestMap);
    			service.linkAction(inputRequestMap);
    			System.out.println("Link Action :"+output.getRequestStatus());
    		}catch(Exception e)
    		{
    			e.printStackTrace();
    		}
           }
    And the content from usrouter-webservice.xml.

    Code:
    <bean id="linkActionService" class="org.springframework.remoting.jaxrpc.JaxRpcPortProxyFactoryBean">
    
            <property name="serviceFactoryClass">
                <value>org.apache.axis.client.ServiceFactory</value>
            </property>
    
            <property name="wsdlDocumentUrl">
                <value>classpath:linkAction.wsdl</value>
            </property>
    
            <property name="namespaceUri">
                <value>https://abctest.svr.us.e.net/UsrControlRoom/wsdl/linkAction</value>
            </property>
    
            <property name="serviceName">
                <value>linkAction</value>
            </property>
    
            <property name="portName">
                <value>UsrControlRoom_wsdl_linkAction_Port</value>
            </property>
    
            <property name="serviceInterface">
                <value>com.router.facade.TestWebServiceRemote</value>
            </property>
        </bean>

    Comment

    Working...
    X