Check-in [57a60e547b]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Allow inline namespaces in WSDL. RFE [dcce437d7aa5e64a]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | rfe-dcce437d7aa5e64a
Files: files | file ages | folders
SHA1:57a60e547b82da24650a0301b5632a6c0cdd9214
User & Date: oehhar 2017-04-07 06:54:32
References
2017-04-07 06:58 Ticket [dcce437d7a] Allow inline namespaces in WSDL status still New with 1 other change artifact: 8eab0fb39e user: oehhar
Context
2017-04-10 17:46
Removed exec flag check-in: d7b6d160c6 user: oehhar tags: rfe-dcce437d7aa5e64a
2017-04-07 06:54
Allow inline namespaces in WSDL. RFE [dcce437d7aa5e64a] check-in: 57a60e547b user: oehhar tags: rfe-dcce437d7aa5e64a
2016-11-23 16:40
Fix for bug [6bdf06291d] -- undefined variable when asynch call fails. check-in: 51c849b483 user: gerald tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ClientSide.tcl.

1032
1033
1034
1035
1036
1037
1038











1039


1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
    $tmpdoc xslt $::WS::Utils::xsltSchemaDom wsdlDoc
    $tmpdoc delete
    $wsdlDoc documentElement wsdlNode
    set nsCount 1
    set targetNs [$wsdlNode getAttribute targetNamespace]
    set ::WS::Utils::targetNs $targetNs
    dict set nsDict url $targetNs tns$nsCount











    foreach itemList [$wsdlNode attributes xmlns:*] {


        set ns [lindex $itemList 0]
        set url [$wsdlNode getAttribute xmlns:$ns]
        if {[dict exists $nsDict url $url]} {
            set tns [dict get $nsDict url $url]
        } else {
            ##
            ## Check for hardcoded namespaces
            ##
            switch -exact -- $url {
                http://schemas.xmlsoap.org/wsdl/ {
                    set tns w
                }
                http://schemas.xmlsoap.org/wsdl/soap/ {
                    set tns d
                }
                http://www.w3.org/2001/XMLSchema {
                    set tns xs
                }
                default {
                    set tns tns[incr nsCount]
                }
            }
            dict set nsDict url $url $tns
        }
        dict set nsDict tns $ns $tns
    }
    $wsdlDoc selectNodesNamespaces {
        w http://schemas.xmlsoap.org/wsdl/
        d http://schemas.xmlsoap.org/wsdl/soap/
        xs http://www.w3.org/2001/XMLSchema
    }

    if {[info exists currentBaseUrl]} {
        set url $currentBaseUrl
    } else {
        set url $targetNs
    }








>
>
>
>
>
>
>
>
>
>
>
|
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<
<
<
<








1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078




1079
1080
1081
1082
1083
1084
1085
1086
    $tmpdoc xslt $::WS::Utils::xsltSchemaDom wsdlDoc
    $tmpdoc delete
    $wsdlDoc documentElement wsdlNode
    set nsCount 1
    set targetNs [$wsdlNode getAttribute targetNamespace]
    set ::WS::Utils::targetNs $targetNs
    dict set nsDict url $targetNs tns$nsCount

    $wsdlDoc selectNodesNamespaces {
        w http://schemas.xmlsoap.org/wsdl/
        d http://schemas.xmlsoap.org/wsdl/soap/
        xs http://www.w3.org/2001/XMLSchema
    }

    set elems $wsdlNode
    set elems [concat $elems [$wsdlDoc selectNodes {//xs:element}]]

    foreach elemNode $elems {
      set xmlnsAttributes [$elemNode attributes xmlns:*] 

      foreach itemList $xmlnsAttributes {
          set ns [lindex $itemList 0]
          set url [$elemNode getAttribute xmlns:$ns]
          if {[dict exists $nsDict url $url]} {
              set tns [dict get $nsDict url $url]
          } else {
              ##
              ## Check for hardcoded namespaces
              ##
              switch -exact -- $url {
                  http://schemas.xmlsoap.org/wsdl/ {
                      set tns w
                  }
                  http://schemas.xmlsoap.org/wsdl/soap/ {
                      set tns d
                  }
                  http://www.w3.org/2001/XMLSchema {
                      set tns xs
                  }
                  default {
                      set tns tns[incr nsCount]
                  }
              }
              dict set nsDict url $url $tns
          }
          dict set nsDict tns $ns $tns
      }




    }

    if {[info exists currentBaseUrl]} {
        set url $currentBaseUrl
    } else {
        set url $targetNs
    }