on 05-16-2007 3:14 PM
Hi,
I have to use file sender adapter to read files from a directory. The files are in XML format. Each file has a different XML structure and I can not distinguish by the name file the type of XML that goes into the file. How can I do that ?.
Thanks.
Best regards
Hi Francisco,
hopefully you solved the issue already, but maybe someone else has the same issue.
I just faced the same challenge.
In my scenario the all message types have the same receiver but different inbound interfaces and mappings should be used.
I solved it by checking the root element with a xpath content based routing in the interface determination.
It's important that you register the different namespaces used by the message types and then just insert the root element name and as compare operation select EX
In my sample I have to deal with two message types which use different namespaces.
message type1 eCH-0020:delivery xmlns:eCH-0020="http://www.ech.ch/xmlns/eCH-0020/2"
message type2 eCH-0078:eventReport xmlns:eCH-0078="http://www.ech.ch/xmlns/eCH-0078/2"
Therfore I inserted both namespaces in the table of the expression editor
prefix eCH-0020 namespace http://www.ech.ch/xmlns/eCH-0020/2
prefix eCH-0078 namespace http://www.ech.ch/xmlns/eCH-0078/
the value of the prefix is up to you, I decided to use descriptive namespaces
and then insert follwing XPATH expressions
/eCH-0078:eventReport EX
/eCH-0020:delivery EX
that's it
hope this helps.
Best regards,
Jochen
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey
as u have different XML structures,then either u wont be using any IR objects or u will have separate IR objects for all of them.
if u have different IR objects for all of them,then simple differentiate them based upon their name
thanx
ahmad
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
1. create a simple adapter module that will just check the structure of the file
and put some info about it in dynamicheader
2. in receiver determination use this dynamicconfiguration info
to route to correct receiver (mapping)
Regards,
michal
-
<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Only option is to use a Java or XSL mapping , try to determine what the XML strcuture actually is and then create the target strucutre.
Regards
Bhavesh
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 | |
10 | |
7 | |
6 | |
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.