Index: ossp-pkg/as/as-gui/aclocal.m4 RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/aclocal.m4,v rcsdiff -q -kk '-r1.6' '-r1.7' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/aclocal.m4,v' 2>/dev/null --- aclocal.m4 2002/12/03 10:22:11 1.6 +++ aclocal.m4 2003/01/16 08:32:31 1.7 @@ -158,6 +158,42 @@ dnl ## +dnl ## Test for the presence of EasySOAP +dnl ## +dnl ## configure.in: +dnl ## AC_TEST_ESOAP +dnl ## + +AC_DEFUN(AC_TEST_ESOAP,[dnl +AC_ARG_WITH(esoapdir,dnl +[ --with-easysoapdir=[DIR] prefix where EasySOAP is installed], esoapdir=$withval,) +AC_MSG_CHECKING(the EasySOAP installation path) + +dnl ## Ensure that we have a basic path to start searching +if test -x "$esoapdir"; +then + SOAPBASE=$esoapdir + AC_MSG_RESULT(${SOAPBASE}) +elif test -x "${ESOAPDIR}"; +then + SOAPBASE="${ESOAPDIR}" + AC_MSG_RESULT(${SOAPBASE}) +else + AC_MSG_RESULT(not found) + AC_MSG_ERROR([Neither \$ESOAPDIR nor --with-easysoapdir=[DIR] paths exist]) +fi + +dnl ## Append paths of libs and headers +LIBS="$LIBS -leasysoap -lexpat -lssl -lcrypto" +LDFLAGS="$LDFLAGS -L${SOAPBASE}/lib -R${SOAPBASE}/lib" +CPPFLAGS="$CPPFLAGS -I${SOAPBASE}/include" +CXXCPP="$CXXCPP -I${SOAPBASE}/include" +CXXFLAGS="$CXXFLAGS" +AC_DEFINE(HAVE_ESOAP, 1, [Define to 1 if building with EasySOAP.]) +]) + + +dnl ## dnl ## Check the Qt implementation path dnl ## dnl ## configure.in: Index: ossp-pkg/as/as-gui/as_slot.cpp RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v rcsdiff -q -kk '-r1.76' '-r1.77' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/as_slot.cpp,v' 2>/dev/null --- 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 //#include +// RPC headers +#include + // 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()); + } } // Index: ossp-pkg/as/as-gui/configure.in RCS File: /v/ossp/cvs/ossp-pkg/as/as-gui/configure.in,v rcsdiff -q -kk '-r1.12' '-r1.13' -u '/v/ossp/cvs/ossp-pkg/as/as-gui/configure.in,v' 2>/dev/null --- configure.in 2002/12/18 15:47:47 1.12 +++ configure.in 2003/01/16 08:32:31 1.13 @@ -73,6 +73,10 @@ dmalloc, dmalloc_debug, dmalloc.h, [AC_DEFINE(WITH_DMALLOC, 1, [Define to 1 if building with Dmalloc])]) +dnl Test for the local SOAP implementation +AC_TEST_ESOAP +AC_SUBST(SOAPBASE) + dnl Find out where the Qt implementation resides AC_CHECK_QT AC_SUBST(QTBASE)