/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/Utilities/JobInfoSvc/JobInfoSvc-00-00-02/xmlrpc++0.7/test/TestBase64Client.cpp File Reference

#include "XmlRpc.h"
#include <iostream>
#include <fstream>
#include <stdlib.h>

Go to the source code of this file.

Functions

int main (int argc, char *argv[])


Function Documentation

int main ( int  argc,
char *  argv[] 
)

Definition at line 15 of file TestBase64Client.cpp.

References XmlRpc::XmlRpcClient::execute(), and genRecEmupikp::i.

00016 {
00017   if (argc != 4) {
00018     std::cerr << "Usage: TestBase64Client serverHost serverPort outputFile\n";
00019     return -1;
00020   }
00021   int port = atoi(argv[2]);
00022 
00023   //XmlRpc::setVerbosity(5);
00024   XmlRpcClient c(argv[1], port);
00025 
00026   XmlRpcValue noArgs, result;
00027   if (c.execute("TestBase64", noArgs, result))
00028   {
00029     const XmlRpcValue::BinaryData& data = result;
00030     std::ofstream outfile(argv[3], std::ios::binary | std::ios::trunc);
00031     if (outfile.fail())
00032       std::cerr << "Error opening " << argv[3] << " for output.\n";
00033     else
00034     {
00035       int n = int(data.size());
00036       for (int i=0; i<n; ++i)
00037         outfile << data[i];
00038     }
00039   }
00040   else
00041     std::cout << "Error calling 'TestBase64'\n\n";
00042 
00043   return 0;
00044 }


Generated on Tue Nov 29 23:17:21 2016 for BOSS_7.0.2 by  doxygen 1.4.7