cancel
Showing results for 
Search instead for 
Did you mean: 

How to do XSD validation on incoming messages

Former Member
0 Kudos

Hi,

I have scenario where the incoming XML has to be validated against the XSD given by the client.How to go abt it.

regards,

aravindh.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi aravindh,

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,

P.Venkataramanan

Answers (5)

Answers (5)

former_member91687
Active Contributor
0 Kudos
Former Member
0 Kudos

Hi,

I hope the below Thread will be useful to you,

Former Member
0 Kudos

Hi,

we had a similar requirement and from my research in SAP help and some tests in XI have shown, 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 blog listed above), and there is no validation of details (like length, maxLength, minLength etc.) as specified in the XSD.

best regards

Christine

Former Member
0 Kudos

Hi Aravind,

I had faced the same scenario 3 months back.I need to validate an incoming XML against the XSD that is given by the client.I had developed a Module Processor to achieve that.Module Processor is nothing but an ejb that is deployed on the XI Server.Along with the Module Processor, i had also used a helper class which actually contains a java code that validates an XML against an XSD. In the module processor, i had called the method of the helper class. Module processor has to be developed as per the Specifications given by SAP. After u deploy ur module processor, use that module processor in the module tab of the configuration of the comm. chnl. u have to call ur ModProc b4 the default processor that u find in the module tab. if u want further help, forward me ur email-id to anilveepuri@rediffmail.com so that i can send u the guide how to develop the mod proc.

Anil.

andreasbeeker
Discoverer
0 Kudos

Hi Aravind/Anil,

I developed something similar two months ago, which utilizes the Interface Browser Repository classes. It's also a module and it reads the incoming message type and namespace and retrieves the coresponding XSD from the XI repository.

If the XML isn't valid, it will issue an entry in the Audit Log and stop any further processing.

Just forward me your email to abe@plecto.com.

Andi.

former_member181962
Active Contributor
0 Kudos

HI Aravindh,

When you create your message types, you can upload the XSD as an external definition and use in the message type.

This will validate the incoming xml message automatically.

Please let me know if this does make some sense.

Regards,

Ravi

Former Member
0 Kudos

HI,

if you define the message based on the XSD provided my ur client, then during runtime XI will automatically validate the XML with the XSD

naveen

Former Member
0 Kudos

Hi,

check this blog.

<a href="/people/jacob.vandborg/blog/2005/11/29/schema-validation-of-incoming-message:///people/jacob.vandborg/blog/2005/11/29/schema-validation-of-incoming-message

Regards,

Sudharshan.