From a8223cf347b8d2f60571752ce8fab4d4b2f1cf3c Mon Sep 17 00:00:00 2001
From: mbrodhu <brodhun@sub.uni-goettingen.de>
Date: Tue, 22 Nov 2016 14:08:04 +0100
Subject: [PATCH] empty request to identify

---
 .../java/info/textgrid/middleware/OAIPMHImpl.java  | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java b/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java
index 4be186f9..2a704384 100644
--- a/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java
+++ b/oaipmh-core/src/main/java/info/textgrid/middleware/OAIPMHImpl.java
@@ -86,11 +86,19 @@ public class OAIPMHImpl implements OAIPMHProducer {
 			@QueryParam("until") @DefaultValue("") String until,
 			@QueryParam("resumptionToken") @DefaultValue("") String resumptionToken) {
 
+
+		
 		ObjectFactory obf = new ObjectFactory();
 		OAIPMHType response = new OAIPMHType();
 		JAXBElement<OAIPMHType> oaipmhRoot = obf.createOAIPMH(response);
 		VerbType verbParam = setVerb(verb);
 		RequestType request = new RequestType();
+		
+		if(request.getVerb() == null){
+			
+			verbParam = setVerb("Identify");
+			request.setVerb(verbParam);
+		}
 
 		/*----Setting the responseDate of today-----*/
 		try {
@@ -122,11 +130,7 @@ public class OAIPMHImpl implements OAIPMHProducer {
 			request.setValue(DARIAHConstants.DARIAH_REP_BASEURL);
 		}
 
-		if(request.getVerb() == null){
-			
-			verbParam = setVerb("Identify");
-			request.setVerb(verbParam);
-		}
+
 		
 		if (verbParam != null) {
 			if (verbParam.value().equals("Identify")) {
-- 
GitLab