on 01-04-2006 9:00 AM
Hi,
Well i am developing a test application, which would be testing a system by sending a test idoc message from XI to the XI itself.
1. A HTTP client is used to a idoc as a xml file to the SAP XI.
2. Later the message is processed in the XI with the mappings etc & has to be transferred to a suitable receiver.
3. In order to do the step 2, i need to determine whether the message is a test message or some other normal message. Hence in the Receiver determination, i need an appropriate condition.
4. My problem is that i can search for a particular xml tag in the XPath of the test-idoc but i cannot determine whether its a normal message or not with an xpath expression. for example
my condition for the test receiver determination:
A)
/Z_C_ADDADDRESS01/IDOC/EDI_DC40/SNDLAD = TestMessage_Tool
B)
/Z_C_ADDADDRESS01/IDOC/EDI_DC40/SNDLAD =/ TestMessage_Tool
(=/ is not equals, i have no other symbol here).
The condition A is valid, but for a normal message B) has a problem. Since the tag SNDLAD does not exist at all in a normal message, it fails here. i also tried to check if there is anything like tag does not exist condition. but it is also not available.
Has anybody done something similar to this before. if yes please do write back. if its necessary i shall elaborate more in detail.
Thanks,
Srinu.
Wow, should be quite simple.
Just put condition A (which is workin)for TestMessage and <b>no condition at all</b> for the nonTestMessage.
Anyway, do a search in SDN with "Condition Editor" or "XI XPath" keywords and're gonna find a lot of threads about it. You can use very tricky XPath expression!
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Alex,
Thanks for the reply.
If i do not provide a condition for the other receivers,a test message would also be sent to a nonTestReceiver.
And as you said, if i give only the condition (A), the receiver determination would fail if the tag does not at all exist(for the Case of not being a test message). I also receive a mapping execution error in the message monitoring.
like :
com.sap.aii.utilxi.misc.api.BaseRuntimeException was thrown
srinu.
Hi Srinu,
I was reading through the help on condition editor and saw this....
EX Exists
You use this operator to check the existence of the expression (in the left operand). This enables you to find out whether a substructure represented by the expression exists.
You can use this operator if you want to check whether a particular element exists in the payload, for example. To do so, enter the element you want to check in the left-hand operand and leave the right-hand operand empty. <b>You can also use the = operand for this check.</b>
I was thinking, it might be worth while giving a shot by using "not equals" and donot give anything in the right operand field....(as the "equals" with right operand blank check for "exists")...
if you have already tries this....ignore my reply.
btw..Welcome to SDN!
Thanks,
Renjith.
As suggested by Renjith, try putting in your NON-test receiver something like
not(/Z_C_ADDADDRESS01/IDOC/EDI_DC40/SNDLAD EX)
as the left operand, EX as operator and nothing as right operand. Tune it a little bit and it should work, evalutaing to "true" when SNDLAD doesn't exist.
Let me know.
Alex
Hi All,
Thanks for the replies. i could not respond since i was on vacation. So this is the way i have done it.
i selected 2 conditions which says when a tag / text exists & if it is equal to the required value - passes it onto a particualar receiver. if not it shall send it another with a not condition.
may be i get some other ideas, since this test tool has to be customised later for different input types like RFCs, HTTP - SOAP, XML files (done now) etc. Hence i got to look that the Receiver Determination does not conflict with different types.
Thanks
Srinu.
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
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.