diff options
Diffstat (limited to '')
-rw-r--r-- | sca-cpp/trunk/components/webservice/client-test.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sca-cpp/trunk/components/webservice/client-test.cpp b/sca-cpp/trunk/components/webservice/client-test.cpp index c2593e75d9..6e63c83ecb 100644 --- a/sca-cpp/trunk/components/webservice/client-test.cpp +++ b/sca-cpp/trunk/components/webservice/client-test.cpp @@ -27,6 +27,7 @@ #include "stream.hpp" #include "string.hpp" #include "list.hpp" +#include "element.hpp" #include "value.hpp" #include "monad.hpp" #include "perf.hpp" @@ -35,9 +36,25 @@ namespace tuscany { namespace webservice { -const string url("http://localhost:8090/echo"); +const string url("http://localhost:8090/webservice"); bool testEval() { + http::CURLSession cs; + + const value func = "http://ws.apache.org/axis2/c/samples/echoString"; + const list<value> arg = mklist<value>( + list<value>() + "ns1:echoString" + + (list<value>() + "@xmlns:ns1" + string("http://ws.apache.org/axis2/services/echo")) + + (list<value>() + "text" + string("Hello World!"))); + + const failable<value> rval = http::evalExpr(mklist<value>(func, arg), url, cs); + assert(hasContent(rval)); + + const list<value> r = mklist<value>( + list<value>() + "ns1:echoString" + + (list<value>() + "@xmlns:ns1" + string("http://ws.apache.org/axis2/c/samples")) + + (list<value>() + "text" + string("Hello World!"))); + assert(content(rval) == r); return true; } |