5 Replies Latest reply on Dec 9, 2005 2:09 PM by Thomas Diesler

    Deserialisation problem with complex type

    Partha Pal Newbie

      Hello!

      I have created a Webservice and my JBoss is 4.0.2 .
      My problem is I cannot send an array of complex type as parameter from client. Another method which returns the array is working fine. I am including mapping.xml and the wsdl file. Another thing, I could not send or receive any complex type if the MEP is document/literal, right now I am working with rpc/literal. I am using wscompile.

      the WSDL is as follows:

      <?xml version="1.0" encoding="UTF-8"?>

      <definitions name="BetXTechService" targetNamespace="http://endpoint.webservice.ses.betxtech.co.uk/" xmlns:tns="http://endpoint.webservice.ses.betxtech.co.uk/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://endpoint.webservice.ses.betxtech.co.uk/types/arrays/uk/co/betxtech/ses/businessobjects/respcomps" xmlns:ns3="http://endpoint.webservice.ses.betxtech.co.uk/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

      <schema targetNamespace="http://endpoint.webservice.ses.betxtech.co.uk/types/arrays/uk/co/betxtech/ses/businessobjects/respcomps" xmlns:tns="http://endpoint.webservice.ses.betxtech.co.uk/types/arrays/uk/co/betxtech/ses/businessobjects/respcomps" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns2="http://endpoint.webservice.ses.betxtech.co.uk/types" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">




      <schema targetNamespace="http://endpoint.webservice.ses.betxtech.co.uk/types" xmlns:tns="http://endpoint.webservice.ses.betxtech.co.uk/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">





































      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>

      <soap:operation soapAction=""/>

      <soap:body use="literal" namespace="http://endpoint.webservice.ses.betxtech.co.uk/"/>

      <soap:body use="literal" namespace="http://endpoint.webservice.ses.betxtech.co.uk/"/>

      <soap:operation soapAction=""/>

      <soap:body use="literal" namespace="http://endpoint.webservice.ses.betxtech.co.uk/"/>

      <soap:body use="literal" namespace="http://endpoint.webservice.ses.betxtech.co.uk/"/>

      <soap:operation soapAction=""/>

      <soap:body use="literal" namespace="http://endpoint.webservice.ses.betxtech.co.uk/"/>

      <soap:body use="literal" namespace="http://endpoint.webservice.ses.betxtech.co.uk/"/>

      <soap:operation soapAction=""/>

      <soap:body use="literal" namespace="http://endpoint.webservice.ses.betxtech.co.uk/"/>

      <soap:body use="literal" namespace="http://endpoint.webservice.ses.betxtech.co.uk/"/>


      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>


      And the mapping.xml is as follows:-

      <?xml version="1.0" encoding="UTF-8"?>
      <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
      <package-mapping>
      <package-type>uk.co.betxtech.ses.webservice.endpoint</package-type>
      http://endpoint.webservice.ses.betxtech.co.uk/types
      </package-mapping>
      <package-mapping>
      <package-type>uk.co.betxtech.ses.webservice.endpoint</package-type>
      http://endpoint.webservice.ses.betxtech.co.uk/
      </package-mapping>
      <package-mapping>
      <package-type>uk.co.betxtech.ses.webservice.endpoint._arrays.uk.co.betxtech.ses.businessobjects.respcomps</package-type>
      http://endpoint.webservice.ses.betxtech.co.uk/types/arrays/uk/co/betxtech/ses/businessobjects/respcomps
      </package-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.webservice.endpoint.BetXTechService_getTestType_RequestStruct</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types">typeNS:getTestType</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>String_1</java-variable-name>
      <xml-element-name>String_1</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.webservice.endpoint.BetXTechService_getTestType_ResponseStruct</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types">typeNS:getTestTypeResponse</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>result</java-variable-name>
      <xml-element-name>result</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.webservice.endpoint.BetXTechService_getTestTypeName_RequestStruct</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types">typeNS:getTestTypeName</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>TestType_1</java-variable-name>
      <xml-element-name>TestType_1</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.webservice.endpoint.BetXTechService_setTestTypeArray_ResponseStruct</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types">typeNS:setTestTypeArrayResponse</root-type-qname>
      <qname-scope>complexType</qname-scope>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.webservice.endpoint.BetXTechService_getTestTypeArray_RequestStruct</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types">typeNS:getTestTypeArray</root-type-qname>
      <qname-scope>complexType</qname-scope>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.businessobjects.respcomps.NestedType</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types">typeNS:NestedType</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>nestName</java-variable-name>
      <xml-element-name>nestName</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.webservice.endpoint.BetXTechService_getTestTypeName_ResponseStruct</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types">typeNS:getTestTypeNameResponse</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>result</java-variable-name>
      <xml-element-name>result</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.webservice.endpoint.BetXTechService_getTestTypeArray_ResponseStruct</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types">typeNS:getTestTypeArrayResponse</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>result</java-variable-name>
      <xml-element-name>result</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.businessobjects.respcomps.TestType[]</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types/arrays/uk/co/betxtech/ses/businessobjects/respcomps">typeNS:TestTypeArray</root-type-qname>
      <qname-scope>complexType</qname-scope>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.businessobjects.respcomps.TestType</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types">typeNS:TestType</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>myAddress</java-variable-name>
      <xml-element-name>myAddress</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>myName</java-variable-name>
      <xml-element-name>myName</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>nestType</java-variable-name>
      <xml-element-name>nestType</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>uk.co.betxtech.ses.webservice.endpoint.BetXTechService_setTestTypeArray_RequestStruct</java-type>
      <root-type-qname xmlns:typeNS="http://endpoint.webservice.ses.betxtech.co.uk/types">typeNS:setTestTypeArray</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>arrayOfTestType_1</java-variable-name>
      <xml-element-name>arrayOfTestType_1</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <service-interface-mapping>
      <service-interface>uk.co.betxtech.ses.webservice.endpoint.BetXTechService</service-interface>
      <wsdl-service-name xmlns:serviceNS="http://endpoint.webservice.ses.betxtech.co.uk/">serviceNS:BetXTechService</wsdl-service-name>
      <port-mapping>
      <port-name>BetXTechServicePort</port-name>
      <java-port-name>BetXTechServicePort</java-port-name>
      </port-mapping>
      </service-interface-mapping>
      <service-endpoint-interface-mapping>
      <service-endpoint-interface>uk.co.betxtech.ses.webservice.endpoint.BetXTechService</service-endpoint-interface>
      <wsdl-port-type xmlns:portTypeNS="http://endpoint.webservice.ses.betxtech.co.uk/">portTypeNS:BetXTechService</wsdl-port-type>
      <wsdl-binding xmlns:bindingNS="http://endpoint.webservice.ses.betxtech.co.uk/">bindingNS:BetXTechServiceBinding</wsdl-binding>
      <service-endpoint-method-mapping>
      <java-method-name>getTestType</java-method-name>
      <wsdl-operation>getTestType</wsdl-operation>
      <method-param-parts-mapping>
      <param-position>0</param-position>
      <param-type>java.lang.String</param-type>
      <wsdl-message-mapping>
      <wsdl-message xmlns:wsdlMsgNS="http://endpoint.webservice.ses.betxtech.co.uk/">wsdlMsgNS:BetXTechService_getTestType</wsdl-message>
      <wsdl-message-part-name>String_1</wsdl-message-part-name>
      <parameter-mode>IN</parameter-mode>
      </wsdl-message-mapping>
      </method-param-parts-mapping>
      <wsdl-return-value-mapping>
      <method-return-value>uk.co.betxtech.ses.businessobjects.respcomps.TestType</method-return-value>
      <wsdl-message xmlns:wsdlMsgNS="http://endpoint.webservice.ses.betxtech.co.uk/">wsdlMsgNS:BetXTechService_getTestTypeResponse</wsdl-message>
      <wsdl-message-part-name>result</wsdl-message-part-name>
      </wsdl-return-value-mapping>
      </service-endpoint-method-mapping>
      <service-endpoint-method-mapping>
      <java-method-name>getTestTypeArray</java-method-name>
      <wsdl-operation>getTestTypeArray</wsdl-operation>
      <wsdl-return-value-mapping>
      <method-return-value>uk.co.betxtech.ses.businessobjects.respcomps.TestType[]</method-return-value>
      <wsdl-message xmlns:wsdlMsgNS="http://endpoint.webservice.ses.betxtech.co.uk/">wsdlMsgNS:BetXTechService_getTestTypeArrayResponse</wsdl-message>
      <wsdl-message-part-name>result</wsdl-message-part-name>
      </wsdl-return-value-mapping>
      </service-endpoint-method-mapping>
      <service-endpoint-method-mapping>
      <java-method-name>getTestTypeName</java-method-name>
      <wsdl-operation>getTestTypeName</wsdl-operation>
      <method-param-parts-mapping>
      <param-position>0</param-position>
      <param-type>uk.co.betxtech.ses.businessobjects.respcomps.TestType</param-type>
      <wsdl-message-mapping>
      <wsdl-message xmlns:wsdlMsgNS="http://endpoint.webservice.ses.betxtech.co.uk/">wsdlMsgNS:BetXTechService_getTestTypeName</wsdl-message>
      <wsdl-message-part-name>TestType_1</wsdl-message-part-name>
      <parameter-mode>IN</parameter-mode>
      </wsdl-message-mapping>
      </method-param-parts-mapping>
      <wsdl-return-value-mapping>
      <method-return-value>java.lang.String</method-return-value>
      <wsdl-message xmlns:wsdlMsgNS="http://endpoint.webservice.ses.betxtech.co.uk/">wsdlMsgNS:BetXTechService_getTestTypeNameResponse</wsdl-message>
      <wsdl-message-part-name>result</wsdl-message-part-name>
      </wsdl-return-value-mapping>
      </service-endpoint-method-mapping>
      <service-endpoint-method-mapping>
      <java-method-name>setTestTypeArray</java-method-name>
      <wsdl-operation>setTestTypeArray</wsdl-operation>
      <method-param-parts-mapping>
      <param-position>0</param-position>
      <param-type>uk.co.betxtech.ses.businessobjects.respcomps.TestType[]</param-type>
      <wsdl-message-mapping>
      <wsdl-message xmlns:wsdlMsgNS="http://endpoint.webservice.ses.betxtech.co.uk/">wsdlMsgNS:BetXTechService_setTestTypeArray</wsdl-message>
      <wsdl-message-part-name>arrayOfTestType_1</wsdl-message-part-name>
      <parameter-mode>IN</parameter-mode>
      </wsdl-message-mapping>
      </method-param-parts-mapping>
      </service-endpoint-method-mapping>
      </service-endpoint-interface-mapping>
      </java-wsdl-mapping>


      Please provide me with suggestions, so that I could get out of this problem and please let me know if any more information is needed.

      Thanx in advance.