cancel
Showing results for 
Search instead for 
Did you mean: 

Verify if payload is a valid XML (MAIL -> RFC)

Former Member
0 Kudos

What I need to do to verify if the payload is a valid XML ?

I have a process that get data from email and call a RFC:

MAIL -> XI <-> RFC.

It's run very well, but I have problens when I recept any message not expected how a text/plan sent by span for example.

Thanks!

Evandro.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Evandro,

I am new to xi,

I have to implement a scenario in xi that takes a mail attachement(xml file) and calls rfc by passing the xml values as parameters to rfc.

Please help me out with some step by step process or blogs.

Thanks in advance,

best regards,

chandra.

Answers (1)

Answers (1)

henrique_pinto
Active Contributor
0 Kudos

If you have access to the .XSD of the file, you could use a Schema Validation Mapping.

Check out this link: http://help.sap.com/saphelp_nw2004s/helpdata/en/c4/e1343e8c7f6329e10000000a114084/frameset.htm

Regards,

Henrique.

Former Member
0 Kudos

Hi,

Just adding on to Henrique, From SAP help and through some tests in XI,it is seen that, the only validation that takes place within XI is for mandatory nodes and occurrence of nodes of the target message. There is no validation of the source message (workaround is shown in the blog provided below), and there is no validation of details (like length, maxLength, minLength etc.) as specified in the XSD.

Do go through these links......

/people/jacob.vandborg/blog/2005/11/29/schema-validation-of-incoming-message

The following link gives mapping XSD to JAVA.

http://help.sap.com/saphelp_nw04/helpdata/en/c8/7e5e3c754e476ee10000000a11405a/content.htm

You can also get some help by following this thread.

Regards,

Abhy

Former Member
0 Kudos

Can I to recep a text (non-xml) in a Interface Message ?

I'm using Queue and i'm processing using Exactly Once in Order and the process is "stoped" until a manual action in XMB_MONI for all the messages recept after error in same queue.

I don't using "Mail Package" because I has problem with special characters as 'ç,á,é,õ' and others.

Evandro.

Former Member
0 Kudos

Hi,

Any message can be sent to XI, incl non-XML. However, if you want to do Message or XSLT mapping, then the message will have to be in XML format.

However, with java mapping, you can read the source in any format and process it in anyway you want. Just reference the java mapping program in your Interface Mapping.

Regards,

Bill

henrique_pinto
Active Contributor
0 Kudos

William,

that's why I had said to use Schema Validation.

He can parse the input stream with validation = true. If it's not a valid xml message, then it will generate an exception.

Regards,

Henrique.