[XML Records] Version 9 error

[XML Records] Version 9 error

  
Forge Component
(24)
Published on 15 Jun by Ricardo Silva
24 votes
Published on 15 Jun by Ricardo Silva
Hi,

not sure if im the only one getting this, but there seems to be an error when im using this component in version 9. Would it be possible to update this component?

Thanks,
Ron
while testing in version 9, i also noticed that it can't read recordlist inside a recordlist. it can only read flat records.
@Ron: This has, afaik, always been the case?
@kilian : In version 8, this component works fine, but when upgraded our platform server to version 9 and republished everything, the component is not working like it used to work.

it can't convert an xml with a repeating record. It accepts a recordlist but i think during the parse, it fails to read and convert to a recordlist.


@Ron: There are some changes to the way record lists are treated is changed in 9. This could indeed be the problem.
There was a significant overhaul of the type system and how records and record lists are generated in version 9, which caused some of the reflection code to not work correctly.

Version 1.5.6 should allow you to keep using old-style records and record lists with XML Records (this version is backwards compatible with version 7.0+). I have done only a very superficial test with an API I was using which used XML, but it seems to be working correctly.

Kudos to Hugo Lourenço for the help with this.

We are working on a version supporting all the new types in version 9.

Thanks for the update guys. this works fine now. thank you very much. 
Hi Ron,
Can u give code snippet of the problem you have encountered and how you have solved the problem.It will be great help to the ppl who are trying to migrate to outsystem9
Hello,

The only change that was made to support version 9 of the OutSystems Platform was changing the way the Record Lists are detected from checking the base class to checking if it's assignable from. This is rather low level and has nothing to do with the high level OutSystems Platform code.

If you are having problems in the OutSystems Platform 9 with XML Records, I urge you to update to the latest version which should fix your problems. If it doesn't fix them right away, it's likely that an older version of the DLL is being used instead. In that case you should republish a solution with your eSpace to correct the misbehavior.

Best regards,
Ricardo Silva
Hello ,
Im facing the same problem what Ron Grajo has faced some time before.Can anyone had a solution for this.
The repeating records is not working in outsystem9.
For eg this is my sample oml file which i'm working on it
<?xml version="1.0" encoding="utf-8" ?>
<RESPONSE>
<KEY _Name="ExperianFairIsaac_MinimumValue" _Value="320" />
<KEY _Name="ExperianFairIsaac_MaximumValue" _Value="844" />
<KEY _Name="CreditScoreRankPercent_CreditResponse1_CreditScore13" _Value="57" />
<KEY _Name="FICORiskScoreClassic98_MinimumValue" _Value="336" />
</RESPONSE>
I'm getting the same value for everyting like
<KEY _Name="ExperianFairIsaac_MinimumValue" _Value="320" />
<KEY _Name="ExperianFairIsaac_MinimumValue" _Value="320" />
<KEY _Name="ExperianFairIsaac_MinimumValue" _Value="320" />
<KEY _Name="ExperianFairIsaac_MinimumValue" _Value="320" />
So how to get different values in one record in outsystem9.
Please find my OML file in the attachment.
Regards,
ChandrasekarRadhakrishnan
Hi,
Please find my screenshot in the attachment,I have explained what i said in my previous comment.
Regards,
ChandrasekarRadhakrishnan
Hi Chandrasekar,

Not sure if that is the cause, but you are setting the configuration settings on the wrong variable than the one that you are appending to the list.




You should rename the XmlConfig and AttributeXmlConfig to something else (like "XmlConfigRecord") to avoid confusion.

Also they don't need to be RecordLists since you are only using them to insert into the other Recordlist. So change their type to "Record" instead.

Check if that solves your problem.
If not, is the size of the results always correct? Or does it keeps increasing every time you click the button?

Regards,
João Rosado
Hi Rosado,
Thanks for replying.The XMLCONFIG RECORD comes for storing the master or chid node in this case if you see in the structure KEY is the master node.You are saying to use RECORD  instead of RECORDLIST i have tried that aslo getting same results.I have attached my new OML file which i have modified.
Regards,
ChandrasekarRadhakrishnan
Hi Chandrasekar,

After publishing your example and doing a bit of debugging I found that the reason it was not working was because since your atribute of RESPONSE is named KEY and it found an element in the xml named KEY it assumed it was a single record.

Just renaming your KEY attribute to anything else will make your example work.


Here is the page rendered (I added a tablerecords to show all the records since you only had a show records)



Regards,
João Rosado
Hi Rosado,
Thank you very much but i tried by changing the attribute to KEYS but still i'm getting the same value.
If you dont mind can you send me the OML file of yours.
Regards,
ChandrasekarRadhakrishnan
Sure...but I'm not near a pc right now (just on my mobile ;) ) , so it ill take about an hour, sorry.

But I'm pretty sure I only changed that name and the show recors to a table records.
Table records source record should be something like RESPONSE_GROUP.Current.RESPONSE.Keys
(Sorry If I got that expression a bit different, writting it by memory)

Regards,
João Rosado
Hi again,

Here is the oml as promissed.
Tell me if it also works for you.

Regards,
João Rosado
Thank you very much Joao.....

Hello Joao,
This is the file i'm working on .I'm getting almost all the data's but there are some few structures i can't able to get multiple values.
Could you just check if you have time.I will list which structure you have to see.
1.Borrower
2.Creditor
3.CurrentRating
4.Paymnet Pattern.
For your reference i'm adding the OML file.
Regards,
ChandrasekarRadhakrishnan
Hi Chandrasekar,

Can you post an example of the XML?
:/ can't really help you fix your structures without knowing how to test it.
Hi Joao,
Please find the  XML file in the attachment.
Regards,
ChandrasekarRadhakrishnan
Hi,
Is it Possible to save data from structure to entity.
Regards,
ChandrasekarRadhakrishnan
Hi Joao Rosado,
I'm facing some issues when posting the data i need some desperate help.
Right now i want to post one request xml file to the third party through outsystems.
1.First i have used BinaryData ToText extension for importing the xml file.
2.Then i have assigned the xml file to a local variable X.
3.Then i have passed that variable to HTTPGET EXTENSION which should received response from the third party but i'm not getting the result.I have attached my OML file for reference.Can anyone see my oml file so that i can modify the mistakes which i have done.
Regards,
ChandrasekarRadhakrishnan
Hi ,
I'm facing some issues when posting the data i need some desperate help.
Right now i want to post one request xml file to the third party through outsystems.
1.First i have used BinaryData ToText extension for importing the xml file.
2.Then i have assigned the xml file to a local variable X.
3.Then i have passed that variable to HTTPGET EXTENSION which should received response from the third party but i'm not getting the result.I have attached my OML file for reference.Can anyone see my oml file so that i can modify the mistakes which i have done.
Regards,
ChandrasekarRadhakrishnan
Hi Chandrasekar,

Can you post an example of the XML?
:/ can't really help you fix your structures without knowing how to test it.
 
 
Hi Chandrasekar,

I looked at your eSpace, but I don't get what you are trying to do with that X variable ..it's not being used anywhere after being set.
If you need to post the xml to that third party you the HttpGet action will not do what you need.

You should try the ardohttp
forge component do do a HttpPost instead.

Regards,
João Rosado
Thank you very much Joao its working
Hi Joao,
I'm facing an issue i want to send one request file to the third party dynamically which sends every information,So that i can save in my OS database.
for eg if i click my record i should get each and every information.So can you give me a sample of how to post request xml file dynamically.
 I have attached my OML file for reference
Regards,
ChandrasekarRadhakrishnan
Hi Chandrasekar,

I looked at your eSpace, but I don't get what you are trying to do with that X variable ..it's not being used anywhere after being set.
If you need to post the xml to that third party you the HttpGet action will not do what you need.

You should try the ardohttp
forge component do do a HttpPost instead.

Regards,
João Rosado
 
 
Hi Killan,
I had a doubt for eg this is my xml file
<xml>
<borrower>
name='carlos'
borrower=borrower1
</borrower>
</xml>
now for the same xml file is need to pass 'sarah' in the plcae of name .So my question how to replace an attribute can you give me a saple eg of it.
Regards,
ChandrasekarRadhakrishnan

@Ron: There are some changes to the way record lists are treated is changed in 9. This could indeed be the problem.
 
 
Hi Chandrasekar,

If that is really your XML-file, then that's not valid XML. You have what seems attribute assignments outside the XML tags.
Hi Joao,
How do i create one request file dynamically .I have attached my request file can you change it dynamically.
Regards,
ChandrasekarRadhakrishnan

After publishing your example and doing a bit of debugging I found that the reason it was not working was because since your atribute of RESPONSE is named KEY and it found an element in the xml named KEY it assumed it was a single record.

Just renaming your KEY attribute to anything else will make your example work.


Here is the page rendered (I added a tablerecords to show all the records since you only had a show records)



Regards,
João Rosado