cancel
Showing results for 
Search instead for 
Did you mean: 

XPath for root node in condition editor

Former Member
0 Kudos

Hi,

I have a HTTP to IDOC scenario. I have to accept any incoming document,(i will know only at runtime whether it is ORDERS or INVOICE or ASN etc) and post it to the respective receiver based on what is the name of the root node. But how do i specify this in the condition editor? if i give /* or name(/*) it does not work.Can anyone suggest a solution for this?

Thanks

Shakthi

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

yes

Former Member
0 Kudos

Hey

Use the XPath for EDI_DC40->IDOCTYP.

This will have values ORDERS05,INVOICE02,DELVRY03/SHPMNT05.

Thanx

Aamir

Former Member
0 Kudos

Hi,

Thanks for the responses. True that i can get the values from IDOCTYP but i have some other scenarios (HTTP to SOAP) where the documents are not IDOCS. Im stuck in those cases, the only way i can identify what document it is is from the root node. What do i do then?

Former Member
0 Kudos

Well I have one solution but don't konw if it is worth for you.

First create one mapping called pre_mapping in this mapping map all fields and the root node value to the target structure correspondingly . Now use BPM with simple receive & send steps. BPM should send the message back to XI.

Use the final mapping with this messge retuned from BPM.

Now use the x-path and select the field from source structre (which BPM has sent back to XI) which contains IDOC type. So in this case your sender system will be BPM.

Former Member
0 Kudos

There is a dedicated xpath function used to retrieve node name: name(node), maybe you can give a try ! The only trick will be to determine the suitable xpath expression against ONLY the root node ...

I just gave a try with name(/) but it also returns the namespace, so I suggest using local-name(/), it will return only the name of the root node !

Chris

Edited by: Christophe PFERTZEL on Oct 6, 2008 12:49 PM

Former Member
0 Kudos

Does any field in the incoming document is having the info of ORDERS or INVOICE or ASN then you can use the x-Path for your corresponding receivers.

In condition editor take F4 help and choose the fild which is having these values and then choose = ORDERS for first receiver similarly create x-path for 2nd and 3rd receiver.

So, in short there will be 3 different conditions against each receiver in Receiver Determination.