cancel
Showing results for 
Search instead for 
Did you mean: 

Send Idoc flat file message in JMS receiver adapter

Former Member
0 Kudos

Hello,

I am working on a scenario where we send Delvry 03 idoc from ECC to external system. To external system, we send the whole Idoc in flat file structure through JMS queue. I have used Idoc to flat file program in my interface mapping and have configured JMS receiver adapter with just default Module configs but, I am getting an error in communication channel monitoring for the messages.

Please note that Idoc xml to flat file structure conversion is already done in the mapping, I need to just pass this idoc flat structure in the jms adapter. Hence ther eis no content conversion i nthe adapter..

Please give some inputs..Here are the modules in my receiver adapter and nothing else..

SAP XI JMS Adapter/ConvertMessageToBinary

SAP XI JMS Adapter/SendBinarytoXIJMSService

The error I get is in audit log

Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: No transition found from state: ERROR, on event: process_commence for DFA: CC_JMS_R:ca336a6689f837da8bd3387140fc4447

in turn the message has this error if I open the message

Whitespace is not allowed at this location. Error processing resource 'http://host:port/mdt/messageconten...

and it shows one of the lines from idoc..flat file

Any idea is greatly appreciated..Thank you..Thanujja

Accepted Solutions (0)

Answers (1)

Answers (1)

bhavesh_kantilal
Active Contributor
0 Kudos

Am not sure, but I think this is something to do with the Content Type.

Can you use the message transform bean and change the content type to text and give this a shot to see if you still get the same issue?

Regards

Bhavesh

Former Member
0 Kudos

Bhavesh,

I tried that, still doesnt work. I need to tell the adapter that the message coming into the adapter itself is text.

Thank you for the suggestion....

bhavesh_kantilal
Active Contributor
0 Kudos

Just to confirm, is this what you tried?

Transform.ContentType text/plain;charset=utf-8

Regards

Bhavesh

Former Member
0 Kudos

Along with it, I had to give mandatory segments like fieldFixedlengths,

Transform.Class - com.sap.aii.messaging.adapter.Conversion

Transform.ContentType - text/plain;charset=utf-8

xml.addHeaderLine - 0

xml.conversionType - SimpleXML2Plain

xml.fieldFixedLengths - 1000

xml.fixedLengthTooShortHandling- Cut

I shouldnt give conversionType - simplexml2plain - it should be somehting that says there is no xml conversion - just take the data as is..

Also fieldfixedlengths - i just had put as 1000 - but i cant do that too for real messages....

What do you think?

bhavesh_kantilal
Active Contributor
0 Kudos

You don't need to use the other parameters I hope.

Just give it a shot just with the Content Type parameter.

Regards

Bhavesh

Former Member
0 Kudos

When I just did content type, it threw exception expecting convertiontype, fieldfixedlegths..

bhavesh_kantilal
Active Contributor
0 Kudos

Now that is strange.

I have used the Message Transform Bean with SOAP adapter's and mail adapter's and I only used it to change the content type. Never used it with JMS adapter's though so not sure if JMS adapter has a specific need.

Sorry, but now I don;t have any further answer.

If you are willing to look for workarounds , in your interface mapping, add a additional java map that takes input as the Idoc flat format and then puts this into a temp XML format and then use the Transform Bean with the Content Conversion parameters .

Regards

Bhavesh

Former Member
0 Kudos

If I need to send xml, I can send the incoming idoc xml itself as it is to receiver. But they need flat file structure sent thro JMS..Content conversion is too tedious to do for idoc xmls. Moreover its just not one idoc..there are many interfaces following this design,,..Hence i should be sending flat structure in jms without content conversion..

any more ideas or suggestions?

bhavesh_kantilal
Active Contributor
0 Kudos

The difference in what I suggest is that it is way simpler.

Maybe you did not understand this, so will try to explain it better. Its not the best thing to do, but if JMS adapter doesn't budge then you can give it a shot.

1. You continue to use the ABAP mapping in your interface mapping to map the Idoc xml to Idoc flat.

2. Write a Java Map that will take the output of the ABAP mapping ; and then create a XML output which would be something like,

<Root>

<Idoc_Flat>

<Data>ABAP Mapping Output<Data>

</Idoc_Flat>

</Root>

3. Now use the simple content conversion in the JMS adapter to convert this to flat file.

Regards

Bhavesh