Query regarding Adapter Module development
I'm working on a scenario File (Text) --> XI ---> SAP (Idoc). I have to add validation for the file based on the data contained in it. I'm planning to do this usng a adapter module.
I have already started coding the module, but need confirmation on on 1 point.
The usual code for method public ModuleData process is as follows:
obj = imd.getPrincipalData();
msg = (Message) obj;
msgType = (String) mc.getContextData("msgType");
nameSpace = (String) mc.getContextData("nameSpace");
amk = new AuditMessageKey(msg.getMessageId(),AuditDirection.OUTBOUND);
XMLPayload xp = msg.getDocument();
I'm succesfully able to achieve the required validation in a java class but using the file stored in my local directoy.
Now my question is that will the object xp hold the contents of text file as it or will it contain the xmlpayload.
I will be execuitng the module before the standard CallSapAdapter in module tab.
Your reply is highly apreciated.