Quantcast
Channel: SCN : All Content - Process Integration (PI) & SOA Middleware
Viewing all articles
Browse latest Browse all 7030

XPath Expression to Check if certain condition does not exists

$
0
0

Dear Experts,

 

I have an interface scenario with this source message structure:

/Message/Body/Field1

 

Body have multiple occurence in the Message, and each Body will have only 1 Field1.

 

 

at the Interface Determination:

- Interface A:     if the /Message/Body/Field1 = "" exists

- Interface B:     if the /Message/Body/Field1 = "" does not exists

 

I have configured Interface A correctly with the following XPath expression:

left operator:          /Message/Body[Field1 = ""]

middle operator:     EX

right operator:

 

 

Somehow I still could not figured out how to check if /Message/Body/Field1 = "" does not exists.

I've tried some XPath expression:

left operator:          /Message/Body[Field1 = ""]

middle operator:     !=

right operator:        EX

(this results in Interface B generated no matter /Message/Body/Field1 = "" exists or not)

 

 

left operator:          /Message/Body[ (count(Field1 = "") = 0) ]

middle operator:     EX

right operator:      

(this results an exception raised at Interface Determination when Message/Body/Field1 = "" does not exists)

 

 

And some other workaround but still no success.

Any advice would be appreciated.

 

 

Thank you,

Suwandi C.


Viewing all articles
Browse latest Browse all 7030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>