cancel
Showing results for 
Search instead for 
Did you mean: 

XML Validation on HTTP Adaptor

Former Member
0 Kudos

Hi,

We are implementing a HTTP sender channel on PI 7.11 and requires XML validation to be performed upon receiving. The validation is required to check if all the tags are closed and ended properly. Failing to do so, an error XML will be generated and subsequently send back to the sender.

There is a blog /people/william.li/blog/2009/03/19/adapter-user-module-for-http-adapter detailing the development of user module for HTTP channel but we remain clueless on how can we change it to suit our needs. The XML messages can be of different format (different XSD) thus we need to make this as generic as possible.

Ultimately the intention is to prevent XML to fail at later stage within PI and stopped the communication. Hope any experts out there can point us to the right direction.

Thanks in advance!

Regards,

Wai Xin

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member194786
Active Contributor
0 Kudos

Hi Wai Xin,

If you want to perform XML validation, use the standard functionality of XML validation in PI 7.11.

Using this you would not need any custom modules.

http://help.sap.com/saphelp_nwpi71/helpdata/en/44/0bf1b3ec732d2fe10000000a11466f/content.htm

Hope this is helpful.

Regards,

Sanjeev.

Former Member
0 Kudos

Thanks for the reply, however this approach will remain to be error catching but will not be able to respond the way we want it to be. Thanks anyway, closing thread.

Former Member
0 Kudos

Hi,

Another option can be to use SOAP sender channel and option "validation by adapter engine" in the sender Agreement to validate the xml in the adapter itself.

Please refer the foll link for this

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/d06dff94-9913-2b10-6f82-9717d9f83...

Regards

Former Member
0 Kudos

As for the sender agreement solution, that will stop us from detecting the XML message as incorrect in early stage. Failing which, the error message will be highlighted in PI but nothing seems to take place thereafter. One of our requirements is the message must be send back to the Sender, which we intend to achieve by generating an error message type.

Our receiver determination checks for this error message type and will route it back to the Sender.

former_member854360
Active Contributor
0 Kudos

Use SOAP sender channel and do it with java.

Chcek the possibility of creating fault message with custom validation code in java

check this thread stefans reply on same thing .it will give you a direction how to proceed with it.Hope it helps you

Also see

Former Member
0 Kudos

Thanks for the response, originally we were using SOAP adaptor however during integration testing our partners software has a mismatch with the authentication mechanism. This forces us to scrap the idea of using SOAP adaptor and conform to HTTP adaptor instead.