Hi All,
I am currently trying to get works to post to ORCID Records in the Sandbox in v2.1.
An example of our generated XML is attached, and this validates against the XML Schema’s locally.
Posting to:
https://api.sandbox.orcid.org/v2.1/0000-0001-5035-2168/work
Headers:
Content-Type: application/vnd.orcid+xml; qs=5;charset=UTF-8
Authorization: Bearer <access_token>
This gives a 400 Response with the message ‘Bad Request’. The API Errors Codes document (https://members.orcid.org/api/resources/error-codes) says “Check XML headers”.
I’m unclear what this means, given I’ve got XML that validates.
Any help would be appreciated.
Thanks
ADM
Andrew Devenish-Meares
orcid.org/0000-0003-1436-895X
Solutions Analyst/Programmer
Administrative Applications, Information Services
Information Technology Directorate
University of New England
Armidale NSW 2351 Australia
Phone 61 2 6773 4098
Skype For Business
adev...@une.edu.au
Email adev...@une.edu.au
University of New England CRICOS Provider Number 00003G
--
You received this message because you are subscribed to the Google Groups "ORCID API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-users+unsubscribe@googlegroups.com.
To post to this group, send email to orcid-api-users@googlegroups.com.
Visit this group at https://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/d/optout.
Hi Rob,
I’d need to change all the relivent schema files and reload, so it validates, which is rather a lot of work.
Changing the endpoint version to v2.0 gives the same result, however.
ADM
--
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-use...@googlegroups.com.
To post to this group, send email to orcid-a...@googlegroups.com.
--
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-users+unsubscribe@googlegroups.com.
To post to this group, send email to orcid-api-users@googlegroups.com.
Visit this group at https://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ORCID API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-users+unsubscribe@googlegroups.com.
To post to this group, send email to orcid-api-users@googlegroups.com.
Visit this group at https://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/d/optout.
---------- Forwarded message ----------
From: "Peters, Robert" <r.pe...@orcid.org>
Date: Jan 7, 2018 7:33 PM
Subject: Re: [ORCID API] 400 Bad Request Help
To: "Andrew Devenish-Meares" <adev...@une.edu.au>
Cc:
Hi Andrew,Looks like you have a UTF-8 encoding issue. That would match our servers complaining about the xml header which is `<?xml version="1.0" encoding="UTF-8"?>`. Image of my text editor complaining when I open the file:After saving as UTF-8 and doing a diff:
58c58
< <work:credit-name>Andrew F?Zull</work:credit-name>
---
> <work:credit-name>Andrew FZull</work:credit-name>
66c66
< <work:credit-name>R A?Lawes</work:credit-name>
---
> <work:credit-name>R ALawes</work:credit-name>
73c73
< <work:credit-name>Oscar J?Cacho</work:credit-name>
---
> <work:credit-name>Oscar JCacho</work:credit-name>
Look for bad hidden characters at those locations. See https://stackoverflow.com/questions/115210/how-to-check-whether-a-file-is-valid-utf-8 about checking validity.
Cheers,
Rob
Robert PetersTimezone: PST
Key for OpenPGP email communication:
https://keys.mailvelope.com/pks/lookup?op=get&search=0x1519F37D99E18378
--
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-users+unsubscribe@googlegroups.com.
To post to this group, send email to orcid-api-users@googlegroups.com.
Visit this group at https://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/d/optout.
Hi Will and Rob,
Bad characters are sorted, it seems. I wasn’t expecting a message body with more detail… didn’t see it in the documentation. That helps.
All good, will check out the Scopus EID bit… Needs some more work in the XSL there.
Thanks
ADM
More details
--
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-use...@googlegroups.com.
To post to this group, send email to orcid-a...@googlegroups.com.
Visit this group at https://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/d/optout.
--
Will Simpson
Tech Lead, ORCID
PGP/GPG/OpenGPG key: https://keys.mailvelope.com/pks/lookup?op=get&search=0xDB70FC8C8F326A95
--
You received this message because you are subscribed to the Google Groups "ORCID API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
orcid-api-use...@googlegroups.com.
To post to this group, send email to
orcid-a...@googlegroups.com.
Thanks for the help, this now appears to be working. Turns out this is test data in the development system, and doesn’t exist in production. Should it make it that far, at least it will be handled.
More details
--
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-users+unsubscribe@googlegroups.com.
To post to this group, send email to orcid-api-users@googlegroups.com.
Visit this group at https://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/d/optout.
--
Will Simpson
Tech Lead, ORCID
PGP/GPG/OpenGPG key: https://keys.mailvelope.com/pks/lookup?op=get&search=0xDB70FC8C8F326A95
--
You received this message because you are subscribed to the Google Groups "ORCID API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-users+unsubscribe@googlegroups.com.
To post to this group, send email to orcid-api-users@googlegroups.com.
Visit this group at https://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "ORCID API Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to orcid-api-users+unsubscribe@googlegroups.com.
To post to this group, send email to orcid-api-users@googlegroups.com.
Visit this group at https://groups.google.com/group/orcid-api-users.
For more options, visit https://groups.google.com/d/optout.