cancel
Showing results for 
Search instead for 
Did you mean: 

HCI Integration - Content Filter and XPath problem

Former Member
0 Kudos

Hi everyone,

I have a little question. On my integration project I'm trying to filter the informations of the incoming payload. For this I'm using a Filter with an XPath expression that match my needs (I'm trying to get a full node). After the Filter, the Content Modifier serve me to insert the node coming from the Filter in a well formed XML style :

<?xml version="1.0" encoding="UTF-8"?>

<SALESORDER_CREATEFROMDAT202>

  ${in.body}

</SALESORDER_CREATEFROMDAT202>

The ECC send back an error (SRT_CORE/131), but I managed to understand why without solving it.

The problem is the XPath expression or the way XPath is interpreted by HCI.

Let me explain my point : if your XPath is //foo/text(), the result is the textual value of a foo element. If you write //foo or //foo/node() you get a foo element.

Here is my problem with the behavior of XPath in HCI, I tried to get a node, and with ${in.body} insert it in the XML of the Content Modifier. When checking in transaction SRTUTIL, it just concatenate all textual value of my payload, discarding all the tags.

Do anyone know if it's standard behavior, or not ?

Best regards,

Julen.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

First of all, thank you both for answering me. I tried the solution (switch Node to Nodelist), and made a log before the Filter and after the Filter. The problem is after the Filter, the payload is empty !

So in output I have my XML structure but ${in.body} is empty, making ECC to raise an Exception.

Please find in attachment the log files, one of the payload before the Filter and one after.

Here is my Xpath expression, followed by the content modifier.

For obvious reasons, I think the Filter is not working well, but I don't understand why...

Best regards,

Julen.

bhavesh_kantilal
Active Contributor
0 Kudos

So, I tried with your payload as well, and it works for me. The only additional change I had to do was make sure the namespace prefix was updated in my iFlow as below.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

I had made the change one week ago, when I first had an error.

Still in error. Do you think I may switch to a script to bipass the filter ?

Regards,

Julen

bhavesh_kantilal
Active Contributor
0 Kudos

I see an extra Type at the end of your namespace. The namespace should be, xmlns:ns1=http://sap.com/xi/XI/SplitAndMerge

Former Member
0 Kudos

That's it !

I don't know from where it come, but I deleted "Type" and it seems to work now.

Thanks to you Bhavesh !

Best regards,

Julen

Answers (1)

Answers (1)

engswee
Active Contributor
0 Kudos

Hi Julen

I don't have a tenant to try this out, but can you try changing the Value Type of the filter to either Node or Nodelist to see if there is any difference in the output.

Regards

Eng Swee

bhavesh_kantilal
Active Contributor
0 Kudos

Eng Swee is bang On. Make sure your Filter Has NodeList selected!

If you only see the data and not the XML Tags, you have the Filter Type selected as String.

I just tried what you are trying and this is how it seems to work for me with Nodelist...

Integration Flow with Filter and Content Modifier


Filter Settings


Content Modifier Settings



Input Payload to Integration Flow

Output Of Filter Step

Output of Content Modifier Step


Regards,

Bhavesh