on 06-14-2011 8:02 PM
Hi All,
I'm in the process of converting an adapter module originally written for XI 3.0 to an PI 7.11 module.
I am unable to find replacements for some parts of the code. Do you know what are the PI 7.11 equivalent statements for the below code:
XI 3.0 Code:
import com.sap.aii.adapter.xi.ms.XIMessage;
import com.sap.aii.messaging.mo.Message;
import com.sap.aii.messaging.mo.xmb.XMBMessageOperator;
XIMessage aXIMessage = (XIMessage) inputModuleData.getPrincipalData();
Message xmbMessage = (Message) aXIMessage.getXMBMessage();
XMBMessageOperator.setSystemAckRequested(xmbMessage, true);
XMBMessageOperator.setSystemErrorAckRequested(xmbMessage, true);
Appreciate all your help/thoughts on the issue.
Regards,
Sumant.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
just to use the already existing thread. I currently also migrate some XI 3.0 modules to PI 7.1. Most of the imports got replaced by new libraries but one is still open:
import com.sap.aii.adapter.xi.ms.XIMessage;
I checked the blog already but the import is commented out. I also tried to change to a different kind of message but that doesn't worked as some methods are not supported.
The coding looks like this:
MessageContext inmc;
Object inpdata;
XIMessage inpmsg;
com.sap.aii.af.sdk.xi.mo.Message inmo;
XMBMessage inmsg;
inpdata = _moduleData.getPrincipalData();
if(inpdata instanceof XIMessage) {
this.fireAuditLogging("XIMessage");
inpmsg = (XIMessage)inpdata;
this.fireAuditLogging("AckDestination" + inpmsg.getAckDestination());
this.fireAuditLogging("ClassName" + inpmsg.getXMBMessage().getClass().getName());
this.fireAuditLogging("Class" + inpmsg.getXMBMessage().getClass());
this.fireAuditLogging("Class" + inpmsg.getXMBMessage().getClass());
inmc = new MessageContext();
} else if(inpdata instanceof MessageContext) {
this.fireAuditLogging("MessageContext");
inmc = (MessageContext)inpdata;
inmo = inmc.getMessage();
} else{
throw new ModuleException("object of invalid type passed in ModuleData: " + inpdata.getClass().getName());
}
this.fireAuditLogging("extract dynamic configuration");
this.extractDynamicConfiguration(inmc);
It seems to me that this coding block checks the message type and posts some information to the audit log. Somehow most of the objects are defined locally and never used again. Do i still need to check for type 'XIMessage' or is it deprecated in Pi 7.1?
Edited by: Christian Hanusch on Aug 5, 2011 4:34 PM
Here is the full code of the method:
public ModuleData process(
ModuleContext moduleContext,
ModuleData inputModuleData)
throws ModuleException {
XIMessage aXIMessage = (XIMessage) inputModuleData.getPrincipalData();
Message xmbMessage = (Message) aXIMessage.getXMBMessage();
AuditMessageKey amk =
new AuditMessageKey(
aXIMessage.getMessageId(),
AuditDirection.INBOUND);
Audit.addAuditLogEntry(
amk,
AuditLogStatus.SUCCESS,
"FileSetAckBean: Module called");
XMBMessageOperator.setSystemAckRequested(xmbMessage, true);
XMBMessageOperator.setSystemErrorAckRequested(xmbMessage, true);
inputModuleData.setPrincipalData(aXIMessage);
return inputModuleData;
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.