1 // 2 // Copyright (c) ZeroC, Inc. All rights reserved. 3 // 4 5 #include <Ice/Ice.h> 6 #include <TestHelper.h> 7 #include <Test.h> 8 9 using namespace std; 10 11 void oneways(const Ice::CommunicatorPtr &,const Test::MyClassPrxPtr & proxy)12oneways(const Ice::CommunicatorPtr&, const Test::MyClassPrxPtr& proxy) 13 { 14 Test::MyClassPrxPtr p = ICE_UNCHECKED_CAST(Test::MyClassPrx, proxy->ice_oneway()); 15 16 { 17 p->ice_ping(); 18 } 19 20 { 21 try 22 { 23 p->ice_isA("dummy"); 24 test(false); 25 } 26 catch(const Ice::TwowayOnlyException&) 27 { 28 } 29 } 30 31 { 32 try 33 { 34 p->ice_id(); 35 test(false); 36 } 37 catch(const Ice::TwowayOnlyException&) 38 { 39 } 40 } 41 42 { 43 try 44 { 45 p->ice_ids(); 46 test(false); 47 } 48 catch(const Ice::TwowayOnlyException&) 49 { 50 } 51 } 52 53 { 54 p->opVoid(); 55 } 56 57 { 58 p->opIdempotent(); 59 } 60 61 { 62 p->opNonmutating(); 63 } 64 65 { 66 Ice::Byte b; 67 68 try 69 { 70 p->opByte(Ice::Byte(0xff), Ice::Byte(0x0f), b); 71 test(false); 72 } 73 catch(const Ice::TwowayOnlyException&) 74 { 75 } 76 } 77 78 } 79