Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when post one xml file with multiple objects in #524

Open
mkhachfeh opened this issue Feb 9, 2019 · 1 comment
Open

Error when post one xml file with multiple objects in #524

mkhachfeh opened this issue Feb 9, 2019 · 1 comment

Comments

@mkhachfeh
Copy link

Hello All,

Kindly I am using RIPE REST API to communicate with RIPE DB via Python Script, I can read from without a problem, but have a problem while POST multiple objects within whois-resources (1 XML file).

Example of XML file I am posting to RIPE TEST DB:
<whois-resources> <objects> <object type="route"> <attributes> <attribute name="route" value="62.62.100.0/24" /> <attribute name="descr" value="TEST1" /> <attribute name="origin" value="AS102" /> <attribute name="mnt-by" value="TEST-DBM-MNT" /> <attribute name="source" value="TEST" /> </attributes> </object> <object type="route"> <attributes> <attribute name="route" value="92.92.100.0/24" /> <attribute name="descr" value="TEST2" /> <attribute name="origin" value="AS102" /> <attribute name="mnt-by" value="TEST-DBM-MNT" /> <attribute name="source" value="TEST" /> </attributes> </object> </objects> </whois-resources>

And error I am receiving is:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><whois-resources xmlns:xlink="http://www.w3.org/1999/xlink"><link xlink:type="locator" xlink:href="http://rest-test.db.ripe.net/TEST/route"/><errormessages><errormessage severity="Error" text="Single object expected in WhoisResources (found %d)"><args value="2"/></errormessage></errormessages><terms-and-conditions xlink:type="locator" xlink:href="http://www.ripe.net/db/support/db-terms-conditions.pdf"/></whois-resources>
Any advice why I have this problem? for me it is not logic.

And in case within whois-resources I can create only one object, how can I create multiple objects within 1 XML file?

Thanks in advance,
Mou

@mkhachfeh
Copy link
Author

XML input.txt

Format maybe not clear enough, here is the XML input file I am trying to POST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant