Related to issue 35325, related to issue 35326
authorMartin Taal <martin.taal@openbravo.com>
Tue, 21 Feb 2017 13:53:08 +0100
changeset 6347 1e44a524fa1f
parent 6346 c6e956d16bee
child 6348 8ea3f5ec030c
Related to issue 35325, related to issue 35326
Comment out the headers which pass directly basic auth information. Are not needed anymore.
Keep commented code for later usage/reference
src-test/org/openbravo/test/mobile/retail/mobilecore/webservice/WebServicesHelper.java
--- a/src-test/org/openbravo/test/mobile/retail/mobilecore/webservice/WebServicesHelper.java	Tue Feb 21 11:29:30 2017 +0100
+++ b/src-test/org/openbravo/test/mobile/retail/mobilecore/webservice/WebServicesHelper.java	Tue Feb 21 13:53:08 2017 +0100
@@ -33,7 +33,6 @@
 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;
@@ -242,9 +241,14 @@
     hc.setUseCaches(false);
     hc.setRequestProperty("Content-Type", "text/xml");
 
-    String userpass = getLogin() + ":" + getPassword();
-    String basicAuth = "Basic " + new String(new Base64().encode(userpass.getBytes()));
-    hc.setRequestProperty("Authorization", basicAuth);
+    // 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);
     return hc;
   }
 
@@ -265,4 +269,4 @@
     return OB_URL;
   }
 
-}
\ No newline at end of file
+}