2 Replies Latest reply on Oct 25, 2006 11:43 AM by delkant

    jws & visual b. soapsdk3.0, namespaces. JAXRPCException: Can

    delkant Newbie

      jbossws and visual basic 6 soapsdk3.0, namespaces. JAXRPCException: Cannot find child element: String_1

      i'm using the soapsdk webservices tool for visual 6, trying to consume a webservice described with jbossws. this WS is also tested by a junit module, so it is working.

      when the packages are scaning in the network to see the soap message i get this.

      from my visual b. client

      POST /eset/EsetContribuyenteWS HTTP/1.1
      SOAPAction: ""
      Content-Type: text/xml; charset="UTF-8"
      User-Agent: SOAP Toolkit 3.0
      Host: rdelcanto:8080
      Content-Length: 1420
      Connection: Keep-Alive
      Cache-Control: no-cache
      Pragma: no-cache
      <?xml version="1.0" encoding="UTF-8" standalone="no"?>
      <SOAP-ENV:Envelope xmlns:SOAPSDK1="http://www.w3.org/2001/XMLSchema"
       (a valid xml)
      HTTP/1.1 500 Internal Server Error
      Server: Apache-Coyote/1.1
      X-Powered-By: Servlet 2.4; JBoss-4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)/Tomcat-5.5
      Set-Cookie: JSESSIONID=4941408F2755F3533A7050AD12C7B2C8; Path=/
      Content-Type: text/xml;charset=UTF-8
      Transfer-Encoding: chunked
      Date: Mon, 23 Oct 2006 22:33:51 GMT
      Connection: close
      <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/>
      <faultstring>Cannot find child element: name

      i think the problem is in the SOAPSDK4 namespace.. because without that name everything works fine, the thing is that

      i can't remove tha namespace becaus is generated by the soapsdk program from our friend Bill.

      my wsdl

      <definitions name="ServiceWS" targetNamespace="http://localhost/eset/py/ServiceWS">
       <message name="ServiceWSEndPoint_save">
      <part name="name" type="xsd:string"/>
      <part name="key" type="xsd:string"/>
      <part name="xml" type="xsd:string"/>
      <part name="nroHash" type="xsd:string"/>
       <message name="ServiceWSEndPoint_guardarDDJJResponse">
      <part name="result" type="xsd:string"/>
       <portType name="ServiceWSEndPoint">
       <operation name="guardarDDJJ" parameterOrder="Usuario Clave xmlDDJJ nroHash">
      <input message="tns:ServiceWSEndPoint_save"/>
      <output message="tns:ServiceWSEndPoint_saveResponse"/>
       <binding name="ServiceWSEndPointBinding" type="tns:ServiceWSEndPoint">
      <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
       <operation name="save">
      <soap:operation soapAction=""/>
      <soap:body namespace="http://localhost/eset/py/ServiceWS" use="literal"/>
      <soap:body namespace="http://localhost/eset/py/ServiceWS" use="literal"/>
       <service name="ServiceWS">
       <port binding="tns:ServiceWSEndPointBinding" name="ServiceWSEndPointPort">
      <soap:address location="http://delkant:8080/eset/ServiceWS"/>

      so, the cuestion is, how i can solve this?.
      i dont want to use visual but i have to.

      will we have a version of jbossws with a support for this feauture?


        • 1. Re: jws & visual b. soapsdk3.0, namespaces. JAXRPCException:
          Heiko Braun Master

          What version of JBossWS are you using?

          • 2. Re: jws & visual b. soapsdk3.0, namespaces. JAXRPCException:
            delkant Newbie

            I'm using jbossws 1.0.2 but i also made some test with 1.0.3, and still have the same problem, but wasn't a jbossws problem, i solve it using the low level soapsdk way, making line by line my own soap archive in visual b.

            Option Explicit
            Dim URL
            Const ENC = "http://schemas.xmlsoap.org/soap/encoding/"
            Const XSI = "http://www.w3.org/1999/XMLSchema-instance"
            Const XSD = "http://www.w3.org/1999/XMLSchema"
            Const NS = "http://localhost/eset/py/ServiceWS"
            Dim Method
            Dim Connector
            Dim Serializer
            Function init(aParameters, aValues) As String
             Dim URI
             URL = Parametros.SERVER_HOST & "/eset/ServiceWS?wsdl"
             Set Connector = CreateObject("MSSOAP.HttpConnector30")
             Set Serializer = CreateObject("MSSOAP.SoapSerializer30")
             Dim Reader
             Set Reader = CreateObject("MSSOAP.SoapReader30")
             URI = NS
             Connector.Property("EndPointURL") = URL
             Connector.Property("SoapAction") = Method
             Call Connector.Connect
             Call Connector.BeginMessage
             Serializer.init Connector.InputStream
             Serializer.StartEnvelope "soapenv", ENC
             Serializer.SoapNamespace "xsi", XSI
             Serializer.SoapNamespace "xsd", XSD
             Serializer.StartBody "soapenv"
             Serializer.startElement Method
             Serializer.SoapAttribute "xmlns", "", NS, ""
             Dim iCount
             iCount = 0
             Dim sP
             For Each sP In aParameters
             WriteElement sP, aValues(iCount)
             'MsgBox(sP & ":" & aValues(iCount))
             iCount = iCount + 1
             Reader.Load Connector.OutputStream
             If Not Reader.Fault Is Nothing Then
             MsgBox Reader.faultstring.Text, vbExclamation
             'Response is in Reader.DOM - just parse it
             init = Reader.RPCResult.Text
             End If
            End Function
            Sub WriteElement(sName, sValue)
             'MsgBox(sName & ":" & sValue)
             Serializer.startElement sName
             'Serializer.SoapAttribute "type", , "xsd:string", "xsi"
             Serializer.SoapAttribute "xmlns", "", "", ""
             Serializer.WriteString sValue
            End Sub
            Public Function aSpecifMethod(pamam1 As String, param2 As String) As String
             Dim result
             Dim aParameters
             Dim aValues
            '(sName, sValue)
             Method = "aSpecifMethod"
             aParameters = Array("String_1", "String_2")
             aValues = Array(param1, param2)
             aSpecifMethod = init(aParameters, aValues)
            End Function

            this code works fine on visual basic.