package require WS::Client
# package require dict
::WS::Client::GetAndParseWsdl "http://localhost:8080/exist/services/Query?WSDL"
# Connect to eXist-db
dict set args userId "guest"
dict set args password "guest"
set result [::WS::Client::DoCall QueryService connect $args]
set sessionId [dict get $result connectReturn]
# Disconnect
dict set args sessionId $sessionId
set result [::WS::Client::DoCall QueryService disconnect $args]
http://localhost:8080/exist/services/Query?WSDL 就是所有提供的 function。
PS. eXist-db 3.0 RC1 移除了 SOAP 的支援,不過 2.2 的還可以用。
沒有留言:
張貼留言