Check-in [667c024d14]

Not logged in

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

Overview
Comment:Add change history message (assuming next version is 2.6.1) and clean up whitespace
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:667c024d147df929c8296a15f69542904e8cebbccd7abe7ce0ace2f942583827
User & Date: andy 2018-07-20 16:50:55
Context
2018-07-24 02:42
Clean up end-of-line whitespace check-in: 178aaf8434 user: andy tags: trunk
2018-07-20 16:50
Add change history message (assuming next version is 2.6.1) and clean up whitespace check-in: 667c024d14 user: andy tags: trunk
2018-07-20 16:02
Avoid debug [puts] check-in: 8d89b3237b user: andy tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Utilities.tcl.

55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
...
750
751
752
753
754
755
756

757
758
759
760
761
762
763
....
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
....
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
....
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
....
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
    }
}

package require log

# Emulate the log::logsubst command introduced in log 1.4
if {![llength [info command ::log::logsubst]]} {
	proc ::log::logsubst {level text} {
		if {[::log::lvIsSuppressed $level]} {
			return
		}
		::log::log $level [uplevel 1 [list subst $text]]
	}
}

package require tdom 0.8
package require struct::set

package provide WS::Utils 2.6.0

................................................................................
# Maintenance History - as this file is modified, please be sure that you
#                       update this segment of the file header block by
#                       adding a complete entry at the bottom of the list.
#
# Version     Date     Programmer   Comments / Changes / Reasons
# -------  ----------  ----------   -------------------------------------------
#       1  08/06/2006  G.Lester     Initial version

#
#
###########################################################################
proc ::WS::Utils::ProcessImportXml {mode baseUrl xml serviceName serviceInfoVar tnsCountVar} {
    ::log::logsubst debug {Entering [info level 0]}
    upvar 1 $serviceInfoVar serviceInfo
    upvar 1 $tnsCountVar tnsCount
................................................................................
                    ## The element FullExtend gets type "tns:EnvelopeN".
                    ##
                    ## xnsDistantToLocalDict
                    if {$isAbstract && [$item hasAttributeNS {http://www.w3.org/2001/XMLSchema-instance} type]} {
                        # partType is now tns::EnvelopeN
                        set partType [XNSDistantToLocal $xnsDistantToLocalDict\
                                [$item getAttributeNS {http://www.w3.org/2001/XMLSchema-instance} type]]
                        
                        # Remove this type attribute from the snippet.
                        # So, it is not handled in the loop below.
                        $item removeAttributeNS {http://www.w3.org/2001/XMLSchema-instance} type
                    }
                    foreach attrList [$item attributes] {
                        catch {
                            lassign $attrList attr nsAlias nsUrl
................................................................................
    set typeInfoList [TypeInfo $mode $service $type]
    set type [string trimright $type {?}]
    if {[dict exists $typeInfo $mode $service $service:$type]} {
        set typeName $service:$type
    } else {
        set typeName $type
    }
	set itemList {}
    if {[lindex $typeInfoList 0] && [dict exists $typeInfo $mode $service $typeName definition]} {
        set itemList [dict get $typeInfo $mode $service $typeName definition]
        set xns [dict get $typeInfo $mode $service $typeName xns]
    } else {
        set xns $simpleTypes($mode,$service,$typeName)
        set itemList [list $typeName {type string}]
    }
................................................................................
                ##      <xs:extension base="Geometry" />
                ##    </xs:complexContent>
                ##  </xs:complexType>
                ##  ...
                ##  <xs:complexType name="Geometry">
                ##    <xs:annotation><xs:documentation /></xs:annotation>
                ##  </xs:complexType>
                
                set isComplexContent [expr {$middle eq "complexContent"}]
                ::log::logsubst debug {isComplexContent = $isComplexContent}
                
                ##
                ## Loop over the components of the type
                ##
                foreach child [$middleNode childNodes] {
                    set parent [$child parent]
                    set contentType [$child localName]
                    ::log::logsubst debug {Content Type is {$contentType}}
................................................................................
        set codeVar [lindex $args 1]
        set args [lrange $args 2 end]
    }
    if {[lindex $args 0] eq "-bodyalwaysok"} {
        set bodyAlwaysOk [lindex $args 1]
        set args [lrange $args 2 end]
    }
    
    set token [eval ::WS::Utils::geturl_followRedirects $args]
    ::http::wait $token
    if {[::http::status $token] eq {ok}} {
        if {[::http::size $token] == 0} {
            ::log::log debug "\tHTTP error: no data"
            ::http::cleanup $token
            return -errorcode [list WS CLIENT NODATA [lindex $args 0]]\







|
|
|
|
|
|







 







>







 







|







 







|







 







|


|







 







|







55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
...
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
....
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
....
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
....
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
....
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
    }
}

package require log

# Emulate the log::logsubst command introduced in log 1.4
if {![llength [info command ::log::logsubst]]} {
    proc ::log::logsubst {level text} {
        if {[::log::lvIsSuppressed $level]} {
            return
        }
        ::log::log $level [uplevel 1 [list subst $text]]
    }
}

package require tdom 0.8
package require struct::set

package provide WS::Utils 2.6.0

................................................................................
# Maintenance History - as this file is modified, please be sure that you
#                       update this segment of the file header block by
#                       adding a complete entry at the bottom of the list.
#
# Version     Date     Programmer   Comments / Changes / Reasons
# -------  ----------  ----------   -------------------------------------------
#       1  08/06/2006  G.Lester     Initial version
#   2.6.1  07/20/2018  A.Goth       Correct variable access problems
#
#
###########################################################################
proc ::WS::Utils::ProcessImportXml {mode baseUrl xml serviceName serviceInfoVar tnsCountVar} {
    ::log::logsubst debug {Entering [info level 0]}
    upvar 1 $serviceInfoVar serviceInfo
    upvar 1 $tnsCountVar tnsCount
................................................................................
                    ## The element FullExtend gets type "tns:EnvelopeN".
                    ##
                    ## xnsDistantToLocalDict
                    if {$isAbstract && [$item hasAttributeNS {http://www.w3.org/2001/XMLSchema-instance} type]} {
                        # partType is now tns::EnvelopeN
                        set partType [XNSDistantToLocal $xnsDistantToLocalDict\
                                [$item getAttributeNS {http://www.w3.org/2001/XMLSchema-instance} type]]

                        # Remove this type attribute from the snippet.
                        # So, it is not handled in the loop below.
                        $item removeAttributeNS {http://www.w3.org/2001/XMLSchema-instance} type
                    }
                    foreach attrList [$item attributes] {
                        catch {
                            lassign $attrList attr nsAlias nsUrl
................................................................................
    set typeInfoList [TypeInfo $mode $service $type]
    set type [string trimright $type {?}]
    if {[dict exists $typeInfo $mode $service $service:$type]} {
        set typeName $service:$type
    } else {
        set typeName $type
    }
    set itemList {}
    if {[lindex $typeInfoList 0] && [dict exists $typeInfo $mode $service $typeName definition]} {
        set itemList [dict get $typeInfo $mode $service $typeName definition]
        set xns [dict get $typeInfo $mode $service $typeName xns]
    } else {
        set xns $simpleTypes($mode,$service,$typeName)
        set itemList [list $typeName {type string}]
    }
................................................................................
                ##      <xs:extension base="Geometry" />
                ##    </xs:complexContent>
                ##  </xs:complexType>
                ##  ...
                ##  <xs:complexType name="Geometry">
                ##    <xs:annotation><xs:documentation /></xs:annotation>
                ##  </xs:complexType>

                set isComplexContent [expr {$middle eq "complexContent"}]
                ::log::logsubst debug {isComplexContent = $isComplexContent}

                ##
                ## Loop over the components of the type
                ##
                foreach child [$middleNode childNodes] {
                    set parent [$child parent]
                    set contentType [$child localName]
                    ::log::logsubst debug {Content Type is {$contentType}}
................................................................................
        set codeVar [lindex $args 1]
        set args [lrange $args 2 end]
    }
    if {[lindex $args 0] eq "-bodyalwaysok"} {
        set bodyAlwaysOk [lindex $args 1]
        set args [lrange $args 2 end]
    }

    set token [eval ::WS::Utils::geturl_followRedirects $args]
    ::http::wait $token
    if {[::http::status $token] eq {ok}} {
        if {[::http::size $token] == 0} {
            ::log::log debug "\tHTTP error: no data"
            ::http::cleanup $token
            return -errorcode [list WS CLIENT NODATA [lindex $args 0]]\