Issue with xml datasource
Hi Team,
I have a issue with loading of data from xml source to data base
sample of the xml file:
<?xml version="1.0" encoding="utf-8"?>
<fx:enrolment fx:date="2010-09-08T20:44:45.2570661Z" xmlns:fx="http://schemas.flexfinancialsolutions.com/enrolment">
<fx:account>5749</fx:account>
<fx:context>
<fx:tpa fx:id="1116" fx:name="fds">
<fx:affinity fx:id="1418" fx:name="sfsfdsfsd" />
</fx:tpa>
<fx:product fx:name="G4 D&D">
<fx:plan fx:id="1433" fx:name="D Plan">
<fx:policyNo>G693</fx:policyNo>
</fx:plan>
</fx:product>
</fx:context>
<fx:evidence>
got an error:
XML Soure Adapter does not support....
Please advice me some solution!!
Thanks,
Eshwar
October 28th, 2010 7:22am
did you set XSD correctly?http://www.rad.pasfu.com
Free Windows Admin Tool Kit Click here and download it now
October 28th, 2010 8:53am
Hi Eshwar,
Add to Reza's response, the XML sample is incompeleted. Could you please post the full XML file? Also, please post the full, detailed error message.
Thanks,
Jin Chen
Jin Chen - MSFT
November 1st, 2010 5:26am
Hi Reza,
Thanks a lot here is my code can you please let me if it is complete or we need request something else
<?xml version="1.0" encoding="utf-8" ?>
- <fx:enrolment fx:date="2010-09-08T20:44:45.2570661Z" xmlns:fx="http://schemas.flexfinancialsolutions.com/enrolment">
<fx:account>5749</fx:account>
- <fx:context>
- <fx:tpa fx:id="1116" fx:name="Services">
<fx:affinity fx:id="1418" fx:name="logistics" />
</fx:tpa>
- <fx:product fx:name=" AD&D">
- <fx:plan fx:id="1433" fx:name="Default Plan">
<fx:policynumber>1A938</fx:policynumber>
</fx:plan>
</fx:product>
</fx:context>
- <fx:evidence>
- <fx:knownfield fx:flexid="1166" fx:name="productURL">
- <fx:value>
- <![CDATA[
http://acoginsuranceaddzztest-affinity.flextestregion.com:80/products/accidental-death-and-dismemberment.aspx
]]>
</fx:value>
</fx:knownfield>
- <fx:field fx:flexid="14679" fx:name="Applicant First Name">
<fx:knownfield fx:flexid="128" fx:name="firstName" fx:datatype="String" />
- <fx:value>
- <![CDATA[
Mary
]]>
</fx:value>
</fx:field>
- <fx:field fx:flexid="14681" fx:name="Applicant Last Name">
<fx:knownfield fx:flexid="296" fx:name="lastName" fx:datatype="String" />
- <fx:value>
- <![CDATA[
Jones
]]>
</fx:value>
</fx:field>
- <fx:field fx:flexid="14682" fx:name="Member ID">
- <fx:value>
- <![CDATA[
98765466666
]]>
</fx:value>
</fx:field>
- <fx:field fx:flexid="14683" fx:name="Address">
<fx:knownfield fx:flexid="300" fx:name="streetAddress" fx:datatype="String" />
- <fx:value>
- <![CDATA[
123 Any Street
]]>
</fx:value>
</fx:field>
- <fx:field fx:flexid="14684" fx:name="City">
<fx:knownfield fx:flexid="139" fx:name="city" fx:datatype="String" />
- <fx:value>
- <![CDATA[
Test City
]]>
</fx:value>
</fx:field>
- <fx:field fx:flexid="14685" fx:name="State">
<fx:knownfield fx:flexid="134" fx:name="addressstate" fx:datatype="String" />
- <fx:value>
- <![CDATA[
AR
]]>
</fx:value>
</fx:field>
- <fx:field fx:flexid="14686" fx:name="Zip">
<fx:knownfield fx:flexid="135" fx:name="zipCode" fx:datatype="String" />
- <fx:value>
- <![CDATA[
12345
]]>
</fx:value>
</fx:field>
- <fx:field fx:flexid="14690" fx:name="Applicant Date of Birth">
<fx:knownfield fx:flexid="141" fx:name="dateOfBirth" fx:datatype="DateTime" />
- <fx:value>
<fx:datetime>1951-11-20T00:00:00.0000000</fx:datetime>
</fx:value>
</fx:field>
- <fx:field fx:flexid="14691" fx:name="Applicant Gender">
<fx:knownfield fx:flexid="142" fx:name="gender" fx:datatype="String" />
- <fx:value>
- <fx:choice>
<fx:group fx:flexid="3" fx:name="gender" fx:label="Gender" />
<fx:selection fx:flexid="12" fx:value="f" fx:label="Female" />
</fx:choice>
- <![CDATA[
12
]]>
</fx:value>
</fx:field>
- <fx:field fx:flexid="14692" fx:name="Daytime Phone No.">
<fx:knownfield fx:flexid="299" fx:name="daytimeTel" fx:datatype="String" />
- <fx:value>
- <![CDATA[
987-654-3210
]]>
</fx:value>
</fx:field>
- <fx:field fx:flexid="14693" fx:name="E-mail address">
<fx:knownfield fx:flexid="143" fx:name="email" fx:datatype="String" />
- <fx:value>
- <![CDATA[mj@email.com ]]>
</fx:value>
</fx:field>
</fx:knownfield>
</fx:evidence>
</fx:enrolment>
Error:
The XML adapter does not support mixed content model of complex types.
Thanks,
Eshwar.
Free Windows Admin Tool Kit Click here and download it now
November 3rd, 2010 2:59am
Hi Eshwar,
Since the "Value" element contains both text and other elements(as below), it will be considered as Complext Type with Mixed Content. XML Source in SQL Server Integration Services(SSIS) doesn't support complex type wity mixed content by design. That is why
the issue occurs.
<fx:choice>
<fx:group fx:flexid="3" fx:name="gender" fx:label="Gender" />
<fx:selection fx:flexid="12" fx:value="f" fx:label="Female" />
</fx:choice>
12
To fix the issue, we need to modify the XML to avoid complex type with mixed content enabled in the XML file.
For more information, please see:
Complex Types with Mixed Content:
http://www.w3schools.com/schema/schema_complex_mixed.asp
Thanks,
Jin Chen
Jin Chen - MSFT
November 3rd, 2010 3:29am
can you give me an example how to modify this?
can you rewrite code you wrote to the complitible form?
Thanks a lot
Eshwar.
Free Windows Admin Tool Kit Click here and download it now
November 3rd, 2010 3:47am