Skip to Content
avatar image
Former Member

PI 7.5 REST Receiver XPath Expression Removing Tags


I am trying to use a REST Receiver in PI 7.5 (Single Stack) to call a web service. The end point is generated based on an XML message that is created with message mapping. The document is formatted below (DispatchRequest).

In the communication channel, I am trying to use an XPath Expression to append the entire XML document to the end of a static URL. I am currently using the expression "/descendant-or-self::node()" but that results in the XML document without any tags. I would like to pass the document with the tags and values. I have tried multiple different XPath expressions with no luck... are there any possible ideas on how to pass the XML as-is at the end of the URL?

Here is the configuration currently:

Thank you for your help!

<?xml version="1.0" encoding="utf-8"?>
    <address1>123 MAIN ST</address1>
    <companyName>TEST COMPANY</companyName>
    <address1>123 MAIN ST</address1>
    <companyName>TEST DESTINATION</companyName>
    <contactName>TEST DESTINATION</contactName>
    <address1>321 Primary Rd</address1>
    <companyName>BILL TO COMPANY</companyName>
    <city>NEW YORK</city>
  <pickupContactCompany>PickUp Company Name</pickupContactCompany>
capture.png (26.6 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Dec 29, 2016 at 03:57 AM

    Hi George!

    I don't think that you can get entire XML document as string using XPath expression.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thank you for the response, Evgeniy! Do you know if there is a way to append an entire XML document as-is (as a string) to the end of the URL? Is there another method I can use to achieve this?



  • avatar image
    Former Member
    Dec 29, 2016 at 01:12 PM

    Hi George,

    In the mapping you can use return as XML option and send the entire XML to a target node and you can refer it in XPATH or you can use adapter specific attributes if you don't want to use any target node to store the entire XML value. Hope this helps.



    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Evgeniy Kolmakov

      Hi Evgeniy,

      Thank you for sharing that... luckily we were able to find how to still use the XPath expression but map it the way we needed.

      Thanks again,