4 Replies Latest reply on Oct 6, 2005 10:05 PM by 456169

    How to transform common object to xml string

    456169
      I know that I can import xml dtd a the common data type in iStudio. However, does anyone know how to serialize it back to the xml string during the field mapping? Is it even possible?

      Thanks,

      Edward
        • 1. Re: How to transform common object to xml string
          436342
          Don't understand the question?

          When you import the DTD to define a common or application data type, all you are doing is defining the structure of the message. The mapping screen just provides you a mechanism for mapping from one structure to another, and therefore it does not care if you are using XML database objects or anything else.

          What do you mean by serialize back to teh XML string?

          Cheers Stuart
          • 2. Re: How to transform common object to xml string
            456169
            Thanks Stuart for your reply. What I'm trying to do is to convert the xml message from the common view object to JMS Text Message. I declared the application data type as AQ$JMS_TEXT_MESSAGE and I try to map the common data type which is I imported from dtd to the application JMS type. During the mapping I need to serialize the common data type object back to xml string, so I can copy it to text_vc field defined in JMS Text Message (String type).

            Or do you know any other alternative to convert from RAW XML payload type to JMS payload type in iStudio?

            Thanks,

            Edward
            • 3. Re: How to transform common object to xml string
              201430
              Hi Edward,

              I'm not sure if I understand you correctly: You want to give over the former xml message which was converted to common view into a big string field of JMS text message?

              That is possible. You have to create a new application data type at your target application with the corresponding dtd. Then you have to replace the type of the text_vc field into your created application data type. Then you map the common view fields normally to fields of text_vc field. At runtime the adapter automaticall will create xml for your field.

              Regards
              Colette
              • 4. Re: How to transform common object to xml string
                456169
                Colette, thanks for your suggestion. It works.

                Edward