#!../../src/xotclsh
set auto_path [concat . $auto_path]
package require xotcl::soap

array set opts {-port 8086}
array set opts $argv

Class MySoapClient
MySoapClient instproc doCall {} {
  
  soap::Request [self]::sr -name getStateName -appendArgs x int 41
  [self]::sr print

  set target  http://localhost:$::opts(-port)/exmaple 
  [self]::sr doCall $target [list [self] readResult]
}
MySoapClient instproc readResult {state soapResponse} {
  $soapResponse print
}

MySoapClient m
m doCall

vwait forever