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

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

    delkant

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


      hi,
      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"
       xmlns:SOAPSDK2="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:SOAPSDK3="http://schemas.xmlsoap.org/soap/encoding/"
       xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
       <SOAP-ENV:Body>
       <SOAPSDK4:save
       xmlns:SOAPSDK4="http://localhost/eset/py/ServiceWS">
      
      
       <SOAPSDK4:name>SFOB936890A</SOAPSDK4:name>
      
       <SOAPSDK4:key>33</SOAPSDK4:key>
       <SOAPSDK4:xml>
      
       (a valid xml)
      
      
       </SOAPSDK4:xml>
       <SOAPSDK4:nroHash>8a250892</SOAPSDK4:nroHash></SOAPSDK4:save></SOAP-ENV:Body>
      </SOAP-ENV:Envelope>
      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
      
      
      
      51
      
      <env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/'><env:Header/>
      
      
      2a
      
      <env:Body><env:Fault><faultcode>env:Client
      
      
      c
      
      </faultcode>
      
      
      2f
      
      <faultstring>Cannot find child element: name
      
      
      e
      
      </faultstring>
      
      
      c
      
      </env:Fault>
      
      
      b
      
      </env:Body>
      
      
      f
      
      </env:Envelope>
      
      
      0
      
      
      
      


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



      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?

      thanks.



        • 1. Re: jws & visual b. soapsdk3.0, namespaces. JAXRPCException:
          heiko.braun

          What version of JBossWS are you using?

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

            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
             Next
            
             Serializer.endElement
             Serializer.EndBody
             Serializer.EndEnvelope
             Connector.EndMessage
             Reader.Load Connector.OutputStream
             If Not Reader.Fault Is Nothing Then
             MsgBox Reader.faultstring.Text, vbExclamation
             Else
             'Response is in Reader.DOM - just parse it
             'Reader.RPCResult.XML
             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
             Serializer.endElement
            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.