Anonymous user
SOAP: Difference between revisions
→Tcl: Added implementation
m (→{{header|Visual Objects}}: Extra >) |
(→Tcl: Added implementation) |
||
Line 63:
'''Note:''' SOAPpy is a third-party module and can be found at [http://pywebsvcs.sourceforge.net/ Python Web Services]
=={{header|Tcl}}==
{{works with|Tcl|8.5+}}
Uses the <code>[http://code.google.com/p/tclws/ tclws]</code> package.
<lang Tcl>package require WS::Client
# Grok the service
::WS::Client::GetAndParseWsdl http://api.google.com/GoogleSearch.wsdl
# Set up the arguments
dict set args key "<your google license key here>"
dict set args q {site:tclscripting.com font}
dict set args start 0
dict set args maxResults 10
dict set args filter true
dict set args restrict {}
dict set args safeSearch false
dict set args lr {}
dict set args ie latin1
dict set args oe latin1
# Do the call using the direct synchronous interface
set result [::WS::Client::DoCall GoogleSearchService doGoogleSearch $args]
# Print the results
foreach item [dict get $result return resultElements item] {
puts [dict get $item title]
puts [dict get $item URL]
puts ""
}</lang>
=={{header|VBScript}}==
|