{"action":"opened","issue":{"url":"https://api.github.com/repos/MPDL-Collections/DOI/issues/3","repository_url":"https://api.github.com/repos/MPDL-Collections/DOI","labels_url":"https://api.github.com/repos/MPDL-Collections/DOI/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/MPDL-Collections/DOI/issues/3/comments","events_url":"https://api.github.com/repos/MPDL-Collections/DOI/issues/3/events","html_url":"https://github.com/MPDL-Collections/DOI/issues/3","id":156806817,"number":3,"title":" put /doi/{doi}: Value of DOI in metadata differs from DOI parameter","user":{"login":"ioverka","id":8920469,"avatar_url":"https://avatars.githubusercontent.com/u/8920469?v=3","gravatar_id":"","url":"https://api.github.com/users/ioverka","html_url":"https://github.com/ioverka","followers_url":"https://api.github.com/users/ioverka/followers","following_url":"https://api.github.com/users/ioverka/following{/other_user}","gists_url":"https://api.github.com/users/ioverka/gists{/gist_id}","starred_url":"https://api.github.com/users/ioverka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ioverka/subscriptions","organizations_url":"https://api.github.com/users/ioverka/orgs","repos_url":"https://api.github.com/users/ioverka/repos","events_url":"https://api.github.com/users/ioverka/events{/privacy}","received_events_url":"https://api.github.com/users/ioverka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-25T17:29:33Z","updated_at":"2016-05-25T17:29:33Z","closed_at":null,"body":"**input**:\r\n```\r\ndoi \t\t10.17617/1.19\r\nurl \t\thttp://www.mpg.de/10448336\r\nbody\t\t<?xml version='1.0' encoding='UTF-8'?>\r\n<resource xmlns='http://datacite.org/schema/kernel-3' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd'>\r\n<identifier identifierType='DOI'>10.17617/1.18</identifier>\r\n<creators>\r\n\t<creator>\r\n\t\t<creatorName>Wickström, Sara A.</creatorName>\r\n\t\t<affiliation>Max-Planck-Institut für Biologie des Alterns</affiliation>\r\n\t</creator>\r\n</creators>\r\n<titles>\r\n\t<title>Erforschung der Regulation adulter Stammzellen am Beispiel der Haut</title>\r\n</titles>\r\n<publisher>Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V.</publisher>\r\n<publicationYear>2016</publicationYear>\r\n<resourceType resourceTypeGeneral='Text'></resourceType>\r\n</resource>\r\n```\r\n\r\n**output**:\r\n```\r\ncurl -X PUT --header \"Content-Type: text/xml\" --header \"Accept: text/plain\" -d \"\r\n\r\n10.17617/1.18\r\n\r\n\t\tWickström, Sara A.\r\n\t\tMax-Planck-Institut für Biologie des Alterns\r\n\t\r\nMax-Planck-Gesellschaft zur Förderung der Wissenschaften e.V.\r\n2016\r\n\r\n\" \"https://doxi.mpdl.mpg.de/doxi/rest/doi/10.17617/1.19?url=http%3A%2F%2Fwww.mpg.de%2F10448336\"\r\n\r\nRequest URL\r\n\r\nhttps://doxi.mpdl.mpg.de/doxi/rest/doi/10.17617/1.19?url=http%3A%2F%2Fwww.mpg.de%2F10448336\r\n\r\nResponse Body\r\n\r\n10.17617/1.19\r\n\r\nResponse Code\r\n\r\n201\r\n\r\nResponse Headers\r\n\r\n{\r\n  \"date\": \"Wed, 25 May 2016 14:41:32 GMT\",\r\n  \"server\": \"Apache-Coyote/1.1\",\r\n  \"content-type\": \"text/plain\",\r\n  \"content-length\": \"13\",\r\n  \"strict-transport-security\": \"max-age=15768000\",\r\n  \"keep-alive\": \"timeout=15, max=100\",\r\n  \"connection\": \"Keep-Alive\"\r\n}\r\n```\r\n\r\nAfterwards, I expected that the metadata including the \"wrong\" DOI has been pushed to DataCite and tried to correct it via following post request:\r\n\r\n**input**:\r\n```\r\ndoi \t\t10.17617/1.19\r\nurl \t\thttp://www.mpg.de/10448336\r\nbody\t\t<?xml version='1.0' encoding='UTF-8'?>\r\n<resource xmlns='http://datacite.org/schema/kernel-3' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd'>\r\n<identifier identifierType='DOI'>10.17617/1.19</identifier>\r\n<creators>\r\n\t<creator>\r\n\t\t<creatorName>Wickström, Sara A.</creatorName>\r\n\t\t<affiliation>Max-Planck-Institut für Biologie des Alterns</affiliation>\r\n\t</creator>\r\n</creators>\r\n<titles>\r\n\t<title>Erforschung der Regulation adulter Stammzellen am Beispiel der Haut</title>\r\n</titles>\r\n<publisher>Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V.</publisher>\r\n<publicationYear>2016</publicationYear>\r\n<resourceType resourceTypeGeneral='Text'></resourceType>\r\n</resource>General='Text'></resourceType>\r\n</resource>\r\n```\r\n\r\n**output**:\r\n```\r\ncurl -X POST --header \"Content-Type: text/xml\" --header \"Accept: application/xml\" -d \"\r\n\r\n10.17617/1.19\r\n\r\n\t\tWickström, Sara A.\r\n\t\tMax-Planck-Institut für Biologie des Alterns\r\n\r\nMax-Planck-Gesellschaft zur Förderung der Wissenschaften e.V.\r\n2016\r\n\r\nGeneral='Text'>\r\n\" \"https://doxi.mpdl.mpg.de/doxi/rest/doi/10.17617/1.19?url=http%3A%2F%2Fwww.mpg.de%2F10448336\"\r\n\r\nRequest URL\r\n\r\nhttps://doxi.mpdl.mpg.de/doxi/rest/doi/10.17617/1.19?url=http%3A%2F%2Fwww.mpg.de%2F10448336\r\n\r\nResponse Body\r\n\r\nProblem replacing DOI in metadata\r\n\r\nResponse Code\r\n\r\n400\r\n\r\nResponse Headers\r\n\r\n{\r\n  \"date\": \"Wed, 25 May 2016 17:21:39 GMT\",\r\n  \"server\": \"Apache-Coyote/1.1\",\r\n  \"content-type\": \"application/xml\",\r\n  \"content-length\": \"33\",\r\n  \"strict-transport-security\": \"max-age=15768000\",\r\n  \"connection\": \"close\"\r\n}\r\n```\r\n\r\nThe metadata record at DataCite for 10.17617/1.19 looks fine:\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n\r\n<resource xmlns=\"http://datacite.org/schema/kernel-3\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://datacite.org/schema/kernel-3 http://schema.datacite.org/meta/kernel-3/metadata.xsd\">  \r\n  <identifier identifierType=\"DOI\">10.17617/1.19</identifier>  \r\n  <creators> \r\n    <creator> \r\n      <creatorName>Wickström, Sara A.</creatorName>  \r\n      <affiliation>Max-Planck-Institut für Biologie des Alterns</affiliation> \r\n    </creator> \r\n  </creators>  \r\n  <titles> \r\n    <title>Erforschung der Regulation adulter Stammzellen am Beispiel der Haut</title> \r\n  </titles>  \r\n  <publisher>Max-Planck-Gesellschaft zur Förderung der Wissenschaften e.V.</publisher>  \r\n  <publicationYear>2016</publicationYear>  \r\n  <resourceType resourceTypeGeneral=\"Text\"/> \r\n</resource>\r\n```\r\n\r\n'''Questions and issues''':\r\n* Maybe it would be better to throw an error if the DOI values differ (simply because this would be more transparent - and avoid users from trying to correct something)\r\n* Why has the post failed? I double checked it and haven't found any spare white spaces...\r\n"}}
{"actor":{"display_login":"ioverka"}}