1 /////////////////////////////////////////////////////////////////// 2 // Automatically generated by xml2ulxr v1.7.5. 3 // 4 // xml2ulxr is part of Ultra Lightweight XML RPC for C++. 5 // See also http://ulxmlrpcpp.sourceforge.net 6 // 7 // Intended for manual and persistent changes 8 ///////////////////////////////////////////////// 9 10 //#define ULXR_UNICODE_ONLY_HELPERS 11 #include <ulxmlrpcpp/ulxmlrpcpp.h> // always first 12 13 #include <ulxmlrpcpp/ulxr_value.h> 14 #include "UlxrIdlTest_ulxr_client.h" 15 16 #include <ulxmlrpcpp/ulxr_response.h> 17 #include <ulxmlrpcpp/ulxr_requester.h> 18 #include <ulxmlrpcpp/ulxr_except.h> 19 20 #include "UlxrIdlTest_ulxr_names.h" 21 22 UlxrIdlTestClient::UlxrIdlTestClient 23 (ulxr::Requester &in_requester, const ulxr::CppString &realm, 24 const ulxr::CppString &user, const ulxr::CppString &pass) UlxrIdlTestFuncs_funcs__free_function1_ovr0(const ulxr::MethodCall & calldata)25 : requester(in_requester) 26 , rpc_realm(realm) 27 , rpc_user(user) 28 , rpc_pass(pass) 29 , callTo_first_url4_ovr4(ULXR_CALLTO_UlxrIdlTest_first_url4_ovr4) // mapped to: void UlxrIdlTest::first_url4() (there are overloaded methods) 30 , callTo_first_url4_ovr3(ULXR_CALLTO_UlxrIdlTest_first_url4_ovr3) // mapped to: std::string * UlxrIdlTest::first_url4(int i) (there are overloaded methods) 31 , callTo_first_url4_ovr2(ULXR_CALLTO_UlxrIdlTest_first_url4_ovr2) // mapped to: std::string * UlxrIdlTest::first_url4(long int li) (there are overloaded methods) 32 , callTo_first_url4_ovr1(ULXR_CALLTO_UlxrIdlTest_first_url4_ovr1) // mapped to: const char * UlxrIdlTest::first_url4(float li) (there are overloaded methods) 33 , callTo_first_url4_ovr0(ULXR_CALLTO_UlxrIdlTest_first_url4_ovr0) // mapped to: wchar_t * const UlxrIdlTest::first_url4(double li) (there are overloaded methods) 34 , callTo_constTest(ULXR_CALLTO_UlxrIdlTest_constTest) // mapped to: std::string UlxrIdlTest::constTest() const 35 , callTo_constRefTest(ULXR_CALLTO_UlxrIdlTest_constRefTest) // mapped to: std::string & UlxrIdlTest::constRefTest() const 36 , callTo_firstViewConst(ULXR_CALLTO_UlxrIdlTest_firstViewConst) // mapped to: long int * UlxrIdlTest::firstViewConst() const 37 , callTo_firstView(ULXR_CALLTO_UlxrIdlTest_firstView) // mapped to: std::string * UlxrIdlTest::firstView() 38 , callTo_nextView1(ULXR_CALLTO_UlxrIdlTest_nextView1) // mapped to: std::wstring * UlxrIdlTest::nextView1(int i, long int * l, std::string & s, const bool * b, char c) const 39 , callTo_nextView2(ULXR_CALLTO_UlxrIdlTest_nextView2) // mapped to: std::basic_string<char> * UlxrIdlTest::nextView2(int i, long int l, std::string & s, bool * const b, char c) const 40 , callTo_getNumObjects(ULXR_CALLTO_UlxrIdlTest_getNumObjects) // mapped to: void UlxrIdlTest::getNumObjects(std::string s) 41 , callTo_getObject(ULXR_CALLTO_UlxrIdlTest_getObject) // mapped to: const std::basic_string<wchar_t> * UlxrIdlTest::getObject(const std::string & s) 42 , callTo_getNumPages(ULXR_CALLTO_UlxrIdlTest_getNumPages) // mapped to: int UlxrIdlTest::getNumPages(const std::wstring & s) 43 , callTo_last_url4_ovr0(ULXR_CALLTO_UlxrIdlTest_last_url4_ovr0) // mapped to: const std::string * UlxrIdlTest::last_url4() (there are overloaded methods) 44 , callTo_last_url4_ovr1(ULXR_CALLTO_UlxrIdlTest_last_url4_ovr1) // mapped to: std::string * UlxrIdlTest::last_url4(int i) (there are overloaded methods) 45 , callTo_last_url4_ovr2(ULXR_CALLTO_UlxrIdlTest_last_url4_ovr2) // mapped to: std::string * UlxrIdlTest::last_url4(long int li) (there are overloaded methods) 46 { 47 } 48 UlxrIdlTestFuncs_funcs__free_function1_ovr1(const ulxr::MethodCall & calldata)49 50 ulxr::MethodResponse 51 UlxrIdlTestClient::sendCall(const ulxr::MethodCall &calldata) const 52 { 53 ulxr::MethodResponse resp = requester.call(calldata, rpc_realm, rpc_user, rpc_pass); 54 55 if (!resp.isOK()) 56 { 57 ulxr::Struct st = resp.getResult(); 58 int ec = ulxr::Integer(st.getMember(ULXR_PCHAR("faultCode"))).getInteger(); 59 ulxr::CppString es = ulxr::RpcString(st.getMember(ULXR_PCHAR("faultString"))).getString(); 60 throw ulxr::RuntimeException(ec, es); 61 } 62 63 return resp; 64 } 65 66 67 UlxrIdlTestClient::~UlxrIdlTestClient() 68 { 69 } 70 71 72