Overview
Artifact ID: | 041a120b9138df66e60cdf0206481f7c39e77b596e5cd604266517a575d0b38b |
---|---|
Ticket: | 584bfb772724c1a938f671b8a9ac1d57b2d70f58
WS::Client returns nonsense for abstract types |
User & Date: | oehhar 2018-05-12 13:00:01 |
Changes
- Appended to comment:
<hr /><i>oehhar added on 2018-05-12 13:00:01 UTC:</i><br /> One day further... I think, the point is just not implemented. As the namespace prefix is given as attribute in the response (see xsi::type="tns:EnvelopeN"): <verbatim> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.esri.com/schemas/ArcGIS/10.3"> <soap:Body> <tns:GetServerInfoResponse> <Result xsi:type="tns:MapServerInfo"> <Name>Layers</Name> <Description></Description> <FullExtent xsi:type="tns:EnvelopeN"> <XMin>-8883833.3022622615</XMin> </verbatim> it is not translated by tdom. How should tdom know, that there is a prefix to translate within an attribute? So, I suppose the functionality is just missing. I suppose, the issue is here: <verbatim> proc ::WS::Utils::convertTypeToDict {mode serviceName node type root {isArray 0}} { ... if {$isAbstract && [$item hasAttributeNS {http://www.w3.org/2001/XMLSchema-instance} type]} { # partType is now tns::EnvelopeN set partType [$item getAttributeNS {http://www.w3.org/2001/XMLSchema-instance} type] # The type attribute is removed from the snippet. # So, it is not handled in the loop below. $item removeAttributeNS {http://www.w3.org/2001/XMLSchema-instance} type ... } ... dict set results $partName $valueAttr [convertTypeToDict $mode $serviceName $item $partType $root] </verbatim> After the abstract type is resolved, an eventual namespace prefix should be detected in partType and replaced by the tclws prefix. For that, the Envelope element should be analysed and a table should be build: <verbatim> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.esri.com/schemas/ArcGIS/10.3"> </verbatim> This should be done somewhere here: <verbatim> proc ::WS::Client::parseResults {serviceName operationName inXML} { ... $doc selectNodesNamespaces $xns </verbatim> There, we have the list of namespaces from the WSDL parse. I don't know now how to transport this table to recursive function "::WS::Utils::convertTypeToDict", but this will come with implementation try. Any thoughts welcome. I will hopefully soon try to implement this idea. Thank you, Harald