on 01-14-2011 10:47 AM
Hello,
I am using this blog to write conditions /people/shabarish.vijayakumar/blog/2006/06/07/customise-your-xpath-expressions-in-receiver-determination and accordingly call the receiver (either Receiver_1 or Receiver_2), never to call both the receivers simultaneously
I have a sample source message like:
<?xml version="1.0" encoding="UTF-8"?>
<ConsumerDetails>
<UserId>91200024:123456</UserId> To check if UserId starts with 91200024: or not
<Date>20111301161459</Date> To check if length of Date is 14 or not
<Billing>RC</Billing> To check if Billing has value RC/ SB or not
<Type>SE</Type> To check if Type has value SE/ CWE or not
</ConsumerDetails>
Accordingly wrote the below conditions:
Receiver_1 (Conditions working fine):
UserId (MiddleOperator --> ContainsPattern) --> 91200024:*
/ConsumerDetails[(string-length(Date)) = "14"] --> EX
/ConsumerDetails[(Billing = "RC") or (Billing = "SB")] --> EX
/ConsumerDetails[(Type = "SE") or (Type = "CWE")] --> EX
Receiver_2 (Conditions not working; except 1st condition):
/ConsumerDetails[not(starts-with(UserId,'91200024:'))] --> EX
/ConsumerDetails[(string-length(Date)) != "14"] --> EX
/ConsumerDetails[(Billing != "RC") or (Billing != "SB")] --> EX
/ConsumerDetails[(Type != "SE") or (Type != "CWE")] --> EX
Only Conditions for Receiver_1 are working fine; those for Receiver_2 are not. Can anybody please provide correct conditions to be written in the Condition Editor?
~Thanks.
Hello,
Have you tried using the condition as mentioned below:
/ConsumerDetails[not((string-length(Date)) = "14")] --> EX
/ConsumerDetails[not((Billing = "RC")) or not( (Billing = "SB"))] --> EX
/ConsumerDetails[not((Type = "SE")) or not((Type = "CWE"))] --> EX
i.e. use not() instead of '!' ??
-Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.