cancel
Showing results for 
Search instead for 
Did you mean: 

Decoding in Adapter using Module

Former Member
0 Kudos

Hi,

Following is the scenario overview:

1. Source file is encoded text file.

2. Decode the source file to obtain the XML file using Base64 decoder in adapter Module.

3. Use the XML file for mapping.

I have written a java code which decodes the file and forms the XML.When i run it as a stand alone it works fine.

When I deploy it, it does not decode the whole source text and forms partial xml file because of which whole scenario does not work.

Can anyone suggest where and what the problem can be?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

When i run it as a stand alone it works fine.

Have you tried doing a standalone test with the same file for which decoding remains incomplete.

Another thing you could try is test the Interface(end-to-end) with a small file/other files and check if it works.

Also ,you could just confirm if the source file is been completely picked up by the communication channel.

Former Member
0 Kudos

Hi Manjusha,

Thanks for the reply..

The issue is resolved now.. but there is another issue that has come up..

The problem now is that the module works with File adapter i.e. end to end is successful.

But the same module gives error with JMS adapter.

Its strange..

Edited by: P M on Jul 31, 2009 11:57 AM

Edited by: P M on Jul 31, 2009 12:34 PM

GabrielSagaya
Active Contributor
0 Kudos

Please look at this blog which is encoding outgoing payload

/people/farooq.farooqui3/blog/2008/09/24/sap-xipi-encode-outgoing-payload-using-adapter-module

Instead of encoding

use the following code

BASE64Decoder decoder = new BASE64Decoder();

//Decode the encoded information....

byte b[] = decoder.decodeBuffer(data);

/people/farooq.farooqui3/blog/2008/05/22/decode-base64-incoming-encoded-information-in-sap-xipi-using-java-mapping

Former Member
0 Kudos

Thanks Gabriel, but I have done the same thing u have mentioned.

It decodes the file but not completely it seems.