Skip to Content
author's profile photo Former Member
Former Member

to read an XML in PI without ns1: tag

Hi experts,

I have an inbound XML file from a third party which PI is supposed to read and validate.

when the sender channel picks up the file it throws the error:

Error:
com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: XML
Validation for payload with root element name ConfigRequests , target namespace
Failed!Errors Encountered During Parsing 1.cvc-elt.1: Cannot find the
declaration of element 'ConfigRequests'.

i have tried processing he same file with ns1: and it passes successfully in PI

Can PI read an XML without the "ns1" tag.

1.png (14.4 kB)
Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Sep 29, 2014 at 07:42 AM
    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 29, 2014 at 07:51 AM

    Hi Tanzoom,

    The best way is the pointed out by Javier. You can also use a XSL mapping to remove all the namespaces, check my answer in this thread

    Regards.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 29, 2014 at 11:22 AM

    Hi Tanzoom,

    'ns1' is not a tag but a namespace prefix. It stands for a namespace and is part of the identity of an xml element. ConfigRequests was simply not validated because it was not in the right namespace. Which prefix you use, doesnt matter. Only the represented value - the namespace - is important.

    /Udo

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.