0 Replies Latest reply on Jul 16, 2003 3:09 AM by Leo Carreon

    JBoss.NET interoperability with MS .NET

    Leo Carreon Newbie

      I've just recently started working with JBoss.NET and am trying to create a web service which is identical to the one we have for MS .NET. Am using JBoss-3.2.1. Can someone please tell me what I'm doing wrong. Here is what I have done so far:

      - Took WSDL from MS .NET (TTSysServices.asmx shown below)

      <?xml version="1.0" encoding="utf-8"?>
      <definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:s0="http://repository.towertech.com/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" targetNamespace="http://repository.towertech.com/" xmlns="http://schemas.xmlsoap.org/wsdl/">

      <s:schema elementFormDefault="qualified" targetNamespace="http://repository.towertech.com/">
      <s:element name="license" type="s:string" />
      <s:element name="isValidResult" type="s:boolean" />
      <s:element name="userID" type="s:string" />
      <s:element name="password" type="s:string" />
      <s:element name="options" type="s0:ArrayOfTTNameValue" />
      <s:complexType name="ArrayOfTTNameValue">
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="unbounded" name="TTNameValue" nillable="true" type="s0:TTNameValue" />
      </s:sequence>
      </s:complexType>
      <s:complexType name="TTNameValue">
      <s:sequence>
      <s:element minOccurs="0" maxOccurs="1" name="m_Name" type="s:string" />
      <s:element minOccurs="0" maxOccurs="1" name="m_Value" type="s:string" />
      </s:sequence>
      </s:complexType>
      <s:element name="loginResult" type="s:string" />
      <s:element name="severity" type="s0:TTTraceSeverity" />
      <s:simpleType name="TTTraceSeverity">
      <s:restriction base="s:string">
      <s:enumeration value="MIN" />
      <s:enumeration value="LOW" />
      <s:enumeration value="MEDIUM" />
      <s:enumeration value="HIGH" />
      <s:enumeration value="MAX" />
      </s:restriction>
      </s:simpleType>
      <s:element name="message" type="s:string" />
      <s:element name="reason" type="s:string" />
      <s:element name="varName" type="s:string" />
      <s:element name="getConfigVarResult" type="s:string" />
      <s:element name="varNamePattern" type="s:string" />
      <s:element name="getConfigVarsResult" type="s0:ArrayOfTTNameValue" />
      </s:schema>












































































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

      <soap:operation soapAction="http://repository.towertech.com/isValid" style="document" />

      <soap:body use="literal" />


      <soap:body use="literal" />



      <soap:operation soapAction="http://repository.towertech.com/login" style="document" />

      <soap:body use="literal" />


      <soap:body use="literal" />



      <soap:operation soapAction="http://repository.towertech.com/logout" style="document" />

      <soap:body use="literal" />


      <soap:body use="literal" />



      <soap:operation soapAction="http://repository.towertech.com/logMessage" style="document" />

      <soap:body use="literal" />


      <soap:body use="literal" />



      <soap:operation soapAction="http://repository.towertech.com/logError" style="document" />

      <soap:body use="literal" />


      <soap:body use="literal" />



      <soap:operation soapAction="http://repository.towertech.com/getConfigVar" style="document" />

      <soap:body use="literal" />


      <soap:body use="literal" />



      <soap:operation soapAction="http://repository.towertech.com/getConfigVars" style="document" />

      <soap:body use="literal" />


      <soap:body use="literal" />




      Tower Repository eProcess Objects API

      <soap:address location="http://172.16.1.173/TTRepEpoWS2/TTSysServices.asmx" />




      - Used Axis' WSDL2Java utility to generate client, server and deployment descriptor files (syntax of command is - java -cp $CLASSPATH org.apache.axis.wsdl.WSDL2Java -W -s -o TTSysServices TTSysServices.asmx)

      - Filled in the resulting TTSysServicesSoapImpl.java for the partial implementation of the web service.

      - Created WSR file containing the server-side files together with the deploy.wsdd (shown below)which is renamed as web-service.xml and deployed the WSR file into the JBoss deploy directory.

      <!-- Use this file to deploy some handlers/chains and services -->
      <!-- Two ways to do this: -->
      <!-- java org.apache.axis.client.AdminClient deploy.wsdd -->
      <!-- after the axis server is running -->
      <!-- or -->
      <!-- java org.apache.axis.utils.Admin client|server deploy.wsdd -->
      <!-- from the same directory that the Axis engine runs -->

      <deployment
      xmlns="http://xml.apache.org/axis/wsdd/"
      xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">

      <!-- Services from TTSysServices WSDL service -->







      <operation name="isValid" qname="operNS:license" xmlns:operNS="http://repository.towertech.com/" returnQName="retNS:isValidResult" xmlns:retNS="http://repository.towertech.com/" returnType="rtns:boolean" xmlns:rtns="http://www.w3.org/2001/XMLSchema" >
      <parameter qname="pns:license" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>

      <operation name="login" qname="operNS:options" xmlns:operNS="http://repository.towertech.com/" returnQName="retNS:loginResult" xmlns:retNS="http://repository.towertech.com/" returnType="rtns:string" xmlns:rtns="http://www.w3.org/2001/XMLSchema" >
      <parameter qname="pns:userID" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
      <parameter qname="pns:password" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
      <parameter qname="pns:options" xmlns:pns="http://repository.towertech.com/" type="tns:ArrayOfTTNameValue" xmlns:tns="http://repository.towertech.com/"/>

      <operation name="logout" qname="operNS:license" xmlns:operNS="http://repository.towertech.com/" >
      <parameter qname="pns:license" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>

      <operation name="logMessage" qname="operNS:severity" xmlns:operNS="http://repository.towertech.com/" >
      <parameter qname="pns:license" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
      <parameter qname="pns:severity" xmlns:pns="http://repository.towertech.com/" type="tns:TTTraceSeverity" xmlns:tns="http://repository.towertech.com/"/>
      <parameter qname="pns:message" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>

      <operation name="logError" qname="operNS:message" xmlns:operNS="http://repository.towertech.com/" >
      <parameter qname="pns:license" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
      <parameter qname="pns:message" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
      <parameter qname="pns:reason" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>

      <operation name="getConfigVar" qname="operNS:license" xmlns:operNS="http://repository.towertech.com/" returnQName="retNS:getConfigVarResult" xmlns:retNS="http://repository.towertech.com/" returnType="rtns:string" xmlns:rtns="http://www.w3.org/2001/XMLSchema" >
      <parameter qname="pns:license" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
      <parameter qname="pns:varName" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>

      <operation name="getConfigVars" qname="operNS:varNamePattern" xmlns:operNS="http://repository.towertech.com/" returnQName="retNS:getConfigVarsResult" xmlns:retNS="http://repository.towertech.com/" returnType="rtns:ArrayOfTTNameValue" xmlns:rtns="http://repository.towertech.com/" >
      <parameter qname="pns:license" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
      <parameter qname="pns:varNamePattern" xmlns:pns="http://repository.towertech.com/" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>



      <typeMapping
      xmlns:ns="http://repository.towertech.com/"
      qname="ns:ArrayOfTTNameValue"
      type="java:com.towertech.repository.ArrayOfTTNameValue"
      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
      encodingStyle=""
      />
      <typeMapping
      xmlns:ns="http://repository.towertech.com/"
      qname="ns:TTNameValue"
      type="java:com.towertech.repository.TTNameValue"
      serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
      deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
      encodingStyle=""
      />
      <typeMapping
      xmlns:ns="http://repository.towertech.com/"
      qname="ns:TTTraceSeverity"
      type="java:com.towertech.repository.TTTraceSeverity"
      serializer="org.apache.axis.encoding.ser.EnumSerializerFactory"
      deserializer="org.apache.axis.encoding.ser.EnumDeserializerFactory"
      encodingStyle=""
      />



      - Verified that the web service has been deployed properly by checking via a web browser.

      - Created a test client using MS VS .NET 2003 C# and made the necessary changes for it to generate the SOAP request and using Axis' tcpmon utility captured the SOAP request and response (shown below with SOAP request reformatted for clarity)

      Listen Port: 8551
      Target Host: 172.16.1.41
      Target Port: 8080
      ==== Request ====
      POST /jboss-net/services/TTSysServicesSoap HTTP/1.1
      VsDebuggerCausalityData: AwAAAGG9sGcPOvpCtpkHGZt4FXcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
      User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.4322.573)
      Content-Type: text/xml; charset=utf-8
      SOAPAction: "http://repository.towertech.com/login"
      Content-Length: 572
      Expect: 100-continue
      Connection: Keep-Alive
      Host: 172.16.1.41

      <?xml version="1.0" encoding="utf-8"?>
      <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:tns="http://repository.towertech.com/"
      xmlns:types="http://repository.towertech.com/encodedTypes"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <tns:login>
      <userID xsi:type="xsd:string">tower
      <password xsi:type="xsd:string" />
      </tns:login>
      </soap:Body>
      </soap:Envelope>
      ==== Response ====
      HTTP/1.1 500 Internal Server Error
      Date: Tue, 15 Jul 2003 23:44:47 GMT
      Server: Jetty/4.2.9 (SunOS/5.8 sparc java/1.3.1_03)
      Content-Type: text/xml; charset=utf-8
      Transfer-Encoding: chunked

      c2c
      <?xml version="1.0" encoding="UTF-8"?>
      <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <soapenv:Body>
      <soapenv:Fault>
      <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Server.userException
      org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.

      <ns2:stackTrace xmlns:ns2="http://xml.apache.org/axis/">org.xml.sax.SAXException: SimpleDeserializer encountered a child element, which is NOT expected, in something it was trying to deserialize.
      at org.apache.axis.encoding.ser.SimpleDeserializer.onStartChild(SimpleDeserializer.java:188)
      at org.apache.axis.encoding.DeserializationContextImpl.startElement(DeserializationContextImpl.java:893)
      at org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:200)
      at org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:684)
      at org.apache.axis.message.RPCElement.deserialize(RPCElement.java:207)
      at org.apache.axis.message.RPCElement.getParams(RPCElement.java:265)
      at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:190)
      at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:276)
      at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:71)
      at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
      at org.apache.axis.SimpleChain.invoke(SimpleChain.java:126)
      at org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:437)
      at org.apache.axis.server.AxisServer.invoke(AxisServer.java:316)
      at org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:701)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
      at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:335)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:360)
      at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294)
      at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:558)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1714)
      at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:507)
      at org.mortbay.http.HttpContext.handle(HttpContext.java:1664)
      at org.mortbay.http.HttpServer.service(HttpServer.java:863)
      at org.jboss.jetty.Jetty.service(Jetty.java:460)
      at org.mortbay.http.HttpConnection.service(HttpConnection.java:775)
      at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:939)
      at org.mortbay.http.HttpConnection.handle(HttpConnection.java:792)
      at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:201)
      at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
      at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:455)
      </ns2:stackTrace>

      </soapenv:Fault>
      </soapenv:Body>
      </soapenv:Envelope>
      0

      - Notice from the SOAP response above that the JBoss server is generating exceptions which I couldn't figure out why these exceptions are occuring and how to resolve the problem

      Any help will be much appreciated.

      Thanks in advance,
      Leo