Skip to Content
avatar image
Former Member

Java mapping

HELLO !!

I have seen couple of foram messages where in people have suggested the option to use the JAVA mapping in XI to handle the special chars in message mapping.

I am wondering how the non-standard and non well formed xml data( e.g <tag> test&test </tag> )can be an input to the XI mappign ?

How does XI handles the non-format xml data ?

Non-formed : <tag> test&test </tag>

well Formed : <tag>test&amp;test </tag>

~~ THANKS ~~

~~Peeru I

Edited by: Peeru Indrani on Apr 5, 2008 12:18 AM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 04, 2008 at 10:45 PM

    If you don't have any payload-dependent processing in the message pipeline (for example, conditional routing), the message is processed up to the mapping step.

    For XSLT & Message Mappings, the messages need to be well-formed XMLs.

    For Java mappings, you can treat the messages before you actually parse it as an XML message (for example, you can input the stream into a "escapeSpecialChars" method).

    Regards,

    Henrique.

    Add comment
    10|10000 characters needed characters exceeded

    • >

      > In all XI documentation, it is written that XI only deals with the well formed XML messages ( correct me if I am wrong)

      Can you paste here an example of such documentation?

      On the contrary, you can actually even handle non-text or non-XML files through XI. For example, there's a blog (by William Li, I think) that shows how to send pdf files through XI (using no repository objects).

      So, if there's no payload-dependent processing, the message will reach up to the mapping step. You only won't be able to see the payload in the SXMB_MONI because it will error out since it's an invalid XML (you can right click and check the source code, anyway).

      Try it on your own.

      Regards,

      Henrique.