#1 2012-04-17 18:09:29

david_ubi
Member
Registered: 2012-03-30
Posts: 25

[resolved] problem to write xml for inherited class into MDMOUTPUT

Hello,
I have a problem with component TwriteXmlField
As you can see with attached picture, i have a property named AdresseSpecialisation , this property is an instance of Adresse.
For this field i would like to use inherited class AdresseGeocodee.
For xsi:type i give AdresseGeocodee but when i look xml in my datacontainer i get data as this :

Code:

<Adresse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <IdAdresse>67407c08-e930-4f84-9d57-0415a66db794</IdAdresse>
  <AdresseSpecialisation/>
</Adresse>

Code should be something like this :

Code:

<Adresse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<IdAdresse>67407c08-e930-4f84-9d57-0415a66db794</IdAdresse>
<AdresseSpecialisation xsi:type="AdresseGeocodee">
<AdresseNormalisee>dfsgsdfg</AdresseNormalisee>
<NumeroCourt>sdfg</NumeroCourt>
<NumeroLong/>
<VoieCourt/>
<VoieLong/>
<LocaliteCourt/>
<LocaliteLong/>
<SousLocaliteCourt/>
<SousLocaliteLong/>
<Niveau1Court/>
<Niveau2Court/>
<Niveau3Court/>
<Niveau1Long/>
<Niveau2Long/>
<Niveau3Long/>
<PaysCourt/>
<PaysLong/>
<CodePostalCourt/>
<CodePostalLong/>
<ResultatPartiel/>
<Longitude/>
<Latitude/>
</AdresseSpecialisation>
</Adresse>

Pleaser , something i have an idea about it ?


Uploaded Images

Last edited by david_ubi (2012-04-17 18:12:16)

Offline

 

#2 2012-04-17 23:48:46

csonnefraud
Talend Team
Registered: 2007-11-15
Posts: 327
Website

Re: [resolved] problem to write xml for inherited class into MDMOUTPUT

Hi david_ubi,

Try to set the loop element at a lower level, under "AdresseSpecialisation" node (on "AdresseNormalisee", for instance).

Regards,

Cyril.

Last edited by csonnefraud (2012-04-17 23:51:05)

Offline

 

#3 2012-04-18 09:28:30

david_ubi
Member
Registered: 2012-03-30
Posts: 25

Re: [resolved] problem to write xml for inherited class into MDMOUTPUT

Hello Cyril,
Thanks for your help.
I have try to move loop element but i get always same result from this time.

Have a good day

Regards,

Last edited by david_ubi (2012-04-18 09:28:52)

Offline

 

#4 2012-04-18 09:38:58

csonnefraud
Talend Team
Registered: 2007-11-15
Posts: 327
Website

Re: [resolved] problem to write xml for inherited class into MDMOUTPUT

And don't forget to set the node "IdAdresse" in the "Group By" list, in the advanced parameters tab.

Regards,

Cyril.

Offline

 

#5 2012-04-18 10:14:04

david_ubi
Member
Registered: 2012-03-30
Posts: 25

Re: [resolved] problem to write xml for inherited class into MDMOUTPUT

I have not IdAdresse in the group by list because it's a key generated by MDM, but i have try to use "group by" with AdresseNormalisee.
I get always the same thing. I have look a job related to this work and it's have not a group by inside, and i don't see difference with my job.

Regards,

Offline

 

#6 2012-04-18 14:41:09

david_ubi
Member
Registered: 2012-03-30
Posts: 25

Re: [resolved] problem to write xml for inherited class into MDMOUTPUT

I have try to replace tMDMOutput with tMDMBulkLoad and i get this error :

Code:

java.lang.RuntimeException: com.amalto.core.util.XtentisException: com.amalto.xmlserver.interfaces.XmlServerException: java.lang.RuntimeException: javax.xml.stream.XMLStreamException: java.lang.RuntimeException: Could not find namespace with prefix 'xsi' in current context

I look doesn't understand my xsi :
xsi:type=AdresseGeocodee

have you an idea?

Thanks

Offline

 

#7 2012-04-18 14:59:40

david_ubi
Member
Registered: 2012-03-30
Posts: 25

Re: [resolved] problem to write xml for inherited class into MDMOUTPUT

After all, I found a solution with tMDMBulkload, i checked checkbox "generated ID" on this component and it works.
Just a thing, I have removed my xml field IdAdress else i get an another IdAdresse field.
The first IdAdresse with a number and an other with nothing.


Regards

Offline

 

Board footer

Powered by FluxBB