cancel
Showing results for 
Search instead for 
Did you mean: 

Data type and Message type

Former Member
0 Kudos

Hi

In every scenario we are defining the data types first and after that message types. Basically we are importing data types and calling them as a message types. As we are using same data types as message types then could you please anybody exaplain the need for message types ??

Is there any situation where data types and message types are different ?? I have gone thorugh through XIhelp......but didn't get their explanation properly.

Could you please anybody explain me actual differences of data types and message types ??

Thanks in advance

Ravindra

Accepted Solutions (1)

Accepted Solutions (1)

Shabarish_Nair
Active Contributor
0 Kudos

this is a question i too had when i started off with XI

Adding to whats said above ... refer this thread for a good discussion -

Former Member
0 Kudos

Thanks Kumar !! That answers my question

Ravindra

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ravindra,

The data type is basically an XSD representation, it describes the valid payload of messsage, it is an abstract description of a structure that you can assign to elements in a XML schema definition. A message type that references a data type determines the name of the root element of a message and it can reference only one data type and determines the content of the message to be transferred.

A data type is not sufficient to describe the instance of a message. In XML schema, data types are defined as abstract types that are not yet fixed to an element. You can only describe an instance of a message when you have specified a data type as an element type. Therefore, a message type defines the root element of a message. And hence you would require to have a messsage type.

However more than one message interface can use the same message type and when you do message mapping you can map messages by directly referencing the message types.

Regards,

Abhy

Former Member
0 Kudos

A message type comprises a data type that describes the structure of a message. At the following points in SAP Exchange Infrastructure you can refer to the message to be exchanged at runtime by using the message type:

· More than one message interface can use the same message type. For example, an asynchronous outbound message interface and an asynchronous inbound message interface can reference the same message type because the request message does not need to be mapped.

· When defining a message mapping you can directly reference message types to map messages from an outbound interface to messages from a receiver interface.

For technical reasons, a data type is not sufficient to describe the instance of a message. In XML schema, data types are defined as abstract types that are not yet fixed to an element. You can only describe an instance of a message when you have specified a data type as an element type. Therefore, a message type defines the root element of a message.

A message type does not define the direction of the message exchange, in other words, whether it is a request or a response. In exceptional cases you can use the same message type for both the request and the response message.