Check-in [94ea895cf9]
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 tclconference@googlegroups.com
or submit via the online form by Sep 9.

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

Overview
Comment:Partial fix for [bcdbb594db].

It may be the entire fix -- waiting on feed back.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:94ea895cf9ccfc989169a5d3abadc4d73b36aed6
User & Date: gerald 2015-05-23 17:03:16
Context
2015-05-23 17:12
Switched one of the debug statements back to info. check-in: 11b59f5d29 user: gerald tags: trunk
2015-05-23 17:03
Partial fix for [bcdbb594db].

It may be the entire fix -- waiting on feed back. check-in: 94ea895cf9 user: gerald tags: trunk

2015-05-08 02:38
Fix for [411a2eb59f] -- add double qutoes arround the SOAP Action. check-in: 80934c5bda user: gerald tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to ClientSide.tcl.

  2902   2902       if {[string equal $inName {}]} {
  2903   2903           set operQuery [format {w:portType[attribute::name='%s']/w:operation[attribute::name='%s']} \
  2904   2904                           $portName $operName]
  2905   2905       } else {
  2906   2906           set operQuery [format {w:portType[attribute::name='%s']/w:operation[attribute::name='%s']/w:input[attribute::name='%s']/parent::*} \
  2907   2907                           $portName $operName $inName]
  2908   2908       }
         2909  +    ::log:::log debug "\t operNode query is {$operQuery}"
  2909   2910       set operNode [$wsdlNode selectNodes $operQuery]
         2911  +    if {[string equal $operNode {}] && ![string equal $inName {}]} {
         2912  +        set operQuery [format {w:portType[attribute::name='%s']/w:operation[attribute::name='%s']} \
         2913  +                        $portName $operName]
         2914  +        ::log:::log debug "\t operNode query is {$operQuery}"
         2915  +        set operNode [$wsdlNode selectNodes $operQuery]
         2916  +    }
  2910   2917   
  2911   2918       set inputMsgNode [$operNode selectNodes {w:input}]
  2912   2919       if {![string equal $inputMsgNode {}]} {
  2913   2920           set inputMsgPath [$inputMsgNode getAttribute message]
  2914   2921           set inputMsg [lindex [split $inputMsgPath {:}] end]
  2915   2922           set inType [messageToType $wsdlNode $serviceName $operName $inputMsg serviceInfo $style]
  2916   2923       }

Changes to Utilities.tcl.

    55     55       }
    56     56   }
    57     57   
    58     58   package require log
    59     59   package require tdom 0.8
    60     60   package require struct::set
    61     61   
    62         -package provide WS::Utils 2.3.8
           62  +package provide WS::Utils 2.3.9
    63     63   
    64     64   namespace eval ::WS {}
    65     65   
    66     66   namespace eval ::WS::Utils {
    67     67       set ::WS::Utils::typeInfo {}
    68     68       set ::WS::Utils::currentSchema {}
    69     69       array set ::WS::Utils::importedXref {}
................................................................................
   804    804   ###########################################################################
   805    805   proc ::WS::Utils::ProcessIncludes {rootNode baseUrl {includePath {}}} {
   806    806       variable xsltSchemaDom
   807    807       variable nsList
   808    808       variable options
   809    809       variable includeArr
   810    810   
   811         -    set includeNodeList [$rootNode selectNodes -namespaces $nsList descendant::xs:include]
          811  +    ::log::log debug "ProcessIncludes base: {$baseUrl} inculde: {$includePath}"
          812  +
          813  +    set includeNodeList [concat \
          814  +                            [$rootNode selectNodes -namespaces $nsList descendant::xs:include] \
          815  +                            [$rootNode selectNodes -namespaces $nsList descendant::w:include] \
          816  +    ]
   812    817       set inXml [$rootNode asXML]
   813    818       set included 0
   814    819       foreach includeNode $includeNodeList {
   815         -        if {![$includeNode hasAttribute schemaLocation]} {
          820  +        ::log::log debug "\t Processing Include [$includeNode asXML]"
          821  +        if {[$includeNode hasAttribute schemaLocation]} {
          822  +            set urlTail [$includeNode getAttribute schemaLocation]
          823  +            set url [::uri::resolve $baseUrl  $urlTail]
          824  +        } elseif {[$includeNode hasAttribute location]} {
          825  +            set url [$includeNode getAttribute location]
          826  +            set urlTail [file tail [dict get [::uri::split $url] path]]
          827  +        } else {
   816    828               continue
   817    829           }
   818         -        set urlTail [$includeNode getAttribute schemaLocation]
   819         -        set url [::uri::resolve $baseUrl  $urlTail]
   820    830           if {[lsearch -exact $includePath $url] != -1} {
   821    831               log::log warning "Include loop detected: [join $includePath { -> }]"
   822    832               continue
   823    833           } elseif {[info exists includeArr($url)]} {
   824    834               continue
   825    835           } else {
   826    836               set includeArr($url) 1
   827    837           }
   828    838           incr included
   829         -        ::log::log info "\t Including {$url} from base {$baseUrl}"
          839  +        ::log::log debug "\t Including {$url} from base {$baseUrl}"
   830    840           switch -exact -- [dict get [::uri::split $url] scheme] {
   831    841               file {
   832    842                   upvar #0 [::uri::geturl $url] token
   833    843                   set xml $token(data)
   834    844                   unset token
   835    845               }
   836    846               https -
................................................................................
  2590   2600           array unset unkownRef
  2591   2601   
  2592   2602           foreach element [$schemaNode selectNodes -namespaces $nsList xs:import] {
  2593   2603               if {[catch {processImport $mode $baseUrl $element $serviceName serviceInfo tnsCount} msg]} {
  2594   2604                   ::log::log notice "Import failed due to: {$msg}.  Trace: $::errorInfo"
  2595   2605               }
  2596   2606           }
         2607  +
         2608  +        foreach element [$schemaNode selectNodes -namespaces $nsList w:import] {
         2609  +            if {[catch {processImport $mode $baseUrl $element $serviceName serviceInfo tnsCount} msg]} {
         2610  +                ::log::log notice "Import failed due to: {$msg}.  Trace: $::errorInfo"
         2611  +            }
         2612  +        }
  2597   2613   
  2598   2614           ::log::log debug  "Parsing Element types for $xns as $tns"
  2599   2615           foreach element [$schemaNode selectNodes -namespaces $nsList child::xs:element] {
  2600   2616               ::log::log debug "\tprocessing $element"
  2601   2617               if {[catch {parseElementalType $mode serviceInfo $serviceName $element $tns} msg]} {
  2602   2618                   ::log::log notice "Unhandled error: {$msg}.  Trace: $::errorInfo"
  2603   2619               }
................................................................................
  2664   2680       }
  2665   2681   
  2666   2682   
  2667   2683   
  2668   2684       ##
  2669   2685       ## Ok, one more pass to report errors
  2670   2686       ##
  2671         -    foreach element [$schemaNode selectNodes -namespaces $nsList xs:import] {
         2687  +    set importNodeList [concat \
         2688  +                            [$schemaNode selectNodes -namespaces $nsList xs:import] \
         2689  +                            [$schemaNode selectNodes -namespaces $nsList w:import] \
         2690  +    ]
         2691  +    foreach element $importNodeList {
  2672   2692           if {[catch {processImport $mode $baseUrl $element $serviceName serviceInfo tnsCount} msg]} {
  2673   2693               switch -exact -- $options(StrictMode) {
  2674   2694                   debug -
  2675   2695                   warning {
  2676   2696                       log::log $options(StrictMode) "Could not parse:\n [$element asXML]"
  2677   2697                       log::log $options(StrictMode) "\t error was: $msg"
  2678   2698                   }

Changes to pkgIndex.tcl.

     6      6   # information so that packages will be loaded automatically
     7      7   # in response to "package require" commands.  When this
     8      8   # script is sourced, the variable $dir must contain the
     9      9   # full path name of this file's directory.
    10     10   
    11     11   package ifneeded WS::Client 2.3.8  [list source [file join $dir ClientSide.tcl]]
    12     12   package ifneeded WS::Server 2.3.7  [list source [file join $dir ServerSide.tcl]]
    13         -package ifneeded WS::Utils 2.3.8 [list source [file join $dir Utilities.tcl]]
           13  +package ifneeded WS::Utils 2.3.9 [list source [file join $dir Utilities.tcl]]
    14     14   
    15     15   package ifneeded WS::Embeded 2.3.0 [list source [file join $dir Embedded.tcl]]
    16     16   package ifneeded WS::AOLserver 2.0.0 [list source [file join $dir AOLserver.tcl]]
    17     17   package ifneeded WS::Channel 2.0.0 [list source [file join $dir ChannelServer.tcl]]
    18     18   
    19     19   package ifneeded WS::Wub 2.2.1 [list source [file join $dir WubServer.tcl]]
    20     20   package ifneeded Wsdl 2.0.0 [list source [file join $dir WubServer.tcl]]
    21     21   
    22     22   package ifneeded WS::CheckAndBuild 0.0.3 [list source [file join $dir CheckAndBuild.tcl]]