Check-in [e8d348f9f5]
Not logged in

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

Overview
Comment:Roll version number in Client to agree with package index.

Correct handling of file uri imports.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:e8d348f9f528757a34d5b50d4bd3bd483f1c396e
User & Date: gerald 2013-10-22 21:30:44
Context
2014-01-08 23:15
Fix for: [2c3ef042cf] -- Need to handle SOAP errors reported with HTTP-500 code. check-in: f7183d2c90 user: gerald tags: trunk
2013-10-22 21:30
Roll version number in Client to agree with package index.

Correct handling of file uri imports. check-in: e8d348f9f5 user: gerald tags: trunk

2013-10-03 21:47
Add documentation for ::WS::Utils::GenerateTemplateDict. check-in: 6d391b11b5 user: gerald tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ClientSide.tcl.

47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package require uri

catch {
    package require tls
    http::register https 443 ::tls::socket
}

package provide WS::Client 2.3.7

namespace eval ::WS::Client {
    ##
    ## serviceArr is indexed by service name and contains a dictionary that
    ## defines the service.  The dictionary has the following structure:
    ##   targetNamespace - the target namespace
    ##   operList - list of operations







|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package require uri

catch {
    package require tls
    http::register https 443 ::tls::socket
}

package provide WS::Client 2.3.8

namespace eval ::WS::Client {
    ##
    ## serviceArr is indexed by service name and contains a dictionary that
    ## defines the service.  The dictionary has the following structure:
    ##   targetNamespace - the target namespace
    ##   operList - list of operations

Changes to Utilities.tcl.

2889
2890
2891
2892
2893
2894
2895
2896


2897
2898



2899
2900

2901
2902
2903
2904

2905
2906
2907

2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
    ##
    if { [info exists importedXref($mode,$serviceName,$url)] } {
        ::log::log debug "$mode,$serviceName,$url was already imported: $importedXref($mode,$serviceName,$url)"
        return
    }
    dict lappend serviceInfo imports $url
    set importedXref($mode,$serviceName,$url) [list $mode $serviceName $tnsCount]
    switch -exact -- [dict get [::uri::split $url] scheme] {


        file {
            upvar #0 [::uri::geturl $url] token



            set xml $token(data)
            unset token

            ProcessImportXml $mode $baseUrl $xml $serviceName $serviceInfoVar $tnsCountVar
        }
        https -
        http {

            set ncode -1
            catch {
                set token [geturl_followRedirects $url]

                ::http::wait $token
                set ncode [::http::ncode $token]
                set xml [::http::data $token]
                ::http::cleanup $token
                ProcessImportXml $mode $baseUrl $xml $serviceName $serviceInfoVar $tnsCountVar
            }
            if {($ncode != 200) && [string equal $options(includeDirectory) {}]} {
                return \
                    -code error \
                    -errorcode [list WS CLIENT HTTPFAIL $url $ncode] \
                    "HTTP get of import file failed '$url'"
            } elseif {($ncode != 200) && ![string equal $options(includeDirectory) {}]} {
                set fn [file join  $options(includeDirectory) $urlTail]







|
>
>

<
>
>
>
|
<
>




>

<
|
>
|
|
|
|
|
<







2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899

2900
2901
2902
2903

2904
2905
2906
2907
2908
2909
2910

2911
2912
2913
2914
2915
2916
2917

2918
2919
2920
2921
2922
2923
2924
    ##
    if { [info exists importedXref($mode,$serviceName,$url)] } {
        ::log::log debug "$mode,$serviceName,$url was already imported: $importedXref($mode,$serviceName,$url)"
        return
    }
    dict lappend serviceInfo imports $url
    set importedXref($mode,$serviceName,$url) [list $mode $serviceName $tnsCount]
    set urlScheme [dict get [::uri::split $url] scheme]
    ::log::log debug "URL Scheme of {$url} is {$urlScheme}"
    switch -exact -- $urlScheme {
        file {

            ::log::log debug "In file processor -- {$urlTail}"
            set fn [file join  $options(includeDirectory) [string range $urlTail 8 end]]
            set ifd  [open $fn r]
            set xml [read $ifd]

            close $ifd
            ProcessImportXml $mode $baseUrl $xml $serviceName $serviceInfoVar $tnsCountVar
        }
        https -
        http {
            ::log::log debug "In http/https processor"
            set ncode -1

            set token [geturl_followRedirects $url]
            parray $token
            ::http::wait $token
            set ncode [::http::ncode $token]
            set xml [::http::data $token]
            ::http::cleanup $token
            ProcessImportXml $mode $baseUrl $xml $serviceName $serviceInfoVar $tnsCountVar

            if {($ncode != 200) && [string equal $options(includeDirectory) {}]} {
                return \
                    -code error \
                    -errorcode [list WS CLIENT HTTPFAIL $url $ncode] \
                    "HTTP get of import file failed '$url'"
            } elseif {($ncode != 200) && ![string equal $options(includeDirectory) {}]} {
                set fn [file join  $options(includeDirectory) $urlTail]