cancel
Showing results for 
Search instead for 
Did you mean: 

Variable substitution xpath problem

Former Member
0 Kudos

Hello,

I am using variable substitution to change the filename in the receiver file adapter.

I have defined three variables:

sender     :     payload:Invoice,1,AccountingSupplierParty,1,Party,1,PartyLegalEntity,1,CompanyID,1

receiver    :     payload:Invoice,1,AccountingCustomerParty,1,Party,1,PartyLegalEntity,1,CompanyID,1

invoice     :     payload:Invoice,1,ID,1

In the XML payload the values for sender is 100050, the value for receiver is 310000 and the invoice is 6000000010.

I want the filename to look like this:

%sender%_%receiver%_%invoice%.xml

which should be 100050_310000_6000000010.xml in this case.

However the filename created is 310000_310000_6000000010.xml

The receiver number occurs twice and also in the position of the sender. Seems like there is a mix up between AccountingSupplierParty and AccountingCustomerParty. Anyone know why this happens and what one could do to solve it?

Btw, the mapping is xslt so not so easy to do ASMA.

Thanks,

Per

Accepted Solutions (0)

Answers (1)

Answers (1)

MichalKrawczyk
Active Contributor
0 Kudos

hi,

>>>>Btw, the mapping is xslt so not so easy to do ASMA.

just add a new message mapping after the XSLT mapping in the operation mapping - from the XML target (from XSLT) to the same message (XML target) and do the ASMA there - the easiest way and you're not touching the XSLT at all

10 mins of work I'd say

Regards,

Michal Krawczyk

Former Member
0 Kudos

I'm working with UBL 2.0 Invoice document and the problem when using message mapping with this document is that is adds the namespace prefix to all the elements in the result three. There is a lot of referenced xsd. The xml result is well formed, but it gets impossible to read for humans, which is important for testing and tracing errors. That's why we are using xslt in the first place.

It is also a 2:1 mapping and does ASMA work for that, doesn't ASMA require 1:1?

Thanks,

Per