fixed bug 13886: Implemented authenticated proxy
authorAsier Lostalé <asier.lostale@openbravo.com>
Mon, 02 Aug 2010 15:19:01 +0200
changeset 8007 a2b32071c996
parent 8004 86885cba1239
child 8008 91dade7a61a5
child 8010 e6fc833ee397
fixed bug 13886: Implemented authenticated proxy

Authenticated user is implemented, this is set by the HttpsUtils.isInternetAvailable()
method, which must be called before doing any Internet connection (direct or SOAP ws).

Invokation of this method has also been implemented in several places where unathenticated
proxy might not been set (register module and some cases in module management window).
src-db/database/model/tables/AD_SYSTEM_INFO.xml
src-db/database/sourcedata/AD_COLUMN.xml
src-db/database/sourcedata/AD_ELEMENT.xml
src-db/database/sourcedata/AD_FIELD.xml
src/org/openbravo/erpCommon/ad_forms/MaturityLevel.java
src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java
src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java
src/org/openbravo/erpCommon/ad_process/RegisterModule.java
src/org/openbravo/erpCommon/modules/ImportModule.java
src/org/openbravo/erpCommon/utility/HttpsUtils.java
--- a/src-db/database/model/tables/AD_SYSTEM_INFO.xml	Fri Jul 30 18:48:06 2010 +0200
+++ b/src-db/database/model/tables/AD_SYSTEM_INFO.xml	Mon Aug 02 15:19:01 2010 +0200
@@ -145,6 +145,18 @@
         <default><![CDATA[500]]></default>
         <onCreateDefault><![CDATA['500']]></onCreateDefault>
       </column>
+      <column name="ISPROXY_AUTHENTICATED" primaryKey="false" required="true" type="CHAR" size="1" autoIncrement="false">
+        <default><![CDATA[N]]></default>
+        <onCreateDefault/>
+      </column>
+      <column name="PROXY_USER" primaryKey="false" required="false" type="VARCHAR" size="100" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
+      <column name="PROXY_PASSWORD" primaryKey="false" required="false" type="VARCHAR" size="100" autoIncrement="false">
+        <default/>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="AD_SYSTEM_INFO_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Fri Jul 30 18:48:06 2010 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Mon Aug 02 15:19:01 2010 +0200
@@ -305575,6 +305575,106 @@
 <!--8C70144E8ED14107BA4D9C7E358DD9C3-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
 <!--8C70144E8ED14107BA4D9C7E358DD9C3--></AD_COLUMN>
 
+<!--8C84C9E4B8A39247E040007F01013819--><AD_COLUMN>
+<!--8C84C9E4B8A39247E040007F01013819-->  <AD_COLUMN_ID><![CDATA[8C84C9E4B8A39247E040007F01013819]]></AD_COLUMN_ID>
+<!--8C84C9E4B8A39247E040007F01013819-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C9E4B8A39247E040007F01013819-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C9E4B8A39247E040007F01013819-->  <NAME><![CDATA[Requires Proxy Authentication]]></NAME>
+<!--8C84C9E4B8A39247E040007F01013819-->  <DESCRIPTION><![CDATA[Is authentication requiered to use the proxy]]></DESCRIPTION>
+<!--8C84C9E4B8A39247E040007F01013819-->  <HELP><![CDATA[Check this field in case the proxy requires authenticated user/password]]></HELP>
+<!--8C84C9E4B8A39247E040007F01013819-->  <COLUMNNAME><![CDATA[IsProxy_Authenticated]]></COLUMNNAME>
+<!--8C84C9E4B8A39247E040007F01013819-->  <AD_TABLE_ID><![CDATA[1005400005]]></AD_TABLE_ID>
+<!--8C84C9E4B8A39247E040007F01013819-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--8C84C9E4B8A39247E040007F01013819-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
+<!--8C84C9E4B8A39247E040007F01013819-->  <DEFAULTVALUE><![CDATA[N]]></DEFAULTVALUE>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISMANDATORY><![CDATA[Y]]></ISMANDATORY>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--8C84C9E4B8A39247E040007F01013819-->  <SEQNO><![CDATA[380]]></SEQNO>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--8C84C9E4B8A39247E040007F01013819-->  <AD_ELEMENT_ID><![CDATA[8C84C8C2042FA648E040007F010137E1]]></AD_ELEMENT_ID>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--8C84C9E4B8A39247E040007F01013819-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--8C84C9E4B8A39247E040007F01013819-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C9E4B8A39247E040007F01013819-->  <POSITION><![CDATA[37]]></POSITION>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--8C84C9E4B8A39247E040007F01013819-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--8C84C9E4B8A39247E040007F01013819-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--8C84C9E4B8A39247E040007F01013819--></AD_COLUMN>
+
+<!--8C84C9E4B8A49247E040007F01013819--><AD_COLUMN>
+<!--8C84C9E4B8A49247E040007F01013819-->  <AD_COLUMN_ID><![CDATA[8C84C9E4B8A49247E040007F01013819]]></AD_COLUMN_ID>
+<!--8C84C9E4B8A49247E040007F01013819-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C9E4B8A49247E040007F01013819-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C9E4B8A49247E040007F01013819-->  <NAME><![CDATA[Proxy User]]></NAME>
+<!--8C84C9E4B8A49247E040007F01013819-->  <DESCRIPTION><![CDATA[User for the authenticated proxy]]></DESCRIPTION>
+<!--8C84C9E4B8A49247E040007F01013819-->  <HELP><![CDATA[User for the authenticated proxy]]></HELP>
+<!--8C84C9E4B8A49247E040007F01013819-->  <COLUMNNAME><![CDATA[Proxy_User]]></COLUMNNAME>
+<!--8C84C9E4B8A49247E040007F01013819-->  <AD_TABLE_ID><![CDATA[1005400005]]></AD_TABLE_ID>
+<!--8C84C9E4B8A49247E040007F01013819-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--8C84C9E4B8A49247E040007F01013819-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--8C84C9E4B8A49247E040007F01013819-->  <SEQNO><![CDATA[390]]></SEQNO>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--8C84C9E4B8A49247E040007F01013819-->  <AD_ELEMENT_ID><![CDATA[8C84C8C2042BA648E040007F010137E1]]></AD_ELEMENT_ID>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--8C84C9E4B8A49247E040007F01013819-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--8C84C9E4B8A49247E040007F01013819-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C9E4B8A49247E040007F01013819-->  <POSITION><![CDATA[38]]></POSITION>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--8C84C9E4B8A49247E040007F01013819-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--8C84C9E4B8A49247E040007F01013819-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--8C84C9E4B8A49247E040007F01013819--></AD_COLUMN>
+
+<!--8C84C9E4B8A59247E040007F01013819--><AD_COLUMN>
+<!--8C84C9E4B8A59247E040007F01013819-->  <AD_COLUMN_ID><![CDATA[8C84C9E4B8A59247E040007F01013819]]></AD_COLUMN_ID>
+<!--8C84C9E4B8A59247E040007F01013819-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C9E4B8A59247E040007F01013819-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C9E4B8A59247E040007F01013819-->  <NAME><![CDATA[Proxy Password]]></NAME>
+<!--8C84C9E4B8A59247E040007F01013819-->  <DESCRIPTION><![CDATA[Password for the authenticated proxy]]></DESCRIPTION>
+<!--8C84C9E4B8A59247E040007F01013819-->  <HELP><![CDATA[Password for the authenticated proxy]]></HELP>
+<!--8C84C9E4B8A59247E040007F01013819-->  <COLUMNNAME><![CDATA[Proxy_Password]]></COLUMNNAME>
+<!--8C84C9E4B8A59247E040007F01013819-->  <AD_TABLE_ID><![CDATA[1005400005]]></AD_TABLE_ID>
+<!--8C84C9E4B8A59247E040007F01013819-->  <AD_REFERENCE_ID><![CDATA[10]]></AD_REFERENCE_ID>
+<!--8C84C9E4B8A59247E040007F01013819-->  <FIELDLENGTH><![CDATA[100]]></FIELDLENGTH>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--8C84C9E4B8A59247E040007F01013819-->  <SEQNO><![CDATA[400]]></SEQNO>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISENCRYPTED><![CDATA[Y]]></ISENCRYPTED>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--8C84C9E4B8A59247E040007F01013819-->  <AD_ELEMENT_ID><![CDATA[8C84C8C2042DA648E040007F010137E1]]></AD_ELEMENT_ID>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISDESENCRYPTABLE><![CDATA[Y]]></ISDESENCRYPTABLE>
+<!--8C84C9E4B8A59247E040007F01013819-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--8C84C9E4B8A59247E040007F01013819-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C9E4B8A59247E040007F01013819-->  <POSITION><![CDATA[39]]></POSITION>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--8C84C9E4B8A59247E040007F01013819-->  <ISAUTOSAVE><![CDATA[Y]]></ISAUTOSAVE>
+<!--8C84C9E4B8A59247E040007F01013819-->  <VALIDATEONNEW><![CDATA[Y]]></VALIDATEONNEW>
+<!--8C84C9E4B8A59247E040007F01013819--></AD_COLUMN>
+
 <!--8CE66FCEB3404B3AB0559EE2BD6A6C31--><AD_COLUMN>
 <!--8CE66FCEB3404B3AB0559EE2BD6A6C31-->  <AD_COLUMN_ID><![CDATA[8CE66FCEB3404B3AB0559EE2BD6A6C31]]></AD_COLUMN_ID>
 <!--8CE66FCEB3404B3AB0559EE2BD6A6C31-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Fri Jul 30 18:48:06 2010 +0200
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Mon Aug 02 15:19:01 2010 +0200
@@ -26724,6 +26724,45 @@
 <!--8A19431CC0E120DBE040007F01013CCA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--8A19431CC0E120DBE040007F01013CCA--></AD_ELEMENT>
 
+<!--8C84C8C2042BA648E040007F010137E1--><AD_ELEMENT>
+<!--8C84C8C2042BA648E040007F010137E1-->  <AD_ELEMENT_ID><![CDATA[8C84C8C2042BA648E040007F010137E1]]></AD_ELEMENT_ID>
+<!--8C84C8C2042BA648E040007F010137E1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C8C2042BA648E040007F010137E1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C8C2042BA648E040007F010137E1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C8C2042BA648E040007F010137E1-->  <COLUMNNAME><![CDATA[Proxy_User]]></COLUMNNAME>
+<!--8C84C8C2042BA648E040007F010137E1-->  <NAME><![CDATA[Proxy User]]></NAME>
+<!--8C84C8C2042BA648E040007F010137E1-->  <PRINTNAME><![CDATA[Proxy User]]></PRINTNAME>
+<!--8C84C8C2042BA648E040007F010137E1-->  <DESCRIPTION><![CDATA[User for the authenticated proxy]]></DESCRIPTION>
+<!--8C84C8C2042BA648E040007F010137E1-->  <HELP><![CDATA[User for the authenticated proxy]]></HELP>
+<!--8C84C8C2042BA648E040007F010137E1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C8C2042BA648E040007F010137E1--></AD_ELEMENT>
+
+<!--8C84C8C2042DA648E040007F010137E1--><AD_ELEMENT>
+<!--8C84C8C2042DA648E040007F010137E1-->  <AD_ELEMENT_ID><![CDATA[8C84C8C2042DA648E040007F010137E1]]></AD_ELEMENT_ID>
+<!--8C84C8C2042DA648E040007F010137E1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C8C2042DA648E040007F010137E1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C8C2042DA648E040007F010137E1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C8C2042DA648E040007F010137E1-->  <COLUMNNAME><![CDATA[Proxy_Password]]></COLUMNNAME>
+<!--8C84C8C2042DA648E040007F010137E1-->  <NAME><![CDATA[Proxy Password]]></NAME>
+<!--8C84C8C2042DA648E040007F010137E1-->  <PRINTNAME><![CDATA[Proxy Password]]></PRINTNAME>
+<!--8C84C8C2042DA648E040007F010137E1-->  <DESCRIPTION><![CDATA[Password for the authenticated proxy]]></DESCRIPTION>
+<!--8C84C8C2042DA648E040007F010137E1-->  <HELP><![CDATA[Password for the authenticated proxy]]></HELP>
+<!--8C84C8C2042DA648E040007F010137E1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C8C2042DA648E040007F010137E1--></AD_ELEMENT>
+
+<!--8C84C8C2042FA648E040007F010137E1--><AD_ELEMENT>
+<!--8C84C8C2042FA648E040007F010137E1-->  <AD_ELEMENT_ID><![CDATA[8C84C8C2042FA648E040007F010137E1]]></AD_ELEMENT_ID>
+<!--8C84C8C2042FA648E040007F010137E1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C8C2042FA648E040007F010137E1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C8C2042FA648E040007F010137E1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C8C2042FA648E040007F010137E1-->  <COLUMNNAME><![CDATA[IsProxy_Authenticated]]></COLUMNNAME>
+<!--8C84C8C2042FA648E040007F010137E1-->  <NAME><![CDATA[Authentication Required]]></NAME>
+<!--8C84C8C2042FA648E040007F010137E1-->  <PRINTNAME><![CDATA[Authentication Required]]></PRINTNAME>
+<!--8C84C8C2042FA648E040007F010137E1-->  <DESCRIPTION><![CDATA[Is authentication requiered to use the proxy]]></DESCRIPTION>
+<!--8C84C8C2042FA648E040007F010137E1-->  <HELP><![CDATA[Check this field in case the proxy requires authenticated user/password]]></HELP>
+<!--8C84C8C2042FA648E040007F010137E1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C8C2042FA648E040007F010137E1--></AD_ELEMENT>
+
 <!--8CF76E08562A480D96D45C04F42D095E--><AD_ELEMENT>
 <!--8CF76E08562A480D96D45C04F42D095E-->  <AD_ELEMENT_ID><![CDATA[8CF76E08562A480D96D45C04F42D095E]]></AD_ELEMENT_ID>
 <!--8CF76E08562A480D96D45C04F42D095E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Fri Jul 30 18:48:06 2010 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Mon Aug 02 15:19:01 2010 +0200
@@ -178714,7 +178714,7 @@
 <!--1005400207-->  <DISPLAYLOGIC><![CDATA[@Isheartbeatactive@='']]></DISPLAYLOGIC>
 <!--1005400207-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--1005400207-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1005400207-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--1005400207-->  <SEQNO><![CDATA[110]]></SEQNO>
 <!--1005400207-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--1005400207-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1005400207-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -178737,7 +178737,7 @@
 <!--1005400208-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--1005400208-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--1005400208-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1005400208-->  <SEQNO><![CDATA[10]]></SEQNO>
+<!--1005400208-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--1005400208-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--1005400208-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1005400208-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -178824,7 +178824,7 @@
 <!--1005400212-->  <DISPLAYLOGIC><![CDATA[@Isheartbeatactive@='Y' & @Isproxyrequired@='Y']]></DISPLAYLOGIC>
 <!--1005400212-->  <DISPLAYLENGTH><![CDATA[6]]></DISPLAYLENGTH>
 <!--1005400212-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1005400212-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--1005400212-->  <SEQNO><![CDATA[60]]></SEQNO>
 <!--1005400212-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--1005400212-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1005400212-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -178847,7 +178847,7 @@
 <!--1005400213-->  <DISPLAYLOGIC><![CDATA[@Isheartbeatactive@='Y' & @Isproxyrequired@='Y']]></DISPLAYLOGIC>
 <!--1005400213-->  <DISPLAYLENGTH><![CDATA[40]]></DISPLAYLENGTH>
 <!--1005400213-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1005400213-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--1005400213-->  <SEQNO><![CDATA[50]]></SEQNO>
 <!--1005400213-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1005400213-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1005400213-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -178931,7 +178931,7 @@
 <!--1005400217-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--1005400217-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--1005400217-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1005400217-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--1005400217-->  <SEQNO><![CDATA[100]]></SEQNO>
 <!--1005400217-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1005400217-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1005400217-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -182038,7 +182038,7 @@
 <!--154ED7B694C24AC0BD7AE5288247B411-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--154ED7B694C24AC0BD7AE5288247B411-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--154ED7B694C24AC0BD7AE5288247B411-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--154ED7B694C24AC0BD7AE5288247B411-->  <SEQNO><![CDATA[150]]></SEQNO>
+<!--154ED7B694C24AC0BD7AE5288247B411-->  <SEQNO><![CDATA[180]]></SEQNO>
 <!--154ED7B694C24AC0BD7AE5288247B411-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--154ED7B694C24AC0BD7AE5288247B411-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--154ED7B694C24AC0BD7AE5288247B411-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -183288,7 +183288,7 @@
 <!--392BC68536234226AE7FEE206BD37336-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--392BC68536234226AE7FEE206BD37336-->  <DISPLAYLENGTH><![CDATA[60]]></DISPLAYLENGTH>
 <!--392BC68536234226AE7FEE206BD37336-->  <ISREADONLY><![CDATA[Y]]></ISREADONLY>
-<!--392BC68536234226AE7FEE206BD37336-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--392BC68536234226AE7FEE206BD37336-->  <SEQNO><![CDATA[140]]></SEQNO>
 <!--392BC68536234226AE7FEE206BD37336-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--392BC68536234226AE7FEE206BD37336-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--392BC68536234226AE7FEE206BD37336-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -183926,7 +183926,7 @@
 <!--47D768A3E82C4E4492751FFCF6A21E05-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--47D768A3E82C4E4492751FFCF6A21E05-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--47D768A3E82C4E4492751FFCF6A21E05-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--47D768A3E82C4E4492751FFCF6A21E05-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--47D768A3E82C4E4492751FFCF6A21E05-->  <SEQNO><![CDATA[150]]></SEQNO>
 <!--47D768A3E82C4E4492751FFCF6A21E05-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--47D768A3E82C4E4492751FFCF6A21E05-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--47D768A3E82C4E4492751FFCF6A21E05-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -192122,10 +192122,11 @@
 <!--5BE1B2D5502E0FD2E040007F01016C74-->  <AD_COLUMN_ID><![CDATA[1005400228]]></AD_COLUMN_ID>
 <!--5BE1B2D5502E0FD2E040007F01016C74-->  <AD_FIELDGROUP_ID><![CDATA[20E50987265A49C087236256E52D3CF9]]></AD_FIELDGROUP_ID>
 <!--5BE1B2D5502E0FD2E040007F01016C74-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--5BE1B2D5502E0FD2E040007F01016C74-->  <DISPLAYLOGIC><![CDATA[@Isproxyrequired@='Y']]></DISPLAYLOGIC>
 <!--5BE1B2D5502E0FD2E040007F01016C74-->  <DISPLAYLENGTH><![CDATA[6]]></DISPLAYLENGTH>
 <!--5BE1B2D5502E0FD2E040007F01016C74-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--5BE1B2D5502E0FD2E040007F01016C74-->  <SEQNO><![CDATA[90]]></SEQNO>
-<!--5BE1B2D5502E0FD2E040007F01016C74-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--5BE1B2D5502E0FD2E040007F01016C74-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--5BE1B2D5502E0FD2E040007F01016C74-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--5BE1B2D5502E0FD2E040007F01016C74-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--5BE1B2D5502E0FD2E040007F01016C74-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--5BE1B2D5502E0FD2E040007F01016C74-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
@@ -192146,9 +192147,10 @@
 <!--5BE1B2D5502F0FD2E040007F01016C74-->  <AD_COLUMN_ID><![CDATA[1005400227]]></AD_COLUMN_ID>
 <!--5BE1B2D5502F0FD2E040007F01016C74-->  <AD_FIELDGROUP_ID><![CDATA[20E50987265A49C087236256E52D3CF9]]></AD_FIELDGROUP_ID>
 <!--5BE1B2D5502F0FD2E040007F01016C74-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--5BE1B2D5502F0FD2E040007F01016C74-->  <DISPLAYLOGIC><![CDATA[@Isproxyrequired@='Y' ]]></DISPLAYLOGIC>
 <!--5BE1B2D5502F0FD2E040007F01016C74-->  <DISPLAYLENGTH><![CDATA[20]]></DISPLAYLENGTH>
 <!--5BE1B2D5502F0FD2E040007F01016C74-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--5BE1B2D5502F0FD2E040007F01016C74-->  <SEQNO><![CDATA[100]]></SEQNO>
+<!--5BE1B2D5502F0FD2E040007F01016C74-->  <SEQNO><![CDATA[90]]></SEQNO>
 <!--5BE1B2D5502F0FD2E040007F01016C74-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--5BE1B2D5502F0FD2E040007F01016C74-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--5BE1B2D5502F0FD2E040007F01016C74-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -193080,7 +193082,7 @@
 <!--6257780C408D48048C202839877A9F1A-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--6257780C408D48048C202839877A9F1A-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--6257780C408D48048C202839877A9F1A-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--6257780C408D48048C202839877A9F1A-->  <SEQNO><![CDATA[140]]></SEQNO>
+<!--6257780C408D48048C202839877A9F1A-->  <SEQNO><![CDATA[170]]></SEQNO>
 <!--6257780C408D48048C202839877A9F1A-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--6257780C408D48048C202839877A9F1A-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--6257780C408D48048C202839877A9F1A-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -194588,7 +194590,7 @@
 <!--755560EC7ABE1758E040007F01010B34-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--755560EC7ABE1758E040007F01010B34-->  <DISPLAYLENGTH><![CDATA[50]]></DISPLAYLENGTH>
 <!--755560EC7ABE1758E040007F01010B34-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--755560EC7ABE1758E040007F01010B34-->  <SEQNO><![CDATA[170]]></SEQNO>
+<!--755560EC7ABE1758E040007F01010B34-->  <SEQNO><![CDATA[200]]></SEQNO>
 <!--755560EC7ABE1758E040007F01010B34-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--755560EC7ABE1758E040007F01010B34-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--755560EC7ABE1758E040007F01010B34-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -201238,6 +201240,150 @@
 <!--8B39414C4EF149A1AF97A09A77006467-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--8B39414C4EF149A1AF97A09A77006467--></AD_FIELD>
 
+<!--8C84C8C20421A648E040007F010137E1--><AD_FIELD>
+<!--8C84C8C20421A648E040007F010137E1-->  <AD_FIELD_ID><![CDATA[8C84C8C20421A648E040007F010137E1]]></AD_FIELD_ID>
+<!--8C84C8C20421A648E040007F010137E1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C8C20421A648E040007F010137E1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C8C20421A648E040007F010137E1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C8C20421A648E040007F010137E1-->  <NAME><![CDATA[Authentication Required]]></NAME>
+<!--8C84C8C20421A648E040007F010137E1-->  <DESCRIPTION><![CDATA[Is authentication requiered to use the proxy]]></DESCRIPTION>
+<!--8C84C8C20421A648E040007F010137E1-->  <HELP><![CDATA[Check this field in case the proxy requires authenticated user/password]]></HELP>
+<!--8C84C8C20421A648E040007F010137E1-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--8C84C8C20421A648E040007F010137E1-->  <AD_TAB_ID><![CDATA[8652BB9E40664869A5132CEB8A907B9B]]></AD_TAB_ID>
+<!--8C84C8C20421A648E040007F010137E1-->  <AD_COLUMN_ID><![CDATA[8C84C9E4B8A39247E040007F01013819]]></AD_COLUMN_ID>
+<!--8C84C8C20421A648E040007F010137E1-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--8C84C8C20421A648E040007F010137E1-->  <DISPLAYLOGIC><![CDATA[@Isproxyrequired@='Y']]></DISPLAYLOGIC>
+<!--8C84C8C20421A648E040007F010137E1-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--8C84C8C20421A648E040007F010137E1-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--8C84C8C20421A648E040007F010137E1-->  <SEQNO><![CDATA[110]]></SEQNO>
+<!--8C84C8C20421A648E040007F010137E1-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--8C84C8C20421A648E040007F010137E1-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--8C84C8C20421A648E040007F010137E1-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8C84C8C20421A648E040007F010137E1-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--8C84C8C20421A648E040007F010137E1-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--8C84C8C20421A648E040007F010137E1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C8C20421A648E040007F010137E1--></AD_FIELD>
+
+<!--8C84C8C20427A648E040007F010137E1--><AD_FIELD>
+<!--8C84C8C20427A648E040007F010137E1-->  <AD_FIELD_ID><![CDATA[8C84C8C20427A648E040007F010137E1]]></AD_FIELD_ID>
+<!--8C84C8C20427A648E040007F010137E1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C8C20427A648E040007F010137E1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C8C20427A648E040007F010137E1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C8C20427A648E040007F010137E1-->  <NAME><![CDATA[Proxy Password]]></NAME>
+<!--8C84C8C20427A648E040007F010137E1-->  <DESCRIPTION><![CDATA[Password for the authenticated proxy]]></DESCRIPTION>
+<!--8C84C8C20427A648E040007F010137E1-->  <HELP><![CDATA[Password for the authenticated proxy]]></HELP>
+<!--8C84C8C20427A648E040007F010137E1-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--8C84C8C20427A648E040007F010137E1-->  <AD_TAB_ID><![CDATA[8652BB9E40664869A5132CEB8A907B9B]]></AD_TAB_ID>
+<!--8C84C8C20427A648E040007F010137E1-->  <AD_COLUMN_ID><![CDATA[8C84C9E4B8A59247E040007F01013819]]></AD_COLUMN_ID>
+<!--8C84C8C20427A648E040007F010137E1-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--8C84C8C20427A648E040007F010137E1-->  <DISPLAYLOGIC><![CDATA[@Isproxyrequired@='Y' & @IsProxy_Authenticated@='Y']]></DISPLAYLOGIC>
+<!--8C84C8C20427A648E040007F010137E1-->  <DISPLAYLENGTH><![CDATA[100]]></DISPLAYLENGTH>
+<!--8C84C8C20427A648E040007F010137E1-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--8C84C8C20427A648E040007F010137E1-->  <SEQNO><![CDATA[130]]></SEQNO>
+<!--8C84C8C20427A648E040007F010137E1-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
+<!--8C84C8C20427A648E040007F010137E1-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--8C84C8C20427A648E040007F010137E1-->  <ISENCRYPTED><![CDATA[Y]]></ISENCRYPTED>
+<!--8C84C8C20427A648E040007F010137E1-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--8C84C8C20427A648E040007F010137E1-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--8C84C8C20427A648E040007F010137E1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C8C20427A648E040007F010137E1--></AD_FIELD>
+
+<!--8C84C8C20429A648E040007F010137E1--><AD_FIELD>
+<!--8C84C8C20429A648E040007F010137E1-->  <AD_FIELD_ID><![CDATA[8C84C8C20429A648E040007F010137E1]]></AD_FIELD_ID>
+<!--8C84C8C20429A648E040007F010137E1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C8C20429A648E040007F010137E1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C8C20429A648E040007F010137E1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C8C20429A648E040007F010137E1-->  <NAME><![CDATA[Proxy User]]></NAME>
+<!--8C84C8C20429A648E040007F010137E1-->  <DESCRIPTION><![CDATA[User for the authenticated proxy]]></DESCRIPTION>
+<!--8C84C8C20429A648E040007F010137E1-->  <HELP><![CDATA[User for the authenticated proxy]]></HELP>
+<!--8C84C8C20429A648E040007F010137E1-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--8C84C8C20429A648E040007F010137E1-->  <AD_TAB_ID><![CDATA[8652BB9E40664869A5132CEB8A907B9B]]></AD_TAB_ID>
+<!--8C84C8C20429A648E040007F010137E1-->  <AD_COLUMN_ID><![CDATA[8C84C9E4B8A49247E040007F01013819]]></AD_COLUMN_ID>
+<!--8C84C8C20429A648E040007F010137E1-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--8C84C8C20429A648E040007F010137E1-->  <DISPLAYLOGIC><![CDATA[@Isproxyrequired@='Y' & @IsProxy_Authenticated@='Y']]></DISPLAYLOGIC>
+<!--8C84C8C20429A648E040007F010137E1-->  <DISPLAYLENGTH><![CDATA[100]]></DISPLAYLENGTH>
+<!--8C84C8C20429A648E040007F010137E1-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--8C84C8C20429A648E040007F010137E1-->  <SEQNO><![CDATA[120]]></SEQNO>
+<!--8C84C8C20429A648E040007F010137E1-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--8C84C8C20429A648E040007F010137E1-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--8C84C8C20429A648E040007F010137E1-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8C84C8C20429A648E040007F010137E1-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--8C84C8C20429A648E040007F010137E1-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--8C84C8C20429A648E040007F010137E1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C8C20429A648E040007F010137E1--></AD_FIELD>
+
+<!--8C84C9E4B8AC9247E040007F01013819--><AD_FIELD>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <AD_FIELD_ID><![CDATA[8C84C9E4B8AC9247E040007F01013819]]></AD_FIELD_ID>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <NAME><![CDATA[Authentication Required]]></NAME>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <DESCRIPTION><![CDATA[Is authentication requiered to use the proxy]]></DESCRIPTION>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <HELP><![CDATA[Check this field in case the proxy requires authenticated user/password]]></HELP>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <AD_TAB_ID><![CDATA[1005400005]]></AD_TAB_ID>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <AD_COLUMN_ID><![CDATA[8C84C9E4B8A39247E040007F01013819]]></AD_COLUMN_ID>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <DISPLAYLOGIC><![CDATA[@Isheartbeatactive@='Y' & @Isproxyrequired@='Y']]></DISPLAYLOGIC>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <SEQNO><![CDATA[70]]></SEQNO>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--8C84C9E4B8AC9247E040007F01013819-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C9E4B8AC9247E040007F01013819--></AD_FIELD>
+
+<!--8C84C9E4B8B69247E040007F01013819--><AD_FIELD>
+<!--8C84C9E4B8B69247E040007F01013819-->  <AD_FIELD_ID><![CDATA[8C84C9E4B8B69247E040007F01013819]]></AD_FIELD_ID>
+<!--8C84C9E4B8B69247E040007F01013819-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C9E4B8B69247E040007F01013819-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C9E4B8B69247E040007F01013819-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C9E4B8B69247E040007F01013819-->  <NAME><![CDATA[Proxy Password]]></NAME>
+<!--8C84C9E4B8B69247E040007F01013819-->  <DESCRIPTION><![CDATA[Password for the authenticated proxy]]></DESCRIPTION>
+<!--8C84C9E4B8B69247E040007F01013819-->  <HELP><![CDATA[Password for the authenticated proxy]]></HELP>
+<!--8C84C9E4B8B69247E040007F01013819-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--8C84C9E4B8B69247E040007F01013819-->  <AD_TAB_ID><![CDATA[1005400005]]></AD_TAB_ID>
+<!--8C84C9E4B8B69247E040007F01013819-->  <AD_COLUMN_ID><![CDATA[8C84C9E4B8A59247E040007F01013819]]></AD_COLUMN_ID>
+<!--8C84C9E4B8B69247E040007F01013819-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--8C84C9E4B8B69247E040007F01013819-->  <DISPLAYLOGIC><![CDATA[@Isheartbeatactive@='Y' & @Isproxyrequired@='Y' & @IsProxy_Authenticated@='Y']]></DISPLAYLOGIC>
+<!--8C84C9E4B8B69247E040007F01013819-->  <DISPLAYLENGTH><![CDATA[100]]></DISPLAYLENGTH>
+<!--8C84C9E4B8B69247E040007F01013819-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--8C84C9E4B8B69247E040007F01013819-->  <SEQNO><![CDATA[90]]></SEQNO>
+<!--8C84C9E4B8B69247E040007F01013819-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
+<!--8C84C9E4B8B69247E040007F01013819-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--8C84C9E4B8B69247E040007F01013819-->  <ISENCRYPTED><![CDATA[Y]]></ISENCRYPTED>
+<!--8C84C9E4B8B69247E040007F01013819-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--8C84C9E4B8B69247E040007F01013819-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--8C84C9E4B8B69247E040007F01013819-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C9E4B8B69247E040007F01013819--></AD_FIELD>
+
+<!--8C84C9E4B8B89247E040007F01013819--><AD_FIELD>
+<!--8C84C9E4B8B89247E040007F01013819-->  <AD_FIELD_ID><![CDATA[8C84C9E4B8B89247E040007F01013819]]></AD_FIELD_ID>
+<!--8C84C9E4B8B89247E040007F01013819-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--8C84C9E4B8B89247E040007F01013819-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--8C84C9E4B8B89247E040007F01013819-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--8C84C9E4B8B89247E040007F01013819-->  <NAME><![CDATA[Proxy User]]></NAME>
+<!--8C84C9E4B8B89247E040007F01013819-->  <DESCRIPTION><![CDATA[User for the authenticated proxy]]></DESCRIPTION>
+<!--8C84C9E4B8B89247E040007F01013819-->  <HELP><![CDATA[User for the authenticated proxy]]></HELP>
+<!--8C84C9E4B8B89247E040007F01013819-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--8C84C9E4B8B89247E040007F01013819-->  <AD_TAB_ID><![CDATA[1005400005]]></AD_TAB_ID>
+<!--8C84C9E4B8B89247E040007F01013819-->  <AD_COLUMN_ID><![CDATA[8C84C9E4B8A49247E040007F01013819]]></AD_COLUMN_ID>
+<!--8C84C9E4B8B89247E040007F01013819-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--8C84C9E4B8B89247E040007F01013819-->  <DISPLAYLOGIC><![CDATA[@Isheartbeatactive@='Y' & @Isproxyrequired@='Y' & @IsProxy_Authenticated@='Y']]></DISPLAYLOGIC>
+<!--8C84C9E4B8B89247E040007F01013819-->  <DISPLAYLENGTH><![CDATA[100]]></DISPLAYLENGTH>
+<!--8C84C9E4B8B89247E040007F01013819-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--8C84C9E4B8B89247E040007F01013819-->  <SEQNO><![CDATA[80]]></SEQNO>
+<!--8C84C9E4B8B89247E040007F01013819-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--8C84C9E4B8B89247E040007F01013819-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--8C84C9E4B8B89247E040007F01013819-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--8C84C9E4B8B89247E040007F01013819-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--8C84C9E4B8B89247E040007F01013819-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--8C84C9E4B8B89247E040007F01013819-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--8C84C9E4B8B89247E040007F01013819--></AD_FIELD>
+
 <!--8CB852B414BA4B66B20790634D899D85--><AD_FIELD>
 <!--8CB852B414BA4B66B20790634D899D85-->  <AD_FIELD_ID><![CDATA[8CB852B414BA4B66B20790634D899D85]]></AD_FIELD_ID>
 <!--8CB852B414BA4B66B20790634D899D85-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -201729,7 +201875,7 @@
 <!--9B47A5ACA52848FE913E570498056B53-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--9B47A5ACA52848FE913E570498056B53-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--9B47A5ACA52848FE913E570498056B53-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--9B47A5ACA52848FE913E570498056B53-->  <SEQNO><![CDATA[160]]></SEQNO>
+<!--9B47A5ACA52848FE913E570498056B53-->  <SEQNO><![CDATA[190]]></SEQNO>
 <!--9B47A5ACA52848FE913E570498056B53-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--9B47A5ACA52848FE913E570498056B53-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--9B47A5ACA52848FE913E570498056B53-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -201888,7 +202034,7 @@
 <!--9EC91606F52948D2BB833DA494E65BBD-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--9EC91606F52948D2BB833DA494E65BBD-->  <DISPLAYLENGTH><![CDATA[32]]></DISPLAYLENGTH>
 <!--9EC91606F52948D2BB833DA494E65BBD-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--9EC91606F52948D2BB833DA494E65BBD-->  <SEQNO><![CDATA[130]]></SEQNO>
+<!--9EC91606F52948D2BB833DA494E65BBD-->  <SEQNO><![CDATA[160]]></SEQNO>
 <!--9EC91606F52948D2BB833DA494E65BBD-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--9EC91606F52948D2BB833DA494E65BBD-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--9EC91606F52948D2BB833DA494E65BBD-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
--- a/src/org/openbravo/erpCommon/ad_forms/MaturityLevel.java	Fri Jul 30 18:48:06 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/MaturityLevel.java	Mon Aug 02 15:19:01 2010 +0200
@@ -21,6 +21,7 @@
 
 import org.apache.log4j.Logger;
 import org.openbravo.data.FieldProvider;
+import org.openbravo.erpCommon.utility.HttpsUtils;
 import org.openbravo.erpCommon.utility.SQLReturnObject;
 import org.openbravo.services.webservice.WebService3Impl;
 import org.openbravo.services.webservice.WebService3ImplServiceLocator;
@@ -39,6 +40,9 @@
    * service is not available or the request fails, the list is initiallized with 500-Production.
    */
   public MaturityLevel() {
+    // Check internet availability and set proxy, to obtain maturity levels
+    boolean error = !HttpsUtils.isInternetAvailable();
+    log4j.error("Couldn't connect to Internet to obtain maturity levels");
     try {
       // retrieve the module details from the webservice
       final WebService3ImplServiceLocator loc = new WebService3ImplServiceLocator();
@@ -46,6 +50,11 @@
       levels = ws.getMaturityLevels();
     } catch (final Exception e) {
       log4j.error("Error obtaining maturity levels", e);
+      error = true;
+    }
+
+    if (error) {
+      // could not obtain actual levels, setting production only
       log4j.warn("Setting default Production level");
       levels = new String[1][2];
       levels[0][0] = "500";
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java	Fri Jul 30 18:48:06 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java	Mon Aug 02 15:19:01 2010 +0200
@@ -645,11 +645,13 @@
       // if it is a remote installation get the module from webservice,
       // other case the obx file is passed as an InputStream
       try {
-        final WebService3ImplServiceLocator loc = new WebService3ImplServiceLocator();
-        final WebService3Impl ws = loc.getWebService3();
-        module = ws.moduleDetail(recordId);
+        if (HttpsUtils.isInternetAvailable()) {
+          final WebService3ImplServiceLocator loc = new WebService3ImplServiceLocator();
+          final WebService3Impl ws = loc.getWebService3();
+          module = ws.moduleDetail(recordId);
+        }
       } catch (final Exception e) {
-        log4j.error(e);
+        log4j.error("Error obtaining module info", e);
       }
     } else {
       discard[4] = "core";
@@ -1285,26 +1287,26 @@
   private String getSearchResults(HttpServletRequest request, HttpServletResponse response,
       VariablesSecureApp vars, String text) {
     SimpleModule[] modules = null;
-    SystemInformation info = OBDal.getInstance().get(SystemInformation.class, "0");
     try {
-      if (info.isProxyRequired() && !info.getProxyServer().equals("") && info.getProxyPort() > 0) {
-        if (!HttpsUtils.isInternetAvailable(info.getProxyServer(), info.getProxyPort().intValue())) {
-          final OBError message = new OBError();
-          message.setType("Error");
-          message.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
-          message.setMessage(Utility.messageBD(this, "WSError", vars.getLanguage()));
-          vars.setMessage("ModuleManagement", message);
-          try {
-            response
-                .sendRedirect(strDireccion + request.getServletPath() + "?Command=ADD_NOSEARCH");
-          } catch (final Exception ex) {
-            log4j.error(ex);
-          }
+      if (!HttpsUtils.isInternetAvailable()) {
+        final OBError message = new OBError();
+        message.setType("Error");
+        message.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
+        message.setMessage(Utility.messageBD(this, "WSError", vars.getLanguage()));
+        vars.setMessage("ModuleManagement", message);
+        try {
+          response.sendRedirect(strDireccion + request.getServletPath() + "?Command=ADD_NOSEARCH");
+        } catch (final Exception ex) {
+          log4j.error(ex.getMessage(), ex);
         }
       }
       final WebService3ImplServiceLocator loc = new WebService3ImplServiceLocator();
       final WebService3Impl ws = loc.getWebService3();
 
+      // Stub stub = (javax.xml.rpc.Stub) ws;
+      // stub._setProperty(Stub.USERNAME_PROPERTY, "test");
+      // stub._setProperty(Stub.PASSWORD_PROPERTY, "1");
+
       HashMap<String, String> maturitySearch = new HashMap<String, String>();
       maturitySearch.put("search.level", getSystemMaturity(false));
       modules = ws.moduleSearch(text, getInstalledModules(), maturitySearch);
--- a/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java	Fri Jul 30 18:48:06 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java	Mon Aug 02 15:19:01 2010 +0200
@@ -1,3 +1,22 @@
+/*
+ *************************************************************************
+ * The contents of this file are subject to the Openbravo  Public  License
+ * Version  1.0  (the  "License"),  being   the  Mozilla   Public  License
+ * Version 1.1  with a permitted attribution clause; you may not  use this
+ * file except in compliance with the License. You  may  obtain  a copy of
+ * the License at http://www.openbravo.com/legal/license.html 
+ * Software distributed under the License  is  distributed  on  an "AS IS"
+ * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+ * License for the specific  language  governing  rights  and  limitations
+ * under the License. 
+ * The Original Code is Openbravo ERP. 
+ * The Initial Developer of the Original Code is Openbravo SLU 
+ * All portions are Copyright (C) 2008-2010 Openbravo SLU 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+ */
+
 package org.openbravo.erpCommon.ad_process;
 
 import java.io.IOException;
@@ -76,7 +95,7 @@
       return;
     }
 
-    if (!isInternetAvailable(connection)) {
+    if (!HttpsUtils.isInternetAvailable()) {
       msg = Utility.messageBD(connection, "HB_INTERNET_UNAVAILABLE", ctx.getLanguage());
       logger.logln(msg);
       throw new Exception(msg);
@@ -140,28 +159,6 @@
   }
 
   /**
-   * @param connection
-   * @return true if there is a connection to the internet, false otherwise
-   * @throws ServletException
-   */
-  private static boolean isInternetAvailable(ConnectionProvider connection) throws ServletException {
-    log.info("Checking for internet connection...");
-    String isproxyrequired = SystemInfo.get(SystemInfo.Item.ISPROXYREQUIRED);
-    if (isproxyrequired != null && isproxyrequired.equals("Y")) {
-      String proxyServer = HeartbeatProcessData.selectProxyServer(connection);
-      String proxyPort = HeartbeatProcessData.selectProxyPort(connection);
-      int port = 80;
-      try {
-        port = Integer.parseInt(proxyPort);
-      } catch (NumberFormatException e) {
-      }
-      return HttpsUtils.isInternetAvailable(proxyServer, port);
-    } else {
-      return HttpsUtils.isInternetAvailable();
-    }
-  }
-
-  /**
    * @param con
    * @return the system info as properties
    * @throws ServletException
--- a/src/org/openbravo/erpCommon/ad_process/RegisterModule.java	Fri Jul 30 18:48:06 2010 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/RegisterModule.java	Mon Aug 02 15:19:01 2010 +0200
@@ -11,7 +11,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2009 Openbravo SLU 
+ * All portions are Copyright (C) 2008-2010 Openbravo SLU 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -27,6 +27,7 @@
 
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.erpCommon.utility.HttpsUtils;
 import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.services.webservice.Module;
@@ -74,22 +75,25 @@
       module.setDescription(data.description);
 
       WebService3Impl ws = null;
-      boolean error = false;
+      boolean error = !HttpsUtils.isInternetAvailable();
       try {
-        // retrieve the module details from the webservice
-        WebService3ImplServiceLocator loc = new WebService3ImplServiceLocator();
-        ws = (WebService3Impl) loc.getWebService3();
+        if (!error) {
+          // retrieve the module details from the webservice
+          WebService3ImplServiceLocator loc = new WebService3ImplServiceLocator();
+          ws = (WebService3Impl) loc.getWebService3();
+        }
       } catch (Exception e) {
+        error = true;
+        log4j.error("Error obtaining ws to register module", e);
+      }
+
+      if (error) {
         OBError message = new OBError();
         message.setType("Error");
         message.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
         message.setMessage(Utility.messageBD(this, "WSError", vars.getLanguage()));
         vars.setMessage("RegisterModule", message);
-        e.printStackTrace();
-        error = true;
-      }
-
-      if (!error) {
+      } else {
         try {
           module = ws.moduleRegister(module, vars.getStringParameter("inpUser"), vars
               .getStringParameter("inpPassword"));
--- a/src/org/openbravo/erpCommon/modules/ImportModule.java	Fri Jul 30 18:48:06 2010 +0200
+++ b/src/org/openbravo/erpCommon/modules/ImportModule.java	Mon Aug 02 15:19:01 2010 +0200
@@ -1307,6 +1307,14 @@
       final HashMap<String, String> updateModules = new HashMap<String, String>();
       final String user = vars == null ? "0" : vars.getUser();
       ImportModuleData.insertLog(conn, user, "", "", "", "Scanning For Updates", "S");
+
+      if (!HttpsUtils.isInternetAvailable()) {
+        // Check Internet availability and set proxy if required
+        ImportModuleData.insertLog(conn, user, "", "", "",
+            "Scan for updates: Couldn't contact with webservice server", "E");
+        return updateModules;
+      }
+
       WebService3ImplServiceLocator loc;
       WebService3Impl ws = null;
       SimpleModule[] updates;
--- a/src/org/openbravo/erpCommon/utility/HttpsUtils.java	Fri Jul 30 18:48:06 2010 +0200
+++ b/src/org/openbravo/erpCommon/utility/HttpsUtils.java	Mon Aug 02 15:19:01 2010 +0200
@@ -37,8 +37,10 @@
 import java.io.OutputStream;
 import java.io.OutputStreamWriter;
 import java.io.UnsupportedEncodingException;
+import java.net.Authenticator;
 import java.net.HttpURLConnection;
 import java.net.MalformedURLException;
+import java.net.PasswordAuthentication;
 import java.net.URL;
 import java.net.URLEncoder;
 import java.security.GeneralSecurityException;
@@ -59,8 +61,13 @@
 import javax.net.ssl.TrustManager;
 import javax.net.ssl.TrustManagerFactory;
 import javax.net.ssl.X509TrustManager;
+import javax.servlet.ServletException;
 
 import org.apache.log4j.Logger;
+import org.openbravo.dal.core.OBContext;
+import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.ad.system.SystemInformation;
+import org.openbravo.utils.FormatUtilities;
 
 public class HttpsUtils {
 
@@ -356,26 +363,87 @@
     }
   };
 
+  /**
+   * Checks Internet availability. In case system information is defined to use proxy, proxy is set.
+   * Therefore this method should be invoked before each Internet connection.
+   * 
+   * @return true in case Internet (https://butler.openbravo.com) is reachable.
+   */
   public static boolean isInternetAvailable() {
     return isInternetAvailable(null, 0);
   }
 
+  /**
+   * Checks the Internet availability and sets the proxy in case it is needed.
+   * 
+   * @deprecated Proxy settings should not be passed as parameter, but obtained from system
+   *             information. Use instead {@link HttpsUtils#isInternetAvailable()}
+   * @param proxyHost
+   * @param proxyPort
+   * @return
+   */
   public static boolean isInternetAvailable(String proxyHost, int proxyPort) {
-    if (proxyHost != null && !proxyHost.equals("")) {
-      System.getProperties().put("proxySet", true);
-      System.getProperties().put("http.proxyHost", proxyHost);
-      System.getProperties().put("https.proxyHost", proxyHost);
-      System.getProperties().put("http.proxyPort", String.valueOf(proxyPort));
-      System.getProperties().put("https.proxyPort", String.valueOf(proxyPort));
-      System.setProperty("java.net.useSystemProxies", "true");
-    } else {
-      System.getProperties().put("proxySet", false);
-      System.getProperties().remove("http.proxyHost");
-      System.getProperties().remove("http.proxyPort");
-      System.getProperties().remove("https.proxyHost");
-      System.getProperties().remove("https.proxyPort");
-      System.setProperty("java.net.useSystemProxies", "false");
+    OBContext.setAdminMode();
+    try {
+      final SystemInformation sys = OBDal.getInstance().get(SystemInformation.class, "0");
+      if (sys.isProxyRequired() || (proxyHost != null && !proxyHost.isEmpty())) {
+        // Proxy is required for connection.
+        String host;
+        int port;
+        if (proxyHost == null || proxyHost.isEmpty()) {
+          // to maintain backwards compatibility, set host in case it is provided as parameter (it
+          // shouldn't be)
+          host = sys.getProxyServer();
+          port = sys.getProxyPort().intValue();
+        } else {
+          host = proxyHost;
+          port = proxyPort;
+        }
+        host = "localhost2";
+        System.getProperties().put("proxySet", "true");
+        System.getProperties().put("http.proxyHost", host);
+        System.getProperties().put("https.proxyHost", host);
+        System.getProperties().put("http.proxyPort", String.valueOf(port));
+        System.getProperties().put("https.proxyPort", String.valueOf(port));
+
+        System.setProperty("java.net.useSystemProxies", "true");
+
+        if (sys.isRequiresProxyAuthentication()) {
+          final String user = sys.getProxyUser();
+          String pass = "";
+          try {
+            pass = FormatUtilities.encryptDecrypt(sys.getProxyPassword(), false);
+          } catch (ServletException e) {
+            log4j.error("Error setting proxy authenticator", e);
+          }
+          final String password = pass;
+
+          // Used for standard http and https connections
+          Authenticator.setDefault(new Authenticator() {
+            @Override
+            protected PasswordAuthentication getPasswordAuthentication() {
+              return new PasswordAuthentication(user, password.toCharArray());
+            }
+          });
+
+          // Used for SOAP webservices
+          System.getProperties().setProperty("http.proxyUser", user);
+          System.getProperties().setProperty("http.proxyPassword", password);
+        }
+      } else {
+        System.getProperties().put("proxySet", false);
+        System.getProperties().remove("http.proxyHost");
+        System.getProperties().remove("http.proxyPort");
+        System.getProperties().remove("https.proxyHost");
+        System.getProperties().remove("https.proxyPort");
+        System.getProperties().remove("http.proxyUser");
+        System.getProperties().remove("http.proxyPassword");
+        System.setProperty("java.net.useSystemProxies", "false");
+      }
+    } finally {
+      OBContext.restorePreviousMode();
     }
+
     try {
       // Double check.
       URL url = new URL("https://butler.openbravo.com");