In my Customizeed Generic eWay, I face problem when sending etd back to Egate System after getting EDT from external source.While using EGate.eventSendToEgate(etdReply.rawInput()) where etdReply is etd instance publishing to IQ.I could see the ETD value showing is blank in IQ Manager.
code below:
public void processOutgoing(byte outEvent[]) throws CollabConnException, CollabDataException, CollabResendException
{
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "processOutgoing(): Started"
int retVal = 0;
try{
etdData = new GCCGDBOfferCriteriaRequest();
etdReply = new GCCGDBOffrCrtrInfoReply();
}catch(Exception e)
{
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, " Exception occurred during object initialization"
}
try
{
etdData.unmarshal(outEvent);
for (int i=0; i<guestOfrCrtrLst.length; i++)
{
guestOfrCrtrLst = new GstOfrCrtr();
}
guestOfrCrtrLst[0].Guest_i = Long.parseLong(etdData.getGuestId());
guestOfrCrtrLst[0].Nf_Days = Short.parseShort(etdData.getNumDays());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "GuestId:" + etdData.getGuestId () + "Number of days :" + etdData.getNumDays());
try{
guestOfrCrtrInfoLst = GcaClientHelper.getInstance().getGstOfrCrtrInfo(guestOfrCrtrLst);
}catch (Exception e)
{
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "Exception occurred during CORBA IOR file calling" + e);
}
for (int i=0; i<guestOfrCrtrInfoLst.length; i++)
{
etdReply.setGuestId(Long.toString(guestOfrCrtrInfoLst.Guest_i));
etdReply.setMaritalStatus(new String(guestOfrCrtrInfoLst.MarStatus_f));
etdReply.setTgtPrchHistoryFlag(new String(guestOfrCrtrInfoLst.Tgts_Prch_f));
etdReply.setMfldPrchHistoryFlag(new String(guestOfrCrtrInfoLst.Mfld_Prch_f));
etdReply.setMvnPrchHistoryFlag(new String(guestOfrCrtrInfoLst.Mvyn_Prch_f));
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,etdReply.getGuestId());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,etdReply.getMaritalStatus());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,etdReply.getMfldPrchHistoryFlag());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,etdReply.getMvnPrchHistoryFlag());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,etdReply.getTgtPrchHistoryFlag());
}
if (etdReply == null) {
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "Object is null"
} else {
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "Object is not null"
try {
EGate.eventSendToEgate(etdReply.rawInput());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "SEND"
// Here I could send data but appear as blank when I view this in Egate Monitor
} catch(Exception ex) {
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "Getting Exceptions "+ ex.fillInStackTrace());
}
}
}
catch(Exception e)
{
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,"Exception occurred in the processOutgoing() method "+e.fillInStackTrace());
}
}
code below:
public void processOutgoing(byte outEvent[]) throws CollabConnException, CollabDataException, CollabResendException
{
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "processOutgoing(): Started"
int retVal = 0;
try{
etdData = new GCCGDBOfferCriteriaRequest();
etdReply = new GCCGDBOffrCrtrInfoReply();
}catch(Exception e)
{
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, " Exception occurred during object initialization"
}
try
{
etdData.unmarshal(outEvent);
for (int i=0; i<guestOfrCrtrLst.length; i++)
{
guestOfrCrtrLst = new GstOfrCrtr();
}
guestOfrCrtrLst[0].Guest_i = Long.parseLong(etdData.getGuestId());
guestOfrCrtrLst[0].Nf_Days = Short.parseShort(etdData.getNumDays());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "GuestId:" + etdData.getGuestId () + "Number of days :" + etdData.getNumDays());
try{
guestOfrCrtrInfoLst = GcaClientHelper.getInstance().getGstOfrCrtrInfo(guestOfrCrtrLst);
}catch (Exception e)
{
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "Exception occurred during CORBA IOR file calling" + e);
}
for (int i=0; i<guestOfrCrtrInfoLst.length; i++)
{
etdReply.setGuestId(Long.toString(guestOfrCrtrInfoLst.Guest_i));
etdReply.setMaritalStatus(new String(guestOfrCrtrInfoLst.MarStatus_f));
etdReply.setTgtPrchHistoryFlag(new String(guestOfrCrtrInfoLst.Tgts_Prch_f));
etdReply.setMfldPrchHistoryFlag(new String(guestOfrCrtrInfoLst.Mfld_Prch_f));
etdReply.setMvnPrchHistoryFlag(new String(guestOfrCrtrInfoLst.Mvyn_Prch_f));
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,etdReply.getGuestId());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,etdReply.getMaritalStatus());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,etdReply.getMfldPrchHistoryFlag());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,etdReply.getMvnPrchHistoryFlag());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,etdReply.getTgtPrchHistoryFlag());
}
if (etdReply == null) {
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "Object is null"
} else {
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "Object is not null"
try {
EGate.eventSendToEgate(etdReply.rawInput());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "SEND"
// Here I could send data but appear as blank when I view this in Egate Monitor
} catch(Exception ex) {
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, "Getting Exceptions "+ ex.fillInStackTrace());
}
}
}
catch(Exception e)
{
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,"Exception occurred in the processOutgoing() method "+e.fillInStackTrace());
}
}