Ticket Change Details
Not logged in
Overview

Artifact ID: 058a9b60fa58d91f153c4eeb31e68f1e6437b0cc
Ticket: e8414f952499ac244c291e587281d80f94c40a17
WS Client does not capture right xml namespace for single return value
User & Date: oehhar 2015-06-03 10:21:29
Changes

  1. assigned_to changed to: "unassigned"
  2. comment changed to:
    I have a web server and client, both TCLWS.
    
    The issue is, that the result is not returned by the client.
    It is one text element.
    
    Trace:
    
    "::WS::Utils::convertTypeToDict" is called with the following log:
    
    <verbatim>
    ::WS::Utils::convertTypeToDict Client 1 domNode023D75F0 tns1:processResults domNode023D75C4 0
     	 type def = {definition {processResult {type xs:string comment {}}} xns tns1 abstract false} 
     	 XML of node is <pwsserverincmd:processResults>
         <pwsserverincmd:processResult>A</pwsserverincmd:processResult>
    </pwsserverincmd:processResults>
    
    	 partsList is {processResult}
    Type = {string} typeInfoList = {0 0}
    @3
    	partName processResult partType xs:string xns tns1 typeInfoList 0 0
    Trying #1 domNode023D75F0 selectNodes tns1:processResult
    Trying #2 domNode023D75F0 selectNodes tns1:processResult
    Trying #3 domNode023D75F0 selectNodes processResult
    Trying #4 -- search of children
    		 Looking at {processResult,pwsserverincmd:processResult} (0,0,ELEMENT_NODE,processResult)
    	Skipping
    Leaving ::WS::Utils::convertTypeToDict with {}
    </verbatim>
    
    So the right namespace for the result would be 'pwsserverincmd'.
    
    In Try 1, the tried namespace is the 'xns' property of the type definition, thus 'tns1'.
    
    I am not sure what to do or were the error is.
    
    Here is the wsdl file:
    <verbatim>
    <?xml version="1.0"  encoding="utf-8"?>
    <wsdl:definitions
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
      xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
      xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:pwsserverincmd="http://168.200.0.164:8026/pws"
      targetNamespace="http://168.200.0.164:8026/pws">
        <wsdl:types>
            <xs:schema elementFormDefault="qualified" targetNamespace="http://168.200.0.164:8026/pws">
                <xs:element name="processRequest" type="pwsserverincmd:processRequest"/>
                <xs:complexType name="processRequest">
                    <xs:sequence>
                        <xs:element maxOccurs="1" minOccurs="1" name="p1" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
                <xs:element name="processResults" type="pwsserverincmd:processResults"/>
                <xs:complexType name="processResults">
                    <xs:sequence>
                        <xs:element maxOccurs="1" minOccurs="1" name="processResult" type="xs:string"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:schema>
        </wsdl:types>
        <wsdl:message name="processIn">
            <wsdl:part name="parameters" element="pwsserverincmd:processRequest"/>
        </wsdl:message>
        <wsdl:message name="processOut">
            <wsdl:part name="parameters" element="pwsserverincmd:processResults"/>
        </wsdl:message>
        <wsdl:portType name="pwsserverincmdSoap">
            <wsdl:operation name="process">
                <wsdl:input message="pwsserverincmd:processIn"/>
                <wsdl:output message="pwsserverincmd:processOut"/>
            </wsdl:operation>
        </wsdl:portType>
        <wsdl:binding name="pwsserverincmdSoap" type="pwsserverincmd:pwsserverincmdSoap">
            <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
            <wsdl:operation name="process">
                <soap:operation soapAction="pwsserverincmd:process" style="document"/>
                <wsdl:input>
                    <soap:body use="literal"/>
                </wsdl:input>
                <wsdl:output>
                    <soap:body use="literal"/>
                </wsdl:output>
            </wsdl:operation>
        </wsdl:binding>
        <wsdl:service name="pwsserverincmd">
            <wsdl:documentation>Link3 Web Service</wsdl:documentation>
            <wsdl:port name="pwsserverincmdSoap" binding="pwsserverincmd:pwsserverincmdSoap">
                <soap:address location="http://168.200.0.164:8026/pws/op"/>
            </wsdl:port>
        </wsdl:service>
    </wsdl:definitions>
    </verbatim>
    
    Here is the preparsed dict:
    <verbatim>
    types {
      tns1:processRequest {
        definition {
          p1 {type xs:string comment {}}
        }
        xns tns1
        abstract false}
      tns1:processResults {
        definition {
          processResult {type xs:string comment {}}
        }
        xns tns1
        abstract false}
    }
    operList process
    objList {}
    headers {}
    targetNamespace {
      tns1 https://168.200.0.164:8026/pws
      w http://schemas.xmlsoap.org/wsdl/
      tns2 http://schemas.xmlsoap.org/wsdl/http/
      tns3 http://schemas.xmlsoap.org/wsdl/mime/
      xs http://www.w3.org/2001/XMLSchema d http://schemas.xmlsoap.org/wsdl/soap/ 
      tns4 http://schemas.xmlsoap.org/soap/encoding/
    }
    name 1
    location https://168.200.0.164:8026/pws/op
    style WSDL
    imports {}
    inTransform {}
    outTransform {}
    skipLevelOnReply 0
    suppressTargetNS 0
    contentType {text/xml;charset=utf-8}
    genOutAttr {} UseNS {} suppressNS {}
    allowOperOverloading 1
    skipLevelWhenActionPresent 0
    skipHeaderLevel 0
    useTypeNs {}
    errorOnRedefine 0
    noTargetNs 0
    parseInAttr {}
    nsOnChangeOnly {}
    valueAttrCompatiblityMode 1
    xns {
      {tns1 https://168.200.0.164:8026/pws}
      {w http://schemas.xmlsoap.org/wsdl/}
      {tns2 http://schemas.xmlsoap.org/wsdl/http/}
      {tns3 http://schemas.xmlsoap.org/wsdl/mime/}
      {xs http://www.w3.org/2001/XMLSchema}
      {d http://schemas.xmlsoap.org/wsdl/soap/}
      {tns4 http://schemas.xmlsoap.org/soap/encoding/}
    }
    tnsList {
      url {
        https://168.200.0.164:8026/pws tns1
        http://schemas.xmlsoap.org/wsdl/ w
        http://schemas.xmlsoap.org/wsdl/http/ tns2
        http://schemas.xmlsoap.org/wsdl/mime/ tns3
        http://www.w3.org/2001/XMLSchema xs
        http://schemas.xmlsoap.org/wsdl/soap/ d
        http://schemas.xmlsoap.org/soap/encoding/ tns4
      }
      tns {
        wsdl w
        http tns2
        mime tns3
        xs xs
        soap d
        soapenc tns4
        pwsserverincmd tns1
      }
    }
    tns {}
    elements {
      tns1:processRequest 1
      tns1:processResults 1
    }
    operation {
      process {
        isClone 0
        cloneList {}
        cloned 0
        name process
        style document/literal
        action pwsserverincmd:process
        soapRequestHeader {{}}
        soapReplyHeader {{}}
        inputs tns1:processRequest
        outputs tns1:processResults
        xns tns1
      }
    }
    soapActions {pwsserverincmd:process process}
    inputMessages {tns1:processRequest process}
    simpletypes {}
    </verbatim>
    
    The call to the web service (argument p1 was received by server):
    <verbatim>
    <?xml version="1.0"  encoding="utf-8"?>
    <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"
      xmlns="https://168.200.0.164:8026/pws"
      xmlns:tns1="https://168.200.0.164:8026/pws"
      xmlns:w="http://schemas.xmlsoap.org/wsdl/"
      xmlns:tns2="http://schemas.xmlsoap.org/wsdl/http/"
      xmlns:tns3="http://schemas.xmlsoap.org/wsdl/mime/"
      xmlns:d="http://schemas.xmlsoap.org/wsdl/soap/"
      xmlns:tns4="http://schemas.xmlsoap.org/soap/encoding/">
      <SOAP-ENV:Body>
        <tns1:processRequest>
          <tns1:p1>
            ABC
          </tns1:p1>
        </tns1:processRequest>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    </verbatim>
    
    And here is the response of the web server:
    <verbatim>
    <?xml version="1.0"  encoding="utf-8"?>
    <SOAP-ENV:Envelope
      xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
      xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" 
      xmlns:xsd="http://www.w3.org/1999/XMLSchema"
      xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
      xmlns:pwsserverincmd="http://168.200.0.164:8026/pws">
      <SOAP-ENV:Body>
        <pwsserverincmd:processResults>
          <pwsserverincmd:processResult>
            A
          </pwsserverincmd:processResult>
        </pwsserverincmd:processResults>
      </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    </verbatim>
    
    So my question: what is going wrong ?
    Where is the issue, server or client ?
    
    This is also a marker for myself to investigate further...
    
    Thank you all,
    Harald
    
  3. foundin changed to: "trunk"
  4. private_contact changed to: "0f366eb3e9e2fcab52b8ebacd197db9047186a5f"
  5. severity changed to: "Important"
  6. status changed to: "Open"
  7. subsystem changed to: "Client_Side"
  8. title changed to:
    WS Client does not capture right xml namespace for single return value
    
  9. type changed to: "Code_Defect"