uCosminexus Service Platform, Basic Development Guide
To invoke the method of the synchronous reception (SessionBean), use the acquired stub to create an Enterprise Bean instance. The procedure for creating an Enterprise Bean instance is described below.
javax.naming.Context ctx = new javax.naming.InitialContext(); |
Object objref
= initial.lookup("HITACHI_EJB/SERVERS/" + "J2EE server-name"
+ "/EJB/CSCMsgSyncServiceDelivery/CSCMsgSyncServiceDeliveryEJB");
CSCMsgSyncServiceDeliveryHome home
= (CSCMsgSyncServiceDeliveryHome)PortableRemoteObject
.narrow(objref, CSCMsgSyncServiceDeliveryHome.class);
|
CSCMsgSyncServiceDelivery reception = home.create();
// Enterprise Bean instance creation
String result = reception .invokeXML( // method invocation
serviceName, // service name
clientID, // client correlation ID
requestFormatID, // request format ID
responseFormatID, // response format ID
operationName, // operation name
userData); // user message
|
CSCMsgSyncServiceDelivery reception = home.create();
// Enterprise Bean instance creation
byte[] resultBinary = reception .invokeBinary( // method invocation
serviceName, // service name
clientID, // client correlation ID
requestFormatID, // request format ID
responseFormatID, // response format ID
operationName, // operation name
userDataBinary.length, // message length
userDataBinary); // user message
|
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.