_ >   108 108         ns_log error "xmlrpc_invoke: error parsing request: $doc_id"
  109 109     } else {
  110 110         set data   [ns_xml doc root $doc_id]
< >   111           if {[ns_xml node name $data] != "methodName"} {
  112               set data [ns_xml node children $data]
    111         if {[ns_xml node name $data] != "methodCall"} {
    112             set data [lindex [ns_xml node children $data] 0]
113 113         }
  114 114         set methodName \
  115 115             [ns_xml node getcontent \
 
254 254 proc xmlrpc_construct { node context arglist } {
  255 255     set unused {}
  256 256     # consume string arguments until configuration options found
< >   257  
    257     set options_list [list "-string" "-text" "-i4" "-int" "-integer" \
    258                           "-boolean" "-double" "-date" "-binary" "-base64" \
    259                           "-variable" "-structvariable" "-struct" \
    260                           "-array" "-keyvalue"]
    261     # we set the list of valid options, some tcl users
    262     # choose to pass strings containing a leading -
    263    
258 264     while {[llength $arglist] && \
< >   259               ![string match -* [lindex $arglist 0]]} {
    265             [lsearch $options_list [lindex $arglist 0]]!=-1} {
260 266
  261 267         ns_xml node setcontent \
  262 268                 [xmlrpc_createContext $node $context] \
 
519 525
  520 526     set doc_id [ns_xml parse $xml]
  521 527     set response [ns_xml doc root $doc_id]
< >     528
    529     if {[ns_xml node name $response] != "methodResponse"} {
    530         set response [lindex [ns_xml node children $response] 0]
    531     }
    532    
< _   522 533     set top [ns_xml_firstChild $response]
  523 534     switch -- [ns_xml node name $top] {
  524 535         params {