cancel
Showing results for 
Search instead for 
Did you mean: 

JMS Message Format

Former Member
0 Kudos
210

Hi,

I have to set-up a scenario where I have to load messages from a Message Queue system via XI JMS Adapter into R/3. On R/3 side, we are talking about the Invoices IDoc. Now I have to define the XML structure of the message that has to be provided in the message queue of the SonicMQ System. Does anybody have experience with loading XML messages from a message queue system and can tell me how the message structures are defined? Is a XSD or DTD desription enough? Or does a JMS message also contain somehting like Header data like SOAP?

Thanks in advance.

Alex

Accepted Solutions (1)

Accepted Solutions (1)

prasad_ulagappan2
Contributor
0 Kudos

Hi,

This is just add on information about JMS message structure.

JMS messages consist of three parts : the message header, message porperties and the messsge body.

The message header contains a number of predefined fields that the JMS clients and providers use to idetify and route messages.

Message Properties are name/value pairs that can be optionally added to a message.

Mesage body contains the actual message data, which can be any kind of byte data, including plain text, HTML, XML and image data.

For more information on JMS Message structure, hav a look at www.sappro.com website.(downloads -> 2004 -> September/October)

Former Member
0 Kudos

Thanks, this was the information I was looking for.

Just another question: if I want to provide a description of the structure of the message that should be provided in the Message Queue System, is it enough to provide a XSD description of the payload or do I have to provide a complete XSD of the whole message incl. Header, Properties and Body? My understanding would be that the Header and Properties part would be generated by the Message Queue System according to the Interface Implementation. Is this correct?

Thanks.

Alex

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

<i>My understanding would be that the Header and Properties part would be generated by the Message Queue System according to the Interface Implementation. Is this correct?</i>

Exactly. just create the payload XSD.

Regards,

Bhavesh

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

As Bhavesh said, if you need to get an XML strucutre from JMS Adapter u surely need to use JMS module adapter. There are various module parameters that needs to be given in order to get the proper structure.

In the doc link given by bhavesh, it has both conversion to simple and complex XML structures.

I did the same scenario recently. While working in SP17, u dont need to give that "localejbs" before AF_Modules\MessageTranformBean

Hope this helps.

regards,

P.Venkat

Former Member
0 Kudos

Dear All,

thanks for your feedback.

From what I read I see that with the JMS Adapter I can do several conversions to get the structure right.

Still I have one thing which is not clear to me: how does a typical message look like that is available in a message queue system? Is it just a normal XML that only includes the payload? Or does it more look like a SOAP message where you have not only the payload data in the Body but also Header data with Routing and Authentication data? Maybe somebody has an example that he/she can provide to me.

And finally, can a message queue system only handle XML or also flat files and other data formats?

Thanks again.

Cheers.

Alex

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Alex,

<i>how does a typical message look like that is available in a message queue system?</i>

It purely depends on the system that is posting the message to the JMS queue.

So, if your Sender Application is posting the messages to the JMS queue in XML, it will be displayed in XML format else it will be a string.

Now, once this message is picked by the Sender JMS adapter and after conversion is done ( if any ) , it will be wrapperd around a SOAP header.

Remember XI uses SOAP protocol and so, like anyother message you see in SXMB_MONI, this will have a SOAP header, a SOAP Body and the PAYLOAD ( actual XML message).

regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Alexander,

<i>Or does a JMS message also contain somehting like Header data like SOAP?</i>

The datatype you create for your JMS message will be like any other XMl messsage you craete for a FILE.

If the application posting the message to the JMS queue is not posting an XML message or in a format that you want, you can always do content conbersion in the Sender JMS adapter.

Take a look at this,

http://help.sap.com/saphelp_nw04/helpdata/en/4d/a3bc97ff55c742af7faed661635baf/content.htm

<a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/f02d12a7-0201-0010-5780-8bfc7d12f891">How to use Content Coneversion Module of JMS adapters</a>

Regards,

Bhavesh

Former Member
0 Kudos

<i>Is a XSD or DTD desription enough?</i>

XSD or DTD should be enough I think.

-Naveen.