cancel
Showing results for 
Search instead for 
Did you mean: 

Data type and message type

Former Member
0 Kudos

Hi Every one, may be this is a basic question.

What is the technical difference between Datatype and messagetype? What are the different purposes served by them.

-Naveen.

Accepted Solutions (0)

Answers (6)

Answers (6)

Former Member
0 Kudos

Hey

Message type describes the structure of message and can use used to describe both inbound or outbound messages.

major difference between Data type and message type is that Message type corresponds to WSDL standards and enable message instances to be identified via an element.

Thanx

Aamir

0 Kudos

The Data Type and Message Type are analogous to a basic Data type and variables in C.

You can compare a data type in XI with a basic data type in C (as Int , float).

The Message type can be compared to the variable name in C( Such as int a, float b)

Int is the data type whereas the variable name "a,b" are Message type.

Hope this makes it clear, This is out of my understanding.

former_member91687
Active Contributor
0 Kudos

Hi naveen,

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.

Has this cleared your doubts.

Regards,

Chandra

Former Member
0 Kudos

When you are building a Message Interface, you are really putting together a WSDL file. You can see this when you look at a MI, one of the tabs is for WSDL. So your question about the differences between message types and data types gets to why WSDL has the distinctions.

In WSDL, <i>type</i>s (XI Data Types) are basic data structures. <i>message</i>s (XI Message Types) have a pointer to one or more <i>type</i>s. In the XI Designer, when you are putting together a Message Interface (WSDL porttype), you are building a WSDL file. WSDL says a message points to a type, XI has you create a Data Type and a Message Type. Then point the Message Type at the Data Type.

Standard WSDL has more flexability (ambiguity) built in, including the ability to use Message Parts to combine multiple <i>type</i>s into one <i>message</i>. XI does not allow for this. The Message Type may point to exactly one Data Type.

To achieve the same effect of "multiple data types" in XI, you would create datatype1, datatype2, and then create datatype3 which has two root elements in it, one of datatype1, and another of datatype2. Then you would use type3 in your Message Type.

Read this for more info:

http://www.w3.org/TR/wsdl

Tim

moorthy
Active Contributor
0 Kudos

HI,

Data Type is basuc unit of data structure.

And Message types comprisess of Data types. SO it is clear that it is something like wrapper to your data type. So each message type should have one root element.Then it will become valid XML.

Just go thru following links-

http://help.sap.com/saphelp_nw2004s/helpdata/en/a8/bfc6373c8fea43bdb3541535bcbd43/frameset.htm

http://help.sap.com/saphelp_nw2004s/helpdata/en/a8/bfc6373c8fea43bdb3541535bcbd43/frameset.htm

Hope this helps..

Regards,

Moorthy

former_member91687
Active Contributor
0 Kudos

Hi Naveen,

The message type is the actual payload message, it corresponds to the root element of your XML document. Each XI message type is based on or references one data type. Where as the data type is your entire XML structure.

Hope this clears your doubt.

Regards,

Chandra

Former Member
0 Kudos

Hi Gopal,

Does that mean, a message-type can be associated with morethan one data-type?

Former Member
0 Kudos

no, a message type consist of exactly one data type. However a data type can be built out of several datatypes, so you can build hierarchical structures with datatypes (and reuse data types within different data types e.g. create data type for address data and use it in a data type for customer data as well as for vendor data).

Where the data type defines the structure of the XML message, the Message Type defines the name of the Root Element as well as the XML Namespace which can be different from your XI Development Namespace.

Regards

Christine

Former Member
0 Kudos

Hi Naveen,

Please go through the following links. Gives yo a clear idea of what is message type and data type and example of each.

http://help.sap.com/saphelp_nw04/helpdata/en/a5/04623c4f69b712e10000000a114084/content.htm

Message type

http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/tree.htm

Regards

Vijaya