Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with eventSendToEgate() in processOutgoing(byte outEvent[])

Status
Not open for further replies.

nuvvula

Programmer
Aug 24, 2003
2
US
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].No_Of_Days = Short.parseShort(etdData.getNumDays());
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, &quot;GuestId:&quot; + etdData.getGuestId () + &quot;Number of days :&quot; + etdData.getNumDays());

try{
guestOfrCrtrInfoLst = GcaClientHelper.getInstance().getGstOfrCrtrInfo(guestOfrCrtrLst);

}catch (Exception e)
{
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, &quot;Exception occurred during CORBA IOR file calling&quot; + 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, &quot;Object is null&quot;);
} else {
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, &quot;Object is not null&quot;);


try {

EGate.eventSendToEgate(etdReply.rawInput());

EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR, &quot;SEND&quot;);
// 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, &quot;Getting Exceptions &quot;+ ex.fillInStackTrace());

}

}


}
catch(Exception e)
{
EGate.traceln(EGate.TRACE_EWAY,EGate.TRACE_EVENT_ERROR,&quot;Exception occurred in the processOutgoing() method &quot;+e.fillInStackTrace());

}

}

 
Instead of this:
EGate.eventSendToEgate(etdReply.rawInput());

Try this:
EGate.eventSendToEgate(etdReply.marshal());
 
Hi sbattina,
Thanks for the info. We tried with marshal() also.
But we got the solution by using jmarshal(&quot;ASCII&quot;) method


Regrads
Ramesh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top