Related to issue 35325, related to issue 35326
authorMartin Taal <martin.taal@openbravo.com>
Fri, 24 Feb 2017 09:49:36 +0100
changeset 6352 e346994c7452
parent 6351 56b285efa4fc
child 6353 a7b96d701460
child 6382 86891c85100c
Related to issue 35325, related to issue 35326
Backout of changeset as it causes several offline tests to fail
src-test/org/openbravo/test/mobile/retail/mobilecore/webservice/WebServicesHelper.java
--- a/src-test/org/openbravo/test/mobile/retail/mobilecore/webservice/WebServicesHelper.java	Thu Feb 23 17:47:58 2017 +0530
+++ b/src-test/org/openbravo/test/mobile/retail/mobilecore/webservice/WebServicesHelper.java	Fri Feb 24 09:49:36 2017 +0100
@@ -33,6 +33,7 @@
 import java.net.PasswordAuthentication;
 import java.net.URL;
 
+import org.apache.commons.codec.binary.Base64;
 import org.apache.commons.io.IOUtils;
 import org.apache.log4j.Logger;
 import org.openbravo.test.mobile.core.utils.ConfigurationProperties;
@@ -241,14 +242,9 @@
     hc.setUseCaches(false);
     hc.setRequestProperty("Content-Type", "text/xml");
 
-    // code disabled for now as basic authentication also supported above
-    // the above code is more inline how tools like soapui do basic authentication
-    // therefore better to keep that enabled.
-    // for more info see:
-    // http://wiki.openbravo.com/wiki/How_To_Call_An_Openbravo_Webservice_From_Java#Basic_Authentication:_two_ways_to_do_it
-    //String userpass = getLogin() + ":" + getPassword();
-    //String basicAuth = "Basic " + new String(new Base64().encode(userpass.getBytes()));
-    //hc.setRequestProperty("Authorization", basicAuth);
+    String userpass = getLogin() + ":" + getPassword();
+    String basicAuth = "Basic " + new String(new Base64().encode(userpass.getBytes()));
+    hc.setRequestProperty("Authorization", basicAuth);
     return hc;
   }
 
@@ -269,4 +265,4 @@
     return OB_URL;
   }
 
-}
+}
\ No newline at end of file