Reimplement with new listener interface.
authorcantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 25 Jan 2006 18:50:59 +0000 (18:50 +0000)
committercantor <cantor@cb58f699-b61c-0410-a6fe-9272a202ed29>
Wed, 25 Jan 2006 18:50:59 +0000 (18:50 +0000)
git-svn-id: https://svn.middleware.georgetown.edu/cpp-sp/trunk@1957 cb58f699-b61c-0410-a6fe-9272a202ed29

shar/test-client.cpp

index ebe5d87..eb8d9d6 100644 (file)
  * limitations under the License.
  */
 
+#ifdef WIN32
+# define _CRT_NONSTDC_NO_DEPRECATE 1
+# define _CRT_SECURE_NO_DEPRECATE 1
+#endif
+
 #include <shib-target/shib-target.h>
 #include <iostream>
 
@@ -31,14 +36,19 @@ int main (int argc, char *argv[])
     schemadir=SHIB_SCHEMAS;
 
   ShibTargetConfig& conf=ShibTargetConfig::getConfig();
-  conf.setFeatures(ShibTargetConfig::Listener);
+  conf.setFeatures(ShibTargetConfig::Listener | ShibTargetConfig::InProcess);
   if (!conf.init(schemadir) || !conf.load(config))
       return -10;
 
   try {
-      int i=0;
-      conf.getINI()->getListener()->ping(i);
-      cerr << 0 << " -> " << i << "\n";
+      DDF in("ping");
+      DDFJanitor injan(in);
+      in.integer(0L);
+
+      DDF out=conf.getINI()->getListener()->send(in);
+      DDFJanitor outjan(out);
+
+      cerr << 0 << " -> " << out.integer() << "\n";
   }
   catch (SAMLException& e) {
       cerr << "caught SAML exception: " << e.what() << "\n";