on 02-13-2015 1:34 PM
Dear all,
via FTP/FILE adapter I need to read 4 different files with different file names from a FTP server.
Unfortunately they all started with the main node named INFO but got different structures under this.
I am not able to create 4 different data types with name INFO.
Is there any other possibility to have different structures to start with same node?
Only solution I see:
- Create one big data type that include all possible subnodes. That would be tricky, because some subnodes
got same name as well
- Create an own namespace for all data types.
Thanks
Chris
Christian,
I think, you want to pick all 4 XML files with single sender channel. In that case create a single Data Type (with all fields from 4 files).
Let's say file1
INFO
field1
field2
field3
field4
Let'say file2
INFO
field1
field3
field5
Then create a Data type (no need to repeat common fields, XSD does not allow same field name in a level)
INFO
field1
field2
field3
field4
field5
Note when you create DT, MT in a namespace (MT with name INFO). It will have namespace details in root node.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:INFO xmlns:ns0="urn:company:something">
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Raghu,
thanks for your answer. This is the way I was thinking of, but it is not possible because there are a subsegment in two files that have the same name, but different fields.
I didn't check if I am able to create two segments with same name but different subfields, but I am not the meaning that this would be a good idea because of confusion.
I am just using different namespaces now and put the INFO data types in it.
Thanks for your help.
Hi Chris,
If you have different file name then you can create 4 different data type, message type and service interface. The possible scenario is:
Configuration
ESR
you can use the canonical data model approach to min. the effort in data type. you can create the similar/same sub structure into one data and each main data type will refer to sub data type.
for canonical data model refer the below thread
regards,
Harish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.