client.cpp
Go to the documentation of this file.00001 /*************************************************************************** 00002 file : $URL: https://frepple.svn.sourceforge.net/svnroot/frepple/trunk/modules/webservice/client.cpp $ 00003 version : $LastChangedRevision: 599 $ $LastChangedBy: jdetaeye $ 00004 date : $LastChangedDate: 2007-12-08 15:02:52 +0100 (Sat, 08 Dec 2007) $ 00005 ***************************************************************************/ 00006 00007 /*************************************************************************** 00008 * * 00009 * Copyright (C) 2007 by Johan De Taeye * 00010 * * 00011 * This library is free software; you can redistribute it and/or modify it * 00012 * under the terms of the GNU Lesser General Public License as published * 00013 * by the Free Software Foundation; either version 2.1 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 * This library is distributed in the hope that it will be useful, * 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser * 00019 * General Public License for more details. * 00020 * * 00021 * You should have received a copy of the GNU Lesser General Public * 00022 * License along with this library; if not, write to the Free Software * 00023 * Foundation Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA * 00024 * * 00025 ***************************************************************************/ 00026 00027 #include "module_webservicefreppleProxy.h" 00028 00029 // Include the namespace mapping table 00030 #include "frepple.nsmap" 00031 00032 int main() 00033 { 00034 module_webservice::frepple svc; 00035 struct module_webservice::frepple__DemandInfoResponse result; 00036 00037 if (svc.frepple__demand("order 1", result) == SOAP_OK) 00038 { 00039 std::cout << result._return.name << " " 00040 << result._return.item << " " << result._return.priority << " " 00041 << asctime(gmtime(&result._return.due)) << std::endl; 00042 } 00043 else 00044 soap_print_fault(svc.soap, stderr); 00045 00046 if (svc.frepple__demand(NULL, result) == SOAP_OK) 00047 std::cout << result._return.name << " " << result._return.item << " " << result._return.priority << std::endl; 00048 else 00049 soap_print_fault(svc.soap, stderr); 00050 00051 return 0; 00052 } 00053
Documentation generated by
