1 Reply Latest reply on Jul 22, 2005 2:28 PM by Thomas Diesler

    JBOSS4.0.2 EJB endpoint Web Service Problem

    henry_lo88 Newbie

      I had spent lot of time to try setting up a web server (server side ) in JBOSS4 without success. I hope u can help me out of the problem.

      I actually using axis Java2WSDL to generate my WSDL from my EJB interface. Then I manually to created my mapping.xml and webservice.xml. I started up my JBoss and I can browse my WSDL no problem. However, I got a error as following:

      19:39:03,840 WARN [JavaWsdlMapping] Cannot find jaxrpc-mapping for type: {http://cdmessage.services.csi.com}CDMessage

      When I call from a MS.NET client, I got the same error as following:

      19:45:10,869 ERROR [RPCInvocation] org.xml.sax.SAXException: Deserializing param
      eter 'in0': could not find deserializer for type {http://web.chromaticsoftware.
      com}CDMessage

      I knew my mapping is wrong, but I had a complex type that is an arry of customize object. I cannot change the parameter to primary type coz other team is using the same object in .net.

      My Question is how can I build my mapping for my complex type. I tried download the jwsdp1.6, but the wscomplie is totally different fromthat metioned in adminguide and the sample on web. I screw, please help.

      THANKS IN ADVANCE
      ===========================================
      WSDL generate by Axis Java2WSDL
      ===========================================
      <?xml version="1.0" encoding="UTF-8"?>
      < wsdl:definitions targetNamespace="http://web.chromaticsoftware.com" xmlns:impl="http://web.chromaticsoftware.com" xmlns:intf="http://web.chromaticsoftware.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://cdmessage.services.csi.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/">
      < wsdl:types>
      < schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://cdmessage.services.csi.com">
      < import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      < complexType name="Kvp">
      < sequence>
      < element name="k" nillable="true" type="xsd:string"/>
      < element name="v" nillable="true" type="xsd:string"/>
      < /sequence>
      < /complexType>
      < complexType name="CDMessage">
      < sequence>
      < element name="command" nillable="true" type="xsd:string"/>
      < element name="data" nillable="true" type="impl:ArrayOf_tns2_Kvp"/>
      < element name="sequenceID" nillable="true" type="xsd:string"/>
      < /sequence>
      < /complexType>
      < /schema>
      < schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://web.chromaticsoftware.com">
      < import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
      < complexType name="ArrayOf_tns2_Kvp">
      < complexContent>
      < restriction base="soapenc:Array">
      < attribute ref="soapenc:arrayType" wsdl:arrayType="tns2:Kvp[]"/>
      < /restriction>
      < /complexContent>
      < /complexType>
      < /schema>
      < /wsdl:types>

      <wsdl:message name="executeCDMessageResponse">

      <wsdl:part name="executeCDMessageResponse" type="tns2:CDMessage"/>

      </wsdl:message>

      <wsdl:message name="executeCDMessageRequest">

      <wsdl:part name="in0" type="tns2:CDMessage"/>

      </wsdl:message>

      <wsdl:portType name="CDMessageController">

      <wsdl:operation name="executeCDMessage" parameterOrder="in0">

      <wsdl:input name="executeCDMessageRequest" message="impl:executeCDMessageRequest"/>

      <wsdl:output name="executeCDMessageResponse" message="impl:executeCDMessageResponse"/>

      </wsdl:operation>

      </wsdl:portType>

      <wsdl:binding name="cdmessageservicehandlerSoapBinding" type="impl:CDMessageController">

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

      <wsdl:operation name="executeCDMessage">

      <wsdlsoap:operation soapAction=""/>

      <wsdl:input name="executeCDMessageRequest">

      <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://web.chromaticsoftware.com"/>

      </wsdl:input>

      <wsdl:output name="executeCDMessageResponse">

      <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://web.chromaticsoftware.com"/>

      </wsdl:output>

      </wsdl:operation>

      </wsdl:binding>

      <wsdl:service name="CDMessageControllerService">

      <wsdl:port name="cdmessageservicehandler" binding="impl:cdmessageservicehandlerSoapBinding">

      <wsdlsoap:address location="http://this.value.is.replaced.by.jboss"/>

      </wsdl:port>

      </wsdl:service>

      </wsdl:definitions>
      ===================================
      mapping.xml manually created
      ===================================

      <?xml version="1.0" encoding="UTF-8"?>
      <java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee"
      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>com.csi.services.cdmessage</package-type>
      http://cdmessage.services.csi.com/types
      </package-mapping>

      <package-mapping>
      <package-type>com.csi.services.cdmessage</package-type>
      http://cdmessage.services.csi.com
      </package-mapping>

      <package-mapping>
      <package-type>com.csi.services.cdmessage</package-type>
      http://ws.chromaticsoftware.com/types
      </package-mapping>

      <package-mapping>
      <package-type>com.csi.services.cdmessage</package-type>
      http://ws.chromaticsoftware.com
      </package-mapping>


      <java-xml-type-mapping>
      <java-type>com.csi.services.cdmessage.Kvp</java-type>
      <root-type-qname xmlns:typeNS="http://cdmessage.services.csi.com/types">typeNS:Kvp</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>k</java-variable-name>
      <xml-element-name>k</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>v</java-variable-name>
      <xml-element-name>v</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>


      <java-xml-type-mapping>
      <java-type>com.csi.services.cdmessage.CDMessage</java-type>
      <root-type-qname xmlns:typeNS="http://cdmessage.services.csi.com/types">typeNS:CDMessage</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>command</java-variable-name>
      <xml-element-name>command</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>data</java-variable-name>
      <xml-element-name>data</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>sequenceID</java-variable-name>
      <xml-element-name>sequenceID</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>


      <service-endpoint-interface-mapping>
      <service-endpoint-interface>com.csi.services.cdmessage.CDMessageController</service-endpoint-interface>
      <wsdl-port-type xmlns:portTypeNS="http://cdmessage.services.csi.com">portTypeNS:CDMessageController</wsdl-port-type>
      <wsdl-binding xmlns:bindingNS="http://cdmessage.services.csi.com">bindingNS:cdmessageservicehandlerSoapBinding</wsdl-binding>
      </service-endpoint-interface-mapping>


      </java-wsdl-mapping>