OSSP CVS Repository

ossp - Difference in ossp-pkg/as/as-gui/as_slot.cpp versions 1.76 and 1.77
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/as/as-gui/as_slot.cpp 1.76 -> 1.77

--- as_slot.cpp  2003/01/16 08:26:29     1.76
+++ as_slot.cpp  2003/01/16 08:32:31     1.77
@@ -36,6 +36,9 @@
 #include <qmenudata.h>
 //#include <qregexp.h>
 
+// RPC headers
+#include <easysoap/SOAP.h>
+
 // User interface
 #include "as_gui.h"             // Main classes
 #include "as_except.h"          // Exception classes
@@ -1160,8 +1163,33 @@
 //
 void Titraqform::syncSoap(void)
 {
-    Prototype Unimp;
-    Unimp.doMbox();
+    USING_EASYSOAP_NAMESPACE
+
+    try {
+        const char *pSpace    = "http://soap.europalab.com/asdb";
+        const char *pEndpoint = "http://www.europalab.com/cgi-bin/asdbserv";
+        SOAPProxy Proxy(pEndpoint);
+        SOAPMethod Logmeth("Log", pSpace);  // SOAP remote method name
+        SOAPString Clistr;                  // Outgoing parameter to marshall
+        int nCrc;                           // SOAP unmarshalled return value
+
+        // A quasi diff summary to transmit to the server
+        QString Syncthis;
+        int nLastrow = m_pMaintable->numRows() - 1;
+        Syncthis += m_pMaintable->text(nLastrow, 0);
+        for (int nIter = 1; nIter < TITRAQ_IDXTAIL; nIter++)
+            Syncthis += ' ' + m_pMaintable->text(nLastrow, nIter);
+
+        Clistr = Syncthis;                          // Build RPC parameter
+        Logmeth.AddParameter("Tuple") << Clistr;    // Prepare for marshalling
+        const SOAPResponse &Logresp = Proxy.Execute(Logmeth);
+        Logresp.GetReturnValue() >> nCrc;
+        m_pStatbar->message(trUtf8("Successful transmission, CRC returned %1").arg(nCrc));
+    }
+    catch (SOAPException& Soapex) { // Announce the exception we received
+        m_pStatbar->message(trUtf8("Caught SOAP exception: %1").arg(Soapex.What().Str()));
+        qDebug("Caught SOAP exception: %s\n", Soapex.What().Str());
+    }
 }
 
 //

CVSTrac 2.0.1