• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/tcl-105/tcl_ext/tclsoap/tclsoap/

Lines Matching +defs:SOAP +defs:xmlrpc_request

0 # SOAP.tcl - Copyright (C) 2001 Pat Thoyts <patthoyts@users.sourceforge.net>
4 # Provide Tcl access to SOAP 1.1 methods.
19 package require SOAP::Utils; # TclSOAP
24 namespace eval ::SOAP {variable domVersion}
28 namespace eval ::SOAP {
31 variable rcs_version { $Id: SOAP.tcl,v 1.51 2008/07/09 16:14:23 andreas_kupries Exp $ }
41 # Register the namespace for handling SOAP methods using 'scheme' as a
44 # A SOAP transport package requires an 'xfer' method for performing the
45 # SOAP method call and a 'configure' method for setting any transport
46 # specific options via SOAP::configure -transport.
53 proc ::SOAP::register {scheme namespace} {
59 # Internal method to return the namespace hosting a SOAP transport using
62 proc ::SOAP::schemeloc {scheme} {
73 # Check for the existence of a SOAP Transport specific procedure.
76 # Used by SOAP::destroy, SOAP::wait and others.
78 proc ::SOAP::transportHook {procVarName cmdname} {
94 # Called from SOAP package methods, shift up to the callers level and
103 proc ::SOAP::qualifyNamespace {name} {
114 # An interal procedure to mangle and SOAP method name and it's namespace
115 # and generate a name for use as a specific SOAP variable. This ensures
117 # within the SOAP package.
119 # methodName - the SOAP method name
121 proc ::SOAP::methodVarName {methodName} {
124 \"$methodName\" is not a SOAP method"
134 # the SOAP package. We use the tcllib log package for this so the level
139 proc ::SOAP::setLogLevel {level} {
147 if {[info exists SOAP::logLevel]} {
148 SOAP::setLogLevel $SOAP::logLevel
154 # Retrieve configuration variables from the SOAP package. The options
155 # are all as found for SOAP::configure.
159 proc ::SOAP::cget { args } {
181 # Dump out information concerning the last SOAP transaction for a
182 # SOAP method. What you can dump depends on the transport involved.
185 # methodName - the SOAP method to dump data from.
189 proc ::SOAP::dump {args} {
214 # Configure or display a SOAP method options.
216 # procName - the SOAP method Tcl procedure name
219 # Sets up a configuration array for the SOAP method.
221 proc ::SOAP::configure { procName args } {
237 \"$scheme\" is not a valid SOAP transport method."
328 # scheme registered by SOAP::register.
340 if {$procvar(rpcprotocol) eq "SOAP"} {
341 # The default version is SOAP 1.1
345 # Canonicalize the SOAP version URI
356 # Default SOAP encoding is SOAP 1.1
374 # If no request wrapper is set, use the default SOAP wrap proc.
389 # Create a Tcl wrapper for a SOAP methodcall. This constructs a Tcl command
393 proc ::SOAP::create { args } {
406 array set $varName {rpcprotocol SOAP} ;# SOAP, XMLRPC or JSONRPC
411 array set $varName {name {}} ;# SOAP method name
419 array set $varName {headers {}} ;# SOAP Head elements returned.
420 array set $varName {schemas {}} ;# List of SOAP Schemas in force
421 array set $varName {version {}} ;# SOAP Version in force (URI)
422 array set $varName {encoding {}} ;# SOAP Encoding (URI)
471 # Export a list of procedure names as SOAP endpoints. This is only used
472 # in the SOAP server code to specify the subset of Tcl commands that should
473 # be accessible via a SOAP call.
475 # args - a list of tcl commands to be made available as SOAP endpoints.
477 proc ::SOAP::export {args} {
488 # Reverse the SOAP::create command by deleting the SOAP method binding and
492 # methodName - the name of the SOAP method command
494 proc ::SOAP::destroy {methodName} {
497 # Delete the SOAP command
505 # Delete the SOAP method configuration array
517 proc ::SOAP::wait {methodName} {
529 # Make a SOAP method call using the configured transport.
532 # procName - the SOAP method configuration variable path
533 # args - the parameter list for the SOAP method call
537 proc ::SOAP::invoke { procVarName args } {
552 # Send the SOAP packet (req) using the configured transport procedure
570 # procVarName - the SOAP method configuration variable path
576 proc ::SOAP::invoke2 {procVarName reply} {
605 # Dummy SOAP transports to examine the SOAP requests generated for use
608 # procVarName - SOAP method name configuration variable
610 # soap - the XML payload for this SOAP method call
612 namespace eval SOAP::Transport::print {
620 SOAP::register urn:print [namespace current]
623 namespace eval SOAP::Transport::reflect {
631 SOAP::register urn:reflect [namespace current]
637 # Setup SOAP HTTP transport for an authenticating proxy HTTP server.
638 # At present the SOAP package only supports Basic authentication and this
643 proc ::SOAP::proxyconfig {} {
660 entry $f1.e1 -textvariable SOAP::conf_proxy
661 entry $f1.e2 -textvariable SOAP::conf_userid
662 entry $f1.e3 -textvariable SOAP::conf_passwd -show {*}
677 SOAP::configure -transport http -proxy $SOAP::conf_proxy
678 if { [info exists SOAP::conf_userid] } {
679 SOAP::configure -transport http \
681 "Basic [lindex [base64::encode ${SOAP::conf_userid}:${SOAP::conf_passwd}] 0]" ]
683 unset SOAP::conf_passwd
689 # Prepare a SOAP fault message
691 # faultcode - the SOAP faultcode e.g: SOAP-ENV:Client
695 # returns the XML text of the SOAP Fault packet.
697 proc ::SOAP::fault {faultcode faultstring {detail {}}} {
700 set flt [addNode $bod "SOAP-ENV:Fault"]
726 # Generate the common portion of a SOAP replay packet
732 proc ::SOAP::reply_envelope { doc } {
733 set env [addNode $doc "SOAP-ENV:Envelope"]
735 "xmlns:SOAP-ENV" "http://schemas.xmlsoap.org/soap/envelope/"
741 "xmlns:SOAP-ENC" "http://schemas.xmlsoap.org/soap/encoding/"
742 set bod [addNode $env "SOAP-ENV:Body"]
749 # Generate a SOAP reply packet. Uses 'rpcvar' variable type information to
753 # uri URI of the SOAP method
754 # methodName the SOAP method name
759 proc ::SOAP::reply { doc uri methodName result } {
764 "SOAP-ENV:encodingStyle" \
773 SOAP::insert_value $retnode $resultValue
777 SOAP::insert_value $retnode $result
787 # Procedure to generate the XML data for a configured SOAP procedure.
788 # This is the default SOAP -wrapProc procedure
790 # procVarName - the path of the SOAP method configuration variable
791 # args - the arguments for this SOAP method
793 # XML data containing the SOAP method call.
796 # itself. -headers is used to set SOAP Header elements and -attr can be
800 proc ::SOAP::soap_request {procVarName args} {
852 set envx [addNode $doc "SOAP-ENV:Envelope"]
854 setElementAttribute $envx "xmlns:SOAP-ENV" $soapenv
855 setElementAttribute $envx "xmlns:SOAP-ENC" $soapenc
856 setElementAttribute $envx "SOAP-ENV:encodingStyle" $soapenc
858 # The set of namespaces depends upon the SOAP encoding as specified by
871 set headelt [addNode $envx "SOAP-ENV:Header"]
879 set bod [addNode $envx "SOAP-ENV:Body"]
923 proc ::SOAP::xmlrpc_request {procVarName args} {
967 # Parse a SOAP response payload. Check for Fault response otherwise
970 # procVarName - the name of the SOAP method configuration variable
977 proc ::SOAP::parse_soap_response { procVarName xml } {
1005 # If there is a header element then make it available via SOAP::getHeader
1053 proc ::SOAP::parse_xmlrpc_response { procVarName xml } {
1108 proc ::SOAP::parse_xmlrpc_request { xml } {
1153 proc ::SOAP::xmlrpc_value_from_node {valueNode} {
1190 proc ::SOAP::insert_headers {node headers} {
1194 set h [addNode $e "SOAP-ENV:Header"]
1206 proc ::SOAP::insert_value {node value} {
1264 "xmlns:SOAP-ENC" "http://schemas.xmlsoap.org/soap/encoding/"
1265 setElementAttribute $node "xsi:type" "SOAP-ENC:Array"
1266 setElementAttribute $node "SOAP-ENC:offset" "\[0\]"
1274 setElementAttribute $node "SOAP-ENC:arrayType" $arrayType
1320 package provide SOAP $::SOAP::version
1322 if {[catch {package present SOAP::http}]} {
1323 package require SOAP::http; # TclSOAP 1.6.2+