on 10-28-2005 2:50 PM
Hi,
I want to convert a csv-file that has follow structure as textfile:
field1,field2,field3
in a xml-file.
I also have created a mapping, so I get a mapping error when i want to convert the txt-file to xml
In the message monitoring the generated xml-file has follow structure:
<ns:target>
<Recordset>
<source>
<source_value_1>Source_value_1</source_value_1>
<source_value_2>source_value_2</source_value_2>
<source_value_3>source_value_3</source_value_3>
</source>
</Recordset>
</ns:target>
and the xsd has follow structure:
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="source">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="source_value_1" minOccurs="0"/>
<xs:element name="source_value_2" minOccurs="0"/>
<xs:element name="source_value_3" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
So I get an error that there is a conflict in the namespace.
Can ynybody help me please.
Thanks
Regards
Stefan
Hi Stefan -
In your Sender File adapter configuration in the Int. Directory, within section Content Conversion parameters,
there's are parameters called Document Name and Document Namespace. You should put in the corresponding values for the Message Type and the Namespace the Message Type belongs to that you defined in the Int. Repository.
Incidentally, within your test environment of your Message Mapping, if you click on the button "Generate Instance", it will give you an empty instance with the correct namespace of the message the mapping is expecting.
Regards,
Jin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
my problem is that the xsd-file that I have created with xml spy has a namespace with "xs".
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
and the xml-file that is generated wiht XI has a namespace with "ns":
<ns:schema xmlns:ns="http://www.im-c.de/test_01">
So, how can I solve this problem?
Thanks for your help.
Regards
Stefan
Hi Stefan,
I do not think that your problem is the difference between xs and ns.
Indeed <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" >
and
<ns:schema xmlns:ns="http://www.w3.org/2001/XMLSchema" >
are logically equivalent.
Also
<ns:schema xmlns:ns="http://www.im-c.de/test_01">
and
<xs:schema xmlns:xs="http://www.im-c.de/test_01">
are logically equivalent.
The problem is rather that in the first case the schema element belongs to the namespace
http://www.w3.org/2001/XMLSchema
whereas in the second case it belongs to the namespace
It is not clear to me how the second element was exactly produced but to me this seems not to make sense.
Greetings
Stephan
Hi Stefan,
Usually, the XSD needs a target namespace which you define in the XI Integration Repository for the File's Data Type.
For example, after the <?xml version="1.0" encoding="UTF-8" ?>, this line should exist:
<xsd:schema targetNamespace="urn://xitest:stefan" xmlns="urn://xitest:stefan" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
Regards,
Bhanu
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
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.