cancel
Showing results for 
Search instead for 
Did you mean: 

Passing File sender adapter paylaod to Java Proxy

laxman_molugu
Participant
0 Kudos

I have scenarion that I am getting files from a file adapter and I am not using "File Content Conversion" so file adapter is not converting into any dataType I created for this Scenario to run. The receiver is the Java Proxy as you know the java proxies has input as the MessageType. since we are not mapping incoming file content to any message types then java proxies will not receive the actual Payload.

Question is, How is pass this file content to Java Proxies.

Appreciate your help.

thanks,

laxman

Accepted Solutions (1)

Accepted Solutions (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

if you want to put the whole message then you

try this:

- put the whole file into one field (with content conversion)

- then map this one field to one of the fields

fo the java proxy and insinde the java proxy

you will have access to the whole not converted message

Regards,

michal

laxman_molugu
Participant
0 Kudos

Hi michal,

Thanks for your reply, this is really what I wanted.

Can you specify how can I convert the whole file into a single field??

I was getting errors in my trials..

thanks,

laxman

moorthy
Active Contributor
0 Kudos

Hi,

Your data type may be like this

<DT_Test>

<Row> .....</Row>

</DT_Test>

In Content Conversion

DT_Test.fieldNames = Row

DT_Test.fieldSeparator = 'nl'

Hope this helps,

regards,

moorthy

laxman_molugu
Participant
0 Kudos

Hello Moorthy,

Thanks for your suggestion, when I do DT_Test.fieldSeparator = 'nl' it is creating a new record for each new line in the source file. But I am looking for converting whole file into a sinle String. Do you know what is the fieldSeparator for end-of-file?

thanks,

laxman

Answers (2)

Answers (2)

moorthy
Active Contributor
0 Kudos

Hi Laxman,

If you are getting a message in XI from the file, use the same message type(Outbound Message Interface) to create the Inbound message Interface. use this Inbound Message Inetrface to create Java Proxy.

Hope this helps,

Regards,

Moorthy

Former Member
0 Kudos

Laxman,

Once when you are sending a file to file adapter it is either in File Content Conversion or a normal file. So you have to create a datatype, messagetype and an interface for this. Since you are going to use proxy on the inbound side, here also you have to create the Datatype, messagetype and then you will create a proxy. Since you have both the message types you can have mapping as per your choice.

---Mohan