cancel
Showing results for 
Search instead for 
Did you mean: 

Module Processor

Former Member
0 Kudos

Hi Friends,

I am using the sap provided module CRLFfromToLF in sender side file adapter.How can i check the output.Atleast whether that module being called or not. Even i coouldn't see the trace information in Adapter Monitoring.Can any one tell me how to know atleast whether that module being Executed or not.

And one more thing is I have developed a module just copied the source code of "CRLFfromToLF" module source code.I have deployed also. Then in Integration Directory's sender communication channel before the

"all SapAdapter" module i have given the JNDI name of my module.But this time atleast it hasn't read the file.Where might be the error.

Regards,

Gowtham K

In Integration Directory in sender communication channel

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Friends,

Thanks for the Replies,

I have included the audit log also in my module.I have placed the module in Sender communication channel , before the CallSapAdapter module. But the problem is it is not reading the file.My scenario is i am using read a file and add some extra message to that file through my module and save it to another directory. After placing my module in sender communication channel before CallSapAdapter atleast it is not reading the file too. I have given the JNDI name in ejb-j2ee-engine.xml file and deployed it. and in communication channel i have placed like "localejbs/<JNDI name>".

Does the problem is with my module or with deployment.I mean does the module is not identified or error in module code.

Regards,

Gowtham K

Former Member
0 Kudos

hi

Please post your code so we can have a look on it.

one way you can trace that " is your module working?"

Create any file in module and check whether that file has been written or not?

i think your area of problem can be located from that.

Regards

piyush

Former Member
0 Kudos

Hi Guys,

Thanks for the reply.

I have included a code to create a file in my module also. The File is also not getting created. That means may be my module is not getting identified on XIServer.

Where might be the problem.Does the problem is with deployment or other.

Regards,

Gowtham K.

Former Member
0 Kudos

hi

You do one thing create another ejb following the procedure given in this:

https://websmp201.sap-ag.de/~sapdownload/011000358700003237612005E/HowToCreateAdapterModules.pdf

And try to deploy again.

It worked for me last time.Just check all jar files are are present.

check jndi name.

I think it will work for you.Just try it.

best of luck.

cheers

piyush

Former Member
0 Kudos

Hi piyush,

I have created a new EJbB and deployed it also.This is code of my module.

public ModuleData process(ModuleContext moduleContext,

ModuleData inputModuleData)

throws ModuleException {

// File f = new File("c:
xi
emp.txt");

Object obj = null;

Message msg = null;

obj = inputModuleData.getPrincipalData();

msg = (Message) obj;

AuditMessageKey amk = new AuditMessageKey(msg.getMessageId(),

AuditDirection.INBOUND);

Audit.addAuditLogEntry(amk, AuditLogStatus.SUCCESS,

"CreateAttachment: Module called");

try {

XMLPayload xmlpayload = msg.getDocument();

xmlpayload.setContent(addMessage(xmlpayload.getContent()));

java.util.Iterator iter = msg.getAttachmentIterator();

Payload payload = null;

while (iter.hasNext()) {

payload = (Payload) iter.next();

if (payload instanceof TextPayload){

TextPayload textpayload = (TextPayload) payload;

textpayload.setContent(addMessage(textpayload.getContent()));

}

}

inputModuleData.setPrincipalData(msg);

}

catch (Exception e) {

}

return inputModuleData;

}

private byte[] addMessage(byte[] src) {

int i;

int dstlen;

int srclen = src.length;

dstlen = 0;

for (i = 0; i < srclen; i++) {

src[dstlen++] = src<i>;

}

String User_str = "_Extended";

for(i=0;i< User_str.length();i++)

{

src[dstlen++] = (byte) User_str.charAt(i);

}

byte[] dst = new byte[dstlen];

System.arraycopy(src,0,dst,0,dstlen);

return dst;

}

When i placed my module in sender communication channel before callsapadapter module the file has been read. But when i saw the output file it is same as input file.No message extra has been added.And in the audit log there is no indecation that my module has been called although i have written audit log.

On the server when i saw whether this module has been deployed or not, my module is there on server.

Can anyone please tell me where might be the Error. Is the problem is with my module code or deployment.

Regards,

Gowtham K

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Gowtham

Go to the Runtime Work Bench (RWB), choose message monitoring, from the dropdown choose your adapter framework, begins with af... and press display.

After you execute your scenario,press start in the RWB and once you do that, you will get a list of 'Messages from databases' choose your information and click on details, a new window will popup.

And there you can monitor and see if your module is executed or not.

cheers

Sameer

Former Member
0 Kudos

Hi Gowtham

It appears that the problem is,

1) With your module or

2) Your Sender file adapter status is inactive

Just check if your sender file adpater status is active in your configuration, and if it is active then the next problem could be your module.

cheers

Sameer

Former Member
0 Kudos

Hi Gowtham,

Check this link, by this you can find if your module is Executed or not.

https://websmp201.sap-ag.de/~sapdownload/011000358700003237612005E/HowToCreateAdapterModules.pdf

Section 4.4.2 Writing Audit Logs

To write to the audit log of the message monitor of the Adapter Framework

Hope this helps

Regards

Vishnu