Depositing DOI registration xml using https POST

Hi support,

I am a service provider to publishers in Germany, supporting them in metadata creation and distribution.

Currently I am trying to post files using the https POST method for user “woch” in publisher
group " Wochenschau Verlag Dr. Kurt Debus GmbH".
I am posting to https://0-doi-crossref-org.lib.rivier.edu/servlet/deposit for user “woch” (login_id) with its PW (login_password)
The credentials work well when signing in to the admin pages.
The POST does not create an error but the file is never added to the submissions and I receive the following html as a response (removed some empty lines):

<!-- 

<br>
<font size=+1>

Welcome to Crossref.

</font>
<br><br>

<div id="browser-warning"></div>
<!--[if lt IE 9]>
    <style type="text/css">
        #browser-warning {
            display: none;
            background-color: #fde394;
            padding: 20px;
            max-width: 950px;
        }
        #browser-warning td.image {
        }
        #browser-warning img {
            max-height: 50px;
        }
        #browser-warning td.text {
            padding-left: 20px;
            padding-right: 20px;
            color: #4f5858;
            font-family: 'Open Sans', sans-serif;
            font-weight: bold;
        }
        #browser-warning .button {
            background-color: #3eb1c8;
            padding: 10px;
            text-decoration: none;
            border-radius: 4px;
            border: 0;
            color: #fefbef;
            font-family: 'Open Sans', sans-serif;
            font-weight: bold;
            line-height: 1;
            white-space: nowrap;
        }
    </style>
<table id="browser-warning-banner">
        <tr>
            <td class="image"><img src="/images/exclamation-triangle.gif"/></td>
            <td class="text"><span>Upgrade browser for full Crossref experience. It looks like you may be using an outdated web browser. Please update your browser for the best possible experience.</span></td>
            <td><a class="button" href="/supported-browsers.html" target="_blank" rel="noopener noreferrer">Supported Browsers</a></td>
        </tr>
    </table>
<![endif]--><!--
<br/>


<table border="0" cellpadding="0" cellspacing="0"><tr>

<td nowrap width="8" valign="top" class="tabSelected"><img src="/images/clips/top_left.gif" width="8" height="8" alt=""></td>
<td nowrap class="tabSelected"><a href="/servlet/useragent" title="" class="tabSelected">&nbsp;&nbsp;<b>Home</b>&nbsp;&nbsp;</a></td>
<td nowrap width="8" valign="top" class="tabSelected"><img src="/images/clips/top_right.gif" width="8" height="8" alt=""></td>

<td nowrap width="8" valign="top" class="tabNotAllowed"><img src="/images/clips/top_left.gif" width="8" height="8" alt=""></td>
<td nowrap class="tabNotAllowed"><a href="javascript:alert('You do not have permissions to access this function.')" title="Users: Not Accessible" class="tabNotAllowed">&nbsp;&nbsp;Users&nbsp;&nbsp;</a></td>
<td nowrap width="8" valign="top" class="tabNotAllowed"><img src="/images/clips/top_right.gif" width="8" height="8" alt=""></td>

<td nowrap width="8" valign="top" class="tabNotAllowed"><img src="/images/clips/top_left.gif" width="8" height="8" alt=""></td>
<td nowrap class="tabNotAllowed"><a href="javascript:alert('You do not have permissions to access this function.')" title="Submissions: Not Accessible" class="tabNotAllowed">&nbsp;&nbsp;Submissions&nbsp;&nbsp;</a></td>
<td nowrap width="8" valign="top" class="tabNotAllowed"><img src="/images/clips/top_right.gif" width="8" height="8" alt=""></td>

<td nowrap width="8" valign="top" class="tabNotAllowed"><img src="/images/clips/top_left.gif" width="8" height="8" alt=""></td>
<td nowrap class="tabNotAllowed"><a href="javascript:alert('You do not have permissions to access this function.')" title="Queries: Not Accessible" class="tabNotAllowed">&nbsp;&nbsp;Queries&nbsp;&nbsp;</a></td>
<td nowrap width="8" valign="top" class="tabNotAllowed"><img src="/images/clips/top_right.gif" width="8" height="8" alt=""></td>

<td nowrap width="8" valign="top" class="tabNotAllowed"><img src="/images/clips/top_left.gif" width="8" height="8" alt=""></td>
<td nowrap class="tabNotAllowed"><a href="javascript:alert('You do not have permissions to access this function.')" title="Reports: Not Accessible" class="tabNotAllowed">&nbsp;&nbsp;Reports&nbsp;&nbsp;</a></td>
<td nowrap width="8" valign="top" class="tabNotAllowed"><img src="/images/clips/top_right.gif" width="8" height="8" alt=""></td>

<td nowrap width="8" valign="top" class="tabNotAllowed"><img src="/images/clips/top_left.gif" width="8" height="8" alt=""></td>
<td nowrap class="tabNotAllowed"><a href="javascript:alert('You do not have permissions to access this function.')" title="Metadata Admin: Not Accessible" class="tabNotAllowed">&nbsp;&nbsp;Metadata Admin&nbsp;&nbsp;</a></td>
<td nowrap width="8" valign="top" class="tabNotAllowed"><img src="/images/clips/top_right.gif" width="8" height="8" alt=""></td>

</tr></table>

<table border="0" cellpadding="10" cellspacing="0" width="100%">
<tr><td width="100%" class="tabContent1">
<br>



-->




<!DOCTYPE html>
<html>
<head>
    <link rel=stylesheet href="https://0-test-crossref-org.lib.rivier.edu/css/tab.css" title="tab css">
    <link rel=stylesheet href="https://cdn.production.dcbridgecrossref.org/frontend/crossref-ui/2.1.1/crossref-ui.css" title="tab css">
    <link rel="shortcut icon" href="https://0-test-crossref-org.lib.rivier.edu/favicon.ico">
	<link href="https://cdn.jsdelivr.net/npm/@mdi/font@4.x/css/materialdesignicons.min.css" rel="stylesheet">
	<meta name="viewport" content="width=device-width, initial-scale=1, minimal-ui">
</head>
<!-- Matomo -->
<script type="text/x-template" id="template">
    <login-screen/>
</script>
<div id="app"></div>
<script type="text/javascript" src="https://cdn.production.dcbridgecrossref.org/frontend/crossref-ui/2.1.1/crossref-ui.umd.min.js"></script>
<script type="text/javascript">
var _paq = window._paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(["setDocumentTitle", document.domain + "/" + document.title]);
_paq.push(["setCookieDomain", "*.apps.crossref.org"]);
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="https://crossref.matomo.cloud/";
_paq.push(['setTrackerUrl', u+'matomo.php']);
_paq.push(['setSiteId', '15']);
var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; s.parentNode.insertBefore(g,s);
})();
var parts = window.location.href.split("/");
var c = CrossrefUI.run({
  element: '#app',
  reset_password_url: 'https://0-authenticator-crossref-org.lib.rivier.edu/reset-password/',
  template: '#template',
  authApiBaseUrl: parts[0] + "//" + parts[2],
  apiPort: null,
  loginUrl: '/servlet/login',
  rolesUrl: '/servlet/login',
  authFieldSpec: {
    username: 'usr',
    password: 'pwd'
  },
  authPostDataFormat: 'formData',
  disableMirage: true
})
</script>
<noscript><p>![](upload://xspAPEnjaGTMynnpZt5IwvyRs90.gif)</p></noscript>
<!-- End Matomo Code -->
<body>
</body>
</html>

I used this upload method about 2 years ago already and with success.

What is wrong? Does the user needs an additional right to post via https post?
Am I using the wrong names or IDs?
I am available for live testing if need be, please feel free to mail to arrange a time.

Thanks
Herbert Barkmann
BARKMANN software & services

Hi Herbert,

We’ve had two other users report similar results fairly recently.

I’ve reported those to our technical team, and I’ll your example there as well. You can view the ticket to follow any progress there, and leave any additional comments there, if you create a gitlab account for yourself.

So far, the other two examples could be worked around by correcting specific issues with their usernames, but you seem to be using the correct username, in a format that should work.

Beyond that, we’re still not sure why the response to the query is the html source code for our login page, rather than a legible error message of some sort.

Apologies for the inconvenience.

I had a chat with Herbert,
In the end the variable names (login_id, login_password) were wrong,

They must be login_id and login_passwd although I recommended the more standard ones usr and pwd.

1 Like

My problems were as follows:
I use the OJS for the DOI and it works successfully.

  1. However, when I deposit the article, the status is “Not Deposit”, 401 unauthorized error".

  1. In the crossref, I cannot search for the doi I have created.

DOI: The Opinions and Perceptions of K1-3 Parents in Relation to BYOD Implementation in Japanese Kindergartens | International Journal of TESOL & Education

DOI: The Influence of Single-Clause Sentences on IELTS Writing Task 2 Band Score | International Journal of TESOL & Education

DOI: Navigating the Turbulent Time: A Qualitative Inquiry into Resilience among Vietnamese ESL Teachers during COVID-19 | International Journal of TESOL & Education

In this case, what should I do?

Please help me to clarify these things.

Thank you

Best regards and Merry Christmas!

Hi @phamvuphiho,

Thanks for your message, and welcome to the community forum.

All three of your DOI examples have been registered with us as you can see if you resolve the DOIs:

  1. https://0-doi-org.lib.rivier.edu/10.54855/ijte220201
  2. https://0-doi-org.lib.rivier.edu/10.54855/ijte2202012
  3. https://0-doi-org.lib.rivier.edu/10.54855/ijte2202013

The DOIs are also available in our APIs:
XML API: https://0-doi-crossref-org.lib.rivier.edu/search/doi?pid=support@crossref.org&format=unixsd&doi=10.54855%2Fijte220201

REST API: https://0-api-crossref-org.lib.rivier.edu/works/10.54855/ijte2202012?mailto=support@crossref.org

My best,
Isaac

Am getting the same results while posting the data via HTTP post. Anyone, please help me how to resolve this issue.

Hi @sreekarthik,

Can I ask for your username please and any further information on the errors you are getting and even the code you are sending to us (with passwords removed).

Thanks,
Paul

Am getting the below message

![](upload://xspAPEnjaGTMynnpZt5IwvyRs90.gif)

, success=1, statusCode=200}
responseString:::

![](upload://xspAPEnjaGTMynnpZt5IwvyRs90.gif)

And my user name is : srini@newgen.co

my http post code:
try {

		post = new org.apache.http.client.methods.HttpPost(
				eachSpub.get("host") + "?operation=doDOICitUpload?login_id=" + eachSpub.get("username") + "?"
						+ "login_passwd=" + eachSpub.get("password"));

		post.setHeader("Accept", "image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*");

		post.setHeader("Content-Type", "multipart/form-data;boundary=---------------------------7d22911b10028e");

		post.setHeader("User-Agent", "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Q312461)");

		post.setHeader("Accept-Language", "en-us");

		post.setHeader("Content-Disposition", "form-data; name=fname" + "; filename=" + metaFileName);

		File file = new File(metaFile);

		FileEntity entity = new FileEntity(file);

		post.setEntity(entity);


		CloseableHttpResponse postresponse = client.execute(post);

		responseString = org.apache.http.util.EntityUtils.toString(postresponse.getEntity());

		responseObj = (HashMap<String, Object>) Utils.stringToMap(responseString);

		post.releaseConnection();

		responseObj.put("statusCode", postresponse.getStatusLine().getStatusCode());

		if (postresponse.getStatusLine().getStatusCode() == 200) {
			responseObj.put("response", responseString);
		} else {
			responseObj.put("response", "400 Bad Request error");
		}
		responseObj.put("success", 1);

		System.out.println("responseObj:::" + responseObj);
		System.out.println("responseString:::" + responseString);

		client.close();

	} catch (Exception e1) {
		responseObj.put("response", false);
		e1.printStackTrace();

	}

Can you try submitting again with the username followed by a forward slash and then your organizational role (in your case that’s ‘adhw’)?

So, instead of just
srini@newgen.co

Use
srini@newgen.co/adhw

This is related to an open issue that our technical team is investigating. You can follow any progress on that here:

If adding the role value isn’t sufficient, let us know, and we’ll add your example to that ticket.

1 Like

Thanks now its works like a charm

1 Like

Hi,

I’m facing with the same problem. When I try to upload some DOI’s the server respond me with and error 401 Unauthorized)'. I’ve upgrade OJs and I have the same problem, also I tried to change the user name to the email/role but it give me the same error; untill some months ago I used only the role un the user and it worked.

Do you know how can I solved it?

Thanks for helping me

Best,
Nacho

Hi @Nacho,

Thanks for your message! There are a couple of possibilities that might be causing this issue. Could you send us your DOI prefix and/or Crossref username to support@crossref.org so we can take a closer look?

Thanks in advance,
Isaac

Hi @ifarley,

Thanks for your answer. In my desperation, I also write to Crossref and it’s a problem with membership and billing that we are dealing with them.

Thanks
Nacho

1 Like