on 04-29-2008 2:11 PM
Hello experts,
I have follow XPath expression in the condition editor:
/p1:empfaengerInput/vsnr[string-length(@ID)>2] EX
I want to do something, if the length of the attribute ID is greater than 2. But it doesn't work.
Is the XPATH expression correct?
Thx for your help!
Jürgen
Hi Jürgen,
as XI 3.0 can only process XPATH 1.0 you have to use:
/p1:empfaengerInput/vsnr/@ID[string-length()>2]
Regards Mario
Edited by: Mario Müller on May 2, 2008 9:07 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
>
/p1:empfaengerInput/vsnr[string-length(@ID)>2] EX
The same XPATH worked for me. So there might be any other issue. Maybe a cache problem?
Is in your trace an entry like this:
<Trace level="2" type="T">Classic Receiver Determination via Rules.</Trace>
<Trace level="3" type="T">...create rule engine</Trace>
<Trace level="2" type="T">Check conditions for rule line no. 1</Trace>
<Trace level="3" type="T">...call rule engine for Condition %CL_SAI_SWF_RULE_ENGINE.MSG_GET(MSG=&_MSG&;NSP=&_NSM&;XPATH="/p1:empfaengerInput/vsnr[string-length(@ID)>2]")% EX</Trace>
<Trace level="2" type="T">......extracting (old) for Extractor: XP /p1:empfaengerInput/vsnr[string-length(@ID)>2]</Trace>
<Trace level="2" type="T">......extracting values found: 1</Trace>
<Trace level="2" type="T">......extracting values found: 1</Trace>
<Trace level="2" type="T">...valid Receiver with Condition: - MyReceiver</Trace>
<Trace level="2" type="T">No Receiver found behaviour: 0</Trace>
<Trace level="2" type="T">Number of Receivers:1</Trace>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Stefan,
I can't find the entry:
Here you can find my trace:
<Trace level="1" type="B" name="CL_XMS_MAIN-CALL_PLSRV_LOCAL">
- <Trace level="1" type="B" name="CL_RD_PLSRV-ENTER_PLSRV">
<Trace level="1" type="T">R E C E I V E R - D E T E R M I N A T I O N</Trace>
<Trace level="1" type="T">Cache Content is up to date</Trace>
<Trace level="2" type="T">Start without given receiver</Trace>
<Trace level="2" type="T">Classic Receiver Determination via Rules.</Trace>
<Trace level="2" type="T">Check conditions for rule line no. 1</Trace>
<Trace level="2" type="T">...valid Receiver w/o Condition: - E_VERMITTLERSERVICE_QAS</Trace>
<Trace level="2" type="T">No Receiver found behaviour: 0</Trace>
<Trace level="2" type="T">Number of Receivers:1</Trace>
</Trace>
</Trace>
</Trace>
We have restart the engine (ABAP+Java).( Cache Problem?, but without success)
If the length of the string is greater than 2, I think it works.
But if the length of the string is lower than 2, I can see an error (Timeout, I can't see the Workflow of the integrationprocess in the Message Monitoring)
Best regards,
Jürgen
Hello,
thanks to all for your help!
I tried all your suggestions but without success.
Here you can find the xml:
<?xml version="1.0" encoding="UTF-8" ?>
<ns:empfaengerInput xmlns:ns="urn:test.modus">
<vsnr ID="Q534343434356343345">25</vsnr>
</ns:empfaengerInput>
(empfaengerInput./p1:empfaengerInput/vsnr[string-length(@ID)>2] EX )
p1 --> urn:test.modus
My goal is to check if the ID in vnsr has a value or not.
I thought the best solution for this requirement is to use XPATH.
Bye
Jürgen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try
/p1:empfaengerInput/vsnr/@ID[string-length(.)>2] EX
And as said, make sure the namespaces are correctly defined (some attributes also have namespace).
Regards,
Henrique.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
When I remember right, than you have to use ./@ID for an attribute, when you want to refer to a relative path.
Make also sure, that the namespace declaration in the condition editor is set correctly.
Maybe you post the relevant part of your XML to look for further hints.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Give the following expression in the square brackets and try
string-length(@ID) > 2
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
take a look to these links
The string seams to be right except by the @.Delete it and try again.
If you have a xml editor like Altova(XML SPY) you can check whether the Xpath works.
http://www.w3schools.com/xpath/xpath_functions.asp
http://www.w3schools.com/xpath/xpath_operators.asp
Thanks
Rodrigo
Edited by: Rodrigo Pertierra on Apr 29, 2008 10:22 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.