Skip to Content
author's profile photo Former Member
Former Member

Questions about Data Types

Hello every XI Gurus,

we are developing now an adapter for SAP XI and IBM Lotus Notes. This adapter should write the data from XI into the IBM Lotus Notes.

The requirements are: the adapter should write the data in correct data types into the Notes Database. For example, in a Notes Document

there is a field called "Interest-rate". Its data type is "Double",then the adapter should write the data for this field as double. It means

the adapter must make a type conversion for each element in the XML document.

Then we have a big challenge. The XI Adapter Engine gives the adapter only the XML messages. In these messages, there are no type definitions.

SAP has no APIs for the adapter to read some information from the IR. We get no XML Schemas for the incoming messages. All elements in the XML messages are Strings. We must write a very long if else loop for each element in the message to find out the correct data type.

Has somebody any ideas how can we fill out this requirement?

Thanks in advance

Xiang

Add comment
10|10000 characters needed characters exceeded

1 Answer

  • Posted on Aug 03, 2006 at 03:16 PM

    Xiang,

    I don't understand why the adapter should be responsible to check the type (validation).

    In my understanding, that would be done in the mapping that's done to generate the data. If the data is generated correctly, than all that the adapter needs to do is to deliver it to the right place, through some defined protocol (and that's the function of the adapter, to determine where and how to deliver a message; not to alter data itself).

    Regards,

    Henrique.

    Add comment
    10|10000 characters needed characters exceeded

    • If the format expected is inputed correctly in the adapter, than it's transparent to the adapter which data type the application is expecting (string, int, double, etc).

      For example: if you input a string in the target field with the content "1.05", if the target application which will receive that message from the adapter expects a float, it'll not generate any error, it will successfully receive the value '1.05' in its float variable.

      Regards,

      Henrique.