Check-in [284717ad56]
Not logged in
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

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

Overview
Comment:http package complained about wrong list. Cause is, that any "{}" was replaced by double quotes, destroying the list structure (resulting in SOAPAction ""service:method"" ) Ticket [ab9ad7b044]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 284717ad56f74904d377d66c9577b1661116ddcc
User & Date: oehhar 2015-06-16 16:43:22
References
2015-06-16 16:45 Closed ticket [ab9ad7b044]: Trying [9c7e118edb] results in http error plus 1 other change artifact: 726ea9c0de user: oehhar
Context
2015-06-16 17:05
Return http error messages for authentication and server errorrs. Ticket [ea054d339d] check-in: 3647d0b69f user: oehhar tags: trunk
2015-06-16 16:43
http package complained about wrong list. Cause is, that any "{}" was replaced by double quotes, destroying the list structure (resulting in SOAPAction ""service:method"" ) Ticket [ab9ad7b044] check-in: 284717ad56 user: oehhar tags: trunk
2015-06-02 15:13
http package complained about wrong list. Cause is, that any "{}" was replaced by double quotes, destroying the list structure (resulting in SOAPAction ""service:method"" ) Ticket [ab9ad7b044] Closed-Leaf check-in: 450754413a user: oehhar tags: bug-ab9ad7b044
2015-05-24 01:25
Another partial fix. check-in: 9c7e118edb user: gerald tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ClientSide.tcl.

   907    907   proc ::WS::Client::GetAndParseWsdl {url {headers {}} {serviceAlias {}}} {
   908    908       variable currentBaseUrl
   909    909   
   910    910       set currentBaseUrl $url
   911    911       switch -exact -- [dict get [::uri::split $url] scheme] {
   912    912           file {
   913    913               upvar #0 [::uri::geturl $url] token
   914         -            set wsdlInfo [ParseWsdl $token(data) -headers [string map {\{ \" \} \"} $headers] -serviceAlias $serviceAlias]
          914  +            set wsdlInfo [ParseWsdl $token(data) -headers $headers -serviceAlias $serviceAlias]
   915    915               unset token
   916    916           }
   917    917           http -
   918    918           https {
   919    919               if {[llength $headers]} {
   920         -                set token [::WS::Utils::geturl_followRedirects $url -headers [string map {\{ \" \} \"} $headers]]
          920  +                set token [::WS::Utils::geturl_followRedirects $url -headers $headers]
   921    921               } else {
   922    922                   set token [::WS::Utils::geturl_followRedirects $url]
   923    923               }
   924    924               ::http::wait $token
   925         -            set wsdlInfo [ParseWsdl [::http::data $token] -headers [string map {\{ \" \} \"} $headers] -serviceAlias $serviceAlias]
          925  +            set wsdlInfo [ParseWsdl [::http::data $token] -headers $headers -serviceAlias $serviceAlias]
   926    926               ::http::cleanup $token
   927    927           }
   928    928           default {
   929    929               return \
   930    930                   -code error \
   931    931                   -errorcode [list WS CLIENT UNKURLTYP $url] \
   932    932                   "Unknown URL type '$url'"
................................................................................
  1273   1273       if {[dict exists $serviceInfo headers]} {
  1274   1274           set headers [concat $headers [dict get $serviceInfo headers]]
  1275   1275       }
  1276   1276       if {[dict exists $serviceInfo operation $operationName action]} {
  1277   1277           lappend headers  SOAPAction [format {"%s"} [dict get $serviceInfo operation $operationName action]]
  1278   1278       }
  1279   1279       if {[llength $headers]} {
  1280         -        ::log::log info [list ::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers [string map {\{ \" \} \"} $headers]]
  1281         -        set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers [string map {\{ \" \} \"} $headers]]
         1280  +        ::log::log info [list ::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers $headers]
         1281  +        set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers $headers]
  1282   1282       } else {
  1283   1283           ::log::log info [::http::geturl $url -query $query -type [dict get $serviceInfo contentType]]
  1284   1284           set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType]]
  1285   1285       }
  1286   1286       ::http::wait $token
  1287   1287   
  1288   1288       ##
................................................................................
  1401   1401       if {[dict exists $serviceInfo headers]} {
  1402   1402           set headers [concat $headers [dict get $serviceInfo headers]]
  1403   1403       }
  1404   1404       if {[dict exists $serviceInfo operation $operationName action]} {
  1405   1405           lappend headers  SOAPAction [format {"%s"} [dict get $serviceInfo operation $operationName action]]
  1406   1406       }
  1407   1407       if {[llength $headers]} {
  1408         -        ::log::log info [list ::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers [string map {\{ \" \} \"} $headers]]
  1409         -        set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers [string map {\{ \" \} \"} $headers]]
         1408  +        ::log::log info [list ::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers $headers]
         1409  +        set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers $headers]
  1410   1410       } else {
  1411   1411           ::log::log info  [list ::http::geturl $url -query $query -type [dict get $serviceInfo contentType]  ]
  1412   1412           set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType] ]
  1413   1413       }
  1414   1414       ::http::wait $token
  1415   1415   
  1416   1416       ##
................................................................................
  1564   1564           RestoreSavedOptions $serviceName
  1565   1565       }
  1566   1566       if {[llength $headers]} {
  1567   1567           ::log::log info [list \
  1568   1568               ::http::geturl $url \
  1569   1569                   -query $query \
  1570   1570                   -type [dict get $serviceInfo contentType] \
  1571         -                -headers [string map {\{ \" \} \"} $headers] \
         1571  +                -headers $headers \
  1572   1572                   -command [list ::WS::Client::asyncCallDone $serviceName $operationName $succesCmd $errorCmd] \
  1573   1573           ]
  1574   1574           ::http::geturl $url \
  1575   1575               -query $query \
  1576   1576               -type [dict get $serviceInfo contentType] \
  1577         -            -headers [string map {\{ \" \} \"} $headers] \
         1577  +            -headers $headers \
  1578   1578               -command [list ::WS::Client::asyncCallDone $serviceName $operationName $succesCmd $errorCmd]
  1579   1579       } else {
  1580   1580           ::log::log info [list \
  1581   1581               ::http::geturl $url \
  1582   1582                   -query $query \
  1583   1583                   -type [dict get $serviceInfo contentType] \
  1584   1584                   -command [list ::WS::Client::asyncCallDone $serviceName $operationName $succesCmd $errorCmd] \
................................................................................
  3146   3146       } else {
  3147   3147           RestoreSavedOptions $serviceName
  3148   3148       }
  3149   3149       if {[dict exists $serviceInfo headers]} {
  3150   3150           set headers [concat $headers [dict get $serviceInfo headers]]
  3151   3151       }
  3152   3152       if {[llength $headers]} {
  3153         -        ::log::log info [list ::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers [string map {\{ \" \} \"} $headers]]
  3154         -        set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers [string map {\{ \" \} \"} $headers]]
         3153  +        ::log::log info [list ::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers $headers]
         3154  +        set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers $headers]
  3155   3155       } else {
  3156   3156           ::log::log [list ::http::geturl $url -query $query -type [dict get $serviceInfo contentType]]
  3157   3157           set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType]]
  3158   3158       }
  3159   3159       ::http::wait $token
  3160   3160   
  3161   3161       ##
................................................................................
  3271   3271       } else {
  3272   3272           RestoreSavedOptions $serviceName
  3273   3273       }
  3274   3274       if {[dict exists $serviceInfo headers]} {
  3275   3275           set headers [concat $headers [dict get $serviceInfo headers]]
  3276   3276       }
  3277   3277       if {[llength $headers]} {
  3278         -        ::log::log info [list ::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers [string map {\{ \" \} \"} $headers]]
  3279         -        set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers [string map {\{ \" \} \"} $headers]]
         3278  +        ::log::log info [list ::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers $headers]
         3279  +        set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType] -headers $headers]
  3280   3280       } else {
  3281   3281           ::log::log info [list::http::geturl $url -query $query -type [dict get $serviceInfo contentType]]
  3282   3282           set token [::http::geturl $url -query $query -type [dict get $serviceInfo contentType]]
  3283   3283       }
  3284   3284       ::http::wait $token
  3285   3285   
  3286   3286       ##
................................................................................
  3383   3383   #
  3384   3384   ###########################################################################
  3385   3385   proc ::WS::Client::DoRestAsyncCall {serviceName objectName operationName argList succesCmd errorCmd {headers {}}} {
  3386   3386       variable serviceArr
  3387   3387   
  3388   3388       set svcHeaders [dict get $serviceArr($serviceName) headers]
  3389   3389       if {[llength $svcHeaders]} {
  3390         -        lappend headers $svcHeaders
         3390  +        set headers [concat $headers $svcHeaders]
  3391   3391       }
  3392   3392       ::log::log debug "Entering ::WS::Client::DoAsyncRestCall [list $serviceName $objectName $operationName $argList $succesCmd $errorCmd $headers]"
  3393   3393       if {![info exists serviceArr($serviceName)]} {
  3394   3394           return \
  3395   3395               -code error \
  3396   3396               -errorcode [list WS CLIENT UNKSRV $serviceName] \
  3397   3397               "Unknown service '$serviceName'"
................................................................................
  3415   3415           RestoreSavedOptions $serviceName
  3416   3416       }
  3417   3417       if {[llength $headers]} {
  3418   3418           ::log::log info [list \
  3419   3419               ::http::geturl $url \
  3420   3420                   -query $query \
  3421   3421                   -type [dict get $serviceInfo contentType] \
  3422         -                -headers [string map {\{ \" \} \"} $headers] \
         3422  +                -headers $headers \
  3423   3423                   -command [list ::WS::Client::asyncRestCallDone $serviceName $operationName $succesCmd $errorCmd] \
  3424   3424           ]
  3425   3425           ::http::geturl $url \
  3426   3426               -query $query \
  3427   3427               -type [dict get $serviceInfo contentType] \
  3428         -            -headers [string map {\{ \" \} \"} $headers] \
         3428  +            -headers $headers \
  3429   3429               -command [list ::WS::Client::asyncRestCallDone $serviceName $operationName $succesCmd $errorCmd]
  3430   3430       } else {
  3431   3431           ::log::log info [list \
  3432   3432               ::http::geturl $url \
  3433   3433                   -query $query \
  3434   3434                   -type [dict get $serviceInfo contentType] \
  3435   3435                   -command [list ::WS::Client::asyncRestCallDone $serviceName $operationName $succesCmd $errorCmd] \