Merge changes from CR2 branch
authorIván Perdomo <ivan.perdomo@openbravo.com>
Tue, 22 Sep 2009 12:40:41 +0200
changeset 5064 08c0a5cb2c96
parent 4999 2c5ea17a55e0 (current diff)
parent 5063 c2c265800af4 (diff)
child 5065 0982a680f58f
Merge changes from CR2 branch
--- a/src-db/database/model/tables/AD_HEARTBEAT_LOG.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src-db/database/model/tables/AD_HEARTBEAT_LOG.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -117,6 +117,10 @@
         <default><![CDATA[0]]></default>
         <onCreateDefault/>
       </column>
+      <column name="BEAT_TYPE" primaryKey="false" required="false" type="VARCHAR" size="60" autoIncrement="false">
+        <default><![CDATA[U]]></default>
+        <onCreateDefault/>
+      </column>
       <foreign-key foreignTable="AD_CLIENT" name="AD_HEARTBEAT_LOG_AD_CLIENT">
         <reference local="AD_CLIENT_ID" foreign="AD_CLIENT_ID"/>
       </foreign-key>
--- a/src-db/database/sourcedata/AD_COLUMN.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src-db/database/sourcedata/AD_COLUMN.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -243121,11 +243121,11 @@
 <!--1005400224-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--1005400224-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1005400224-->  <NAME><![CDATA[Enable Heartbeat]]></NAME>
-<!--1005400224-->  <DESCRIPTION><![CDATA[Enable/Disable Heartbeat process]]></DESCRIPTION>
-<!--1005400224-->  <HELP><![CDATA[Enable/Disable Heartbeat process]]></HELP>
+<!--1005400224-->  <DESCRIPTION><![CDATA[Disable Heartbeat process]]></DESCRIPTION>
+<!--1005400224-->  <HELP><![CDATA[Disable Heartbeat process]]></HELP>
 <!--1005400224-->  <COLUMNNAME><![CDATA[Isheartbeatactive]]></COLUMNNAME>
 <!--1005400224-->  <AD_TABLE_ID><![CDATA[1005400005]]></AD_TABLE_ID>
-<!--1005400224-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
+<!--1005400224-->  <AD_REFERENCE_ID><![CDATA[28]]></AD_REFERENCE_ID>
 <!--1005400224-->  <FIELDLENGTH><![CDATA[1]]></FIELDLENGTH>
 <!--1005400224-->  <ISKEY><![CDATA[N]]></ISKEY>
 <!--1005400224-->  <ISPARENT><![CDATA[N]]></ISPARENT>
@@ -243137,6 +243137,7 @@
 <!--1005400224-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--1005400224-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
 <!--1005400224-->  <AD_ELEMENT_ID><![CDATA[1005400017]]></AD_ELEMENT_ID>
+<!--1005400224-->  <AD_PROCESS_ID><![CDATA[1005400001]]></AD_PROCESS_ID>
 <!--1005400224-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
 <!--1005400224-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
 <!--1005400224-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
@@ -243814,8 +243815,8 @@
 <!--1005400246-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--1005400246-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1005400246-->  <NAME><![CDATA[Enable Heartbeat]]></NAME>
-<!--1005400246-->  <DESCRIPTION><![CDATA[Enable/Disable Heartbeat process]]></DESCRIPTION>
-<!--1005400246-->  <HELP><![CDATA[Enable/Disable Heartbeat process]]></HELP>
+<!--1005400246-->  <DESCRIPTION><![CDATA[Disable Heartbeat process]]></DESCRIPTION>
+<!--1005400246-->  <HELP><![CDATA[Disable Heartbeat process]]></HELP>
 <!--1005400246-->  <COLUMNNAME><![CDATA[Isheartbeatactive]]></COLUMNNAME>
 <!--1005400246-->  <AD_TABLE_ID><![CDATA[1005400006]]></AD_TABLE_ID>
 <!--1005400246-->  <AD_REFERENCE_ID><![CDATA[20]]></AD_REFERENCE_ID>
@@ -248079,6 +248080,39 @@
 <!--3958F2FE6BD54288B69FF3D175C19480-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
 <!--3958F2FE6BD54288B69FF3D175C19480--></AD_COLUMN>
 
+<!--3A2DB7BEE682477C8A06749FFCF25B26--><AD_COLUMN>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <AD_COLUMN_ID><![CDATA[3A2DB7BEE682477C8A06749FFCF25B26]]></AD_COLUMN_ID>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <NAME><![CDATA[Beat_Type]]></NAME>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <DESCRIPTION><![CDATA[Type of beat]]></DESCRIPTION>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <HELP><![CDATA[The different type of beats: enabling heartbeat, disabling heartbeat, scheduled beat, unknown]]></HELP>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <COLUMNNAME><![CDATA[Beat_Type]]></COLUMNNAME>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <AD_TABLE_ID><![CDATA[1005400006]]></AD_TABLE_ID>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <AD_REFERENCE_ID><![CDATA[17]]></AD_REFERENCE_ID>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <AD_REFERENCE_VALUE_ID><![CDATA[08622CB965B844CFBD2A337BEDB70EFD]]></AD_REFERENCE_VALUE_ID>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <FIELDLENGTH><![CDATA[22]]></FIELDLENGTH>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <DEFAULTVALUE><![CDATA[U]]></DEFAULTVALUE>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISKEY><![CDATA[N]]></ISKEY>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISPARENT><![CDATA[N]]></ISPARENT>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISMANDATORY><![CDATA[N]]></ISMANDATORY>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISUPDATEABLE><![CDATA[Y]]></ISUPDATEABLE>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISIDENTIFIER><![CDATA[N]]></ISIDENTIFIER>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <SEQNO><![CDATA[300]]></SEQNO>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISTRANSLATED><![CDATA[N]]></ISTRANSLATED>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISSELECTIONCOLUMN><![CDATA[N]]></ISSELECTIONCOLUMN>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <AD_ELEMENT_ID><![CDATA[E0AAAEDD15444468A96DDAF14AF227F2]]></AD_ELEMENT_ID>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISSESSIONATTR><![CDATA[N]]></ISSESSIONATTR>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISSECONDARYKEY><![CDATA[N]]></ISSECONDARYKEY>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISDESENCRYPTABLE><![CDATA[N]]></ISDESENCRYPTABLE>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <DEVELOPMENTSTATUS><![CDATA[RE]]></DEVELOPMENTSTATUS>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <POSITION><![CDATA[30]]></POSITION>
+<!--3A2DB7BEE682477C8A06749FFCF25B26-->  <ISTRANSIENT><![CDATA[N]]></ISTRANSIENT>
+<!--3A2DB7BEE682477C8A06749FFCF25B26--></AD_COLUMN>
+
 <!--3B0B06935CE4426AB45EA841B598C5CB--><AD_COLUMN>
 <!--3B0B06935CE4426AB45EA841B598C5CB-->  <AD_COLUMN_ID><![CDATA[3B0B06935CE4426AB45EA841B598C5CB]]></AD_COLUMN_ID>
 <!--3B0B06935CE4426AB45EA841B598C5CB-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src-db/database/sourcedata/AD_ELEMENT.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -21456,8 +21456,8 @@
 <!--1005400017-->  <COLUMNNAME><![CDATA[Isheartbeatactive]]></COLUMNNAME>
 <!--1005400017-->  <NAME><![CDATA[Enable Heartbeat]]></NAME>
 <!--1005400017-->  <PRINTNAME><![CDATA[Enable Heartbeat]]></PRINTNAME>
-<!--1005400017-->  <DESCRIPTION><![CDATA[Enable/Disable Heartbeat process]]></DESCRIPTION>
-<!--1005400017-->  <HELP><![CDATA[Enable/Disable Heartbeat process]]></HELP>
+<!--1005400017-->  <DESCRIPTION><![CDATA[Disable Heartbeat process]]></DESCRIPTION>
+<!--1005400017-->  <HELP><![CDATA[Disable Heartbeat process]]></HELP>
 <!--1005400017-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1005400017--></AD_ELEMENT>
 
@@ -25039,6 +25039,19 @@
 <!--D4CE0D9FD3B146CC8F15295E9F3F7742-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--D4CE0D9FD3B146CC8F15295E9F3F7742--></AD_ELEMENT>
 
+<!--E0AAAEDD15444468A96DDAF14AF227F2--><AD_ELEMENT>
+<!--E0AAAEDD15444468A96DDAF14AF227F2-->  <AD_ELEMENT_ID><![CDATA[E0AAAEDD15444468A96DDAF14AF227F2]]></AD_ELEMENT_ID>
+<!--E0AAAEDD15444468A96DDAF14AF227F2-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--E0AAAEDD15444468A96DDAF14AF227F2-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--E0AAAEDD15444468A96DDAF14AF227F2-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--E0AAAEDD15444468A96DDAF14AF227F2-->  <COLUMNNAME><![CDATA[Beat_Type]]></COLUMNNAME>
+<!--E0AAAEDD15444468A96DDAF14AF227F2-->  <NAME><![CDATA[Type]]></NAME>
+<!--E0AAAEDD15444468A96DDAF14AF227F2-->  <PRINTNAME><![CDATA[Type]]></PRINTNAME>
+<!--E0AAAEDD15444468A96DDAF14AF227F2-->  <DESCRIPTION><![CDATA[Type of beat]]></DESCRIPTION>
+<!--E0AAAEDD15444468A96DDAF14AF227F2-->  <HELP><![CDATA[The different type of beats: enabling heartbeat, disabling heartbeat, scheduled beat, unknown]]></HELP>
+<!--E0AAAEDD15444468A96DDAF14AF227F2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--E0AAAEDD15444468A96DDAF14AF227F2--></AD_ELEMENT>
+
 <!--F6D57D6135DA4C4B9FF73062A73E020E--><AD_ELEMENT>
 <!--F6D57D6135DA4C4B9FF73062A73E020E-->  <AD_ELEMENT_ID><![CDATA[F6D57D6135DA4C4B9FF73062A73E020E]]></AD_ELEMENT_ID>
 <!--F6D57D6135DA4C4B9FF73062A73E020E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_FIELD.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src-db/database/sourcedata/AD_FIELD.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -179136,17 +179136,18 @@
 <!--1005400207-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--1005400207-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--1005400207-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--1005400207-->  <NAME><![CDATA[Enable Heartbeat]]></NAME>
-<!--1005400207-->  <DESCRIPTION><![CDATA[Enable/Disable Heartbeat process]]></DESCRIPTION>
-<!--1005400207-->  <HELP><![CDATA[Enable/Disable Heartbeat process]]></HELP>
-<!--1005400207-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--1005400207-->  <NAME><![CDATA[Disable Heartbeat]]></NAME>
+<!--1005400207-->  <DESCRIPTION><![CDATA[Disable Heartbeat process]]></DESCRIPTION>
+<!--1005400207-->  <HELP><![CDATA[Disable Heartbeat process]]></HELP>
+<!--1005400207-->  <ISCENTRALLYMAINTAINED><![CDATA[N]]></ISCENTRALLYMAINTAINED>
 <!--1005400207-->  <AD_TAB_ID><![CDATA[1005400005]]></AD_TAB_ID>
 <!--1005400207-->  <AD_COLUMN_ID><![CDATA[1005400224]]></AD_COLUMN_ID>
-<!--1005400207-->  <ISDISPLAYED><![CDATA[N]]></ISDISPLAYED>
+<!--1005400207-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--1005400207-->  <DISPLAYLOGIC><![CDATA[@Isheartbeatactive@='']]></DISPLAYLOGIC>
 <!--1005400207-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--1005400207-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1005400207-->  <SEQNO><![CDATA[10]]></SEQNO>
-<!--1005400207-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--1005400207-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--1005400207-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--1005400207-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1005400207-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
 <!--1005400207-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
@@ -179168,7 +179169,7 @@
 <!--1005400208-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--1005400208-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--1005400208-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1005400208-->  <SEQNO><![CDATA[20]]></SEQNO>
+<!--1005400208-->  <SEQNO><![CDATA[10]]></SEQNO>
 <!--1005400208-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--1005400208-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1005400208-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -179255,7 +179256,7 @@
 <!--1005400212-->  <DISPLAYLOGIC><![CDATA[@Isheartbeatactive@='Y' & @Isproxyrequired@='Y']]></DISPLAYLOGIC>
 <!--1005400212-->  <DISPLAYLENGTH><![CDATA[6]]></DISPLAYLENGTH>
 <!--1005400212-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1005400212-->  <SEQNO><![CDATA[40]]></SEQNO>
+<!--1005400212-->  <SEQNO><![CDATA[30]]></SEQNO>
 <!--1005400212-->  <ISSAMELINE><![CDATA[Y]]></ISSAMELINE>
 <!--1005400212-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1005400212-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -179278,7 +179279,7 @@
 <!--1005400213-->  <DISPLAYLOGIC><![CDATA[@Isheartbeatactive@='Y' & @Isproxyrequired@='Y']]></DISPLAYLOGIC>
 <!--1005400213-->  <DISPLAYLENGTH><![CDATA[40]]></DISPLAYLENGTH>
 <!--1005400213-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1005400213-->  <SEQNO><![CDATA[30]]></SEQNO>
+<!--1005400213-->  <SEQNO><![CDATA[20]]></SEQNO>
 <!--1005400213-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1005400213-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1005400213-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -179362,7 +179363,7 @@
 <!--1005400217-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
 <!--1005400217-->  <DISPLAYLENGTH><![CDATA[1]]></DISPLAYLENGTH>
 <!--1005400217-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
-<!--1005400217-->  <SEQNO><![CDATA[50]]></SEQNO>
+<!--1005400217-->  <SEQNO><![CDATA[40]]></SEQNO>
 <!--1005400217-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
 <!--1005400217-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
 <!--1005400217-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
@@ -179547,8 +179548,8 @@
 <!--1005400226-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--1005400226-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1005400226-->  <NAME><![CDATA[Enable Heartbeat]]></NAME>
-<!--1005400226-->  <DESCRIPTION><![CDATA[Enable/Disable Heartbeat process]]></DESCRIPTION>
-<!--1005400226-->  <HELP><![CDATA[Enable/Disable Heartbeat process]]></HELP>
+<!--1005400226-->  <DESCRIPTION><![CDATA[Disable Heartbeat process]]></DESCRIPTION>
+<!--1005400226-->  <HELP><![CDATA[Disable Heartbeat process]]></HELP>
 <!--1005400226-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--1005400226-->  <AD_TAB_ID><![CDATA[1005400006]]></AD_TAB_ID>
 <!--1005400226-->  <AD_COLUMN_ID><![CDATA[1005400246]]></AD_COLUMN_ID>
@@ -181765,6 +181766,29 @@
 <!--0FA519FEA8DA4E0296A97C29B485553C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--0FA519FEA8DA4E0296A97C29B485553C--></AD_FIELD>
 
+<!--10F44D767CA9479B9061C09E0E52EA3E--><AD_FIELD>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <AD_FIELD_ID><![CDATA[10F44D767CA9479B9061C09E0E52EA3E]]></AD_FIELD_ID>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <NAME><![CDATA[Type]]></NAME>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <DESCRIPTION><![CDATA[Type of beat]]></DESCRIPTION>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <HELP><![CDATA[The different type of beats: enabling heartbeat, disabling heartbeat, scheduled beat, unknown]]></HELP>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <AD_TAB_ID><![CDATA[1005400006]]></AD_TAB_ID>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <AD_COLUMN_ID><![CDATA[3A2DB7BEE682477C8A06749FFCF25B26]]></AD_COLUMN_ID>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <ISDISPLAYED><![CDATA[Y]]></ISDISPLAYED>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <DISPLAYLENGTH><![CDATA[22]]></DISPLAYLENGTH>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <ISREADONLY><![CDATA[N]]></ISREADONLY>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <SEQNO><![CDATA[220]]></SEQNO>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <ISSAMELINE><![CDATA[N]]></ISSAMELINE>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <ISFIELDONLY><![CDATA[N]]></ISFIELDONLY>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <ISENCRYPTED><![CDATA[N]]></ISENCRYPTED>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <SHOWINRELATION><![CDATA[Y]]></SHOWINRELATION>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <ISFIRSTFOCUSEDFIELD><![CDATA[N]]></ISFIRSTFOCUSEDFIELD>
+<!--10F44D767CA9479B9061C09E0E52EA3E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--10F44D767CA9479B9061C09E0E52EA3E--></AD_FIELD>
+
 <!--144BA73E9B6811DD8ADD0016D4C601F7--><AD_FIELD>
 <!--144BA73E9B6811DD8ADD0016D4C601F7-->  <AD_FIELD_ID><![CDATA[144BA73E9B6811DD8ADD0016D4C601F7]]></AD_FIELD_ID>
 <!--144BA73E9B6811DD8ADD0016D4C601F7-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -190019,9 +190043,8 @@
 <!--5BE1B2D550290FD2E040007F01016C74-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--5BE1B2D550290FD2E040007F01016C74-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--5BE1B2D550290FD2E040007F01016C74-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--5BE1B2D550290FD2E040007F01016C74-->  <NAME><![CDATA[Enable Heartbeat]]></NAME>
-<!--5BE1B2D550290FD2E040007F01016C74-->  <DESCRIPTION><![CDATA[Enable/Disable Heartbeat process]]></DESCRIPTION>
-<!--5BE1B2D550290FD2E040007F01016C74-->  <HELP><![CDATA[Enable/Disable Heartbeat process]]></HELP>
+<!--5BE1B2D550290FD2E040007F01016C74-->  <NAME><![CDATA[TestHeartbeat]]></NAME>
+<!--5BE1B2D550290FD2E040007F01016C74-->  <DESCRIPTION><![CDATA[Test the Heartbeat Configuration]]></DESCRIPTION>
 <!--5BE1B2D550290FD2E040007F01016C74-->  <ISCENTRALLYMAINTAINED><![CDATA[Y]]></ISCENTRALLYMAINTAINED>
 <!--5BE1B2D550290FD2E040007F01016C74-->  <AD_TAB_ID><![CDATA[8652BB9E40664869A5132CEB8A907B9B]]></AD_TAB_ID>
 <!--5BE1B2D550290FD2E040007F01016C74-->  <AD_COLUMN_ID><![CDATA[1005400224]]></AD_COLUMN_ID>
--- a/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src-db/database/sourcedata/AD_MESSAGE.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -61653,11 +61653,13 @@
 <!--1005800002-->  <VALUE><![CDATA[HB_WELCOME]]></VALUE>
 <!--1005800002-->  <MSGTEXT><![CDATA[Welcome to Openbravo ERP!
 
-To help us improve the software quality and understand its worldwide use, we invite you to configure the Heartbeat. This tool sends Openbravo periodic updates regarding your technical system specifications (e.g. Operating System, Database, and ERP Version). See Help window in Heartbeat Configuration page for information on data processing.
+To help us improve the software quality and understand its worldwide use, we invite you to configure the Heartbeat. This tool sends Openbravo periodic updates regarding your technical system specifications (e.g. Operating System, Database, and ERP Version). See Help window in Heartbeat Configuration page for information on data processing. You can disable this feature from that window.
 
 To say thanks, configuring the Heartbeat will automatically notify you about specific updates to your installation via an alert (e.g. Openbravo patches, new versions tested with your database).
 
-Thank you for downloading and supporting our open source ERP.]]></MSGTEXT>
+Thank you for downloading and supporting our open source ERP.
+
+Do you want to enable the Heartbeat and continue?]]></MSGTEXT>
 <!--1005800002-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
 <!--1005800002-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1005800002--></AD_MESSAGE>
@@ -63292,6 +63294,17 @@
 <!--0EABAB89726A4A3C800199142CF8E17F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--0EABAB89726A4A3C800199142CF8E17F--></AD_MESSAGE>
 
+<!--10E779E8F227496B86B3136A09EB6043--><AD_MESSAGE>
+<!--10E779E8F227496B86B3136A09EB6043-->  <AD_MESSAGE_ID><![CDATA[10E779E8F227496B86B3136A09EB6043]]></AD_MESSAGE_ID>
+<!--10E779E8F227496B86B3136A09EB6043-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--10E779E8F227496B86B3136A09EB6043-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--10E779E8F227496B86B3136A09EB6043-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--10E779E8F227496B86B3136A09EB6043-->  <VALUE><![CDATA[CR_OBXGetNotAuthorized]]></VALUE>
+<!--10E779E8F227496B86B3136A09EB6043-->  <MSGTEXT><![CDATA[This instance has not a license for this commercial module.]]></MSGTEXT>
+<!--10E779E8F227496B86B3136A09EB6043-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--10E779E8F227496B86B3136A09EB6043-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--10E779E8F227496B86B3136A09EB6043--></AD_MESSAGE>
+
 <!--11314163807C4401B2964F93256597EA--><AD_MESSAGE>
 <!--11314163807C4401B2964F93256597EA-->  <AD_MESSAGE_ID><![CDATA[11314163807C4401B2964F93256597EA]]></AD_MESSAGE_ID>
 <!--11314163807C4401B2964F93256597EA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -63514,6 +63527,25 @@
 <!--2413C331A08B4F3F98FC3F9A0F2A636C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--2413C331A08B4F3F98FC3F9A0F2A636C--></AD_MESSAGE>
 
+<!--272961BF12DB4930A0F8EDDADE8827CA--><AD_MESSAGE>
+<!--272961BF12DB4930A0F8EDDADE8827CA-->  <AD_MESSAGE_ID><![CDATA[272961BF12DB4930A0F8EDDADE8827CA]]></AD_MESSAGE_ID>
+<!--272961BF12DB4930A0F8EDDADE8827CA-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--272961BF12DB4930A0F8EDDADE8827CA-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--272961BF12DB4930A0F8EDDADE8827CA-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--272961BF12DB4930A0F8EDDADE8827CA-->  <VALUE><![CDATA[HB_WELCOME_MODULE]]></VALUE>
+<!--272961BF12DB4930A0F8EDDADE8827CA-->  <MSGTEXT><![CDATA[The Heartbeat is disabled in this Openbravo ERP instance.
+
+To help us improve the software quality and understand its worldwide use, we invite you to configure the Heartbeat before you install or update extension modules. This tool sends Openbravo periodic updates regarding your technical system specifications (e.g. Operating System, Database, and ERP Version). See Help window in Heartbeat Configuration page for information on data processing.
+
+To say thanks, configuring the Heartbeat will automatically notify you about specific updates to your installation via an alert (e.g. Openbravo patches, new versions tested with your database).
+
+Thank you for downloading and supporting our open source ERP.
+
+Do you want to enable the Heartbeat and continue?]]></MSGTEXT>
+<!--272961BF12DB4930A0F8EDDADE8827CA-->  <MSGTYPE><![CDATA[I]]></MSGTYPE>
+<!--272961BF12DB4930A0F8EDDADE8827CA-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--272961BF12DB4930A0F8EDDADE8827CA--></AD_MESSAGE>
+
 <!--2ADD7BAB84FF44F8BA55C270DC4F7F41--><AD_MESSAGE>
 <!--2ADD7BAB84FF44F8BA55C270DC4F7F41-->  <AD_MESSAGE_ID><![CDATA[2ADD7BAB84FF44F8BA55C270DC4F7F41]]></AD_MESSAGE_ID>
 <!--2ADD7BAB84FF44F8BA55C270DC4F7F41-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -63536,6 +63568,17 @@
 <!--2E175A7785AD4313B24D3E9034B05BAD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--2E175A7785AD4313B24D3E9034B05BAD--></AD_MESSAGE>
 
+<!--2E658610941946F58CA77F17F6095E89--><AD_MESSAGE>
+<!--2E658610941946F58CA77F17F6095E89-->  <AD_MESSAGE_ID><![CDATA[2E658610941946F58CA77F17F6095E89]]></AD_MESSAGE_ID>
+<!--2E658610941946F58CA77F17F6095E89-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--2E658610941946F58CA77F17F6095E89-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--2E658610941946F58CA77F17F6095E89-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--2E658610941946F58CA77F17F6095E89-->  <VALUE><![CDATA[ErrorDownloadingOBX]]></VALUE>
+<!--2E658610941946F58CA77F17F6095E89-->  <MSGTEXT><![CDATA[An error occurred when downloading the OBX file.]]></MSGTEXT>
+<!--2E658610941946F58CA77F17F6095E89-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--2E658610941946F58CA77F17F6095E89-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--2E658610941946F58CA77F17F6095E89--></AD_MESSAGE>
+
 <!--2EB6F2EE079E41C3A9E416768353105F--><AD_MESSAGE>
 <!--2EB6F2EE079E41C3A9E416768353105F-->  <AD_MESSAGE_ID><![CDATA[2EB6F2EE079E41C3A9E416768353105F]]></AD_MESSAGE_ID>
 <!--2EB6F2EE079E41C3A9E416768353105F-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -64631,6 +64674,17 @@
 <!--BDBAEDC585EA4D06BACC9E2469003E4F-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--BDBAEDC585EA4D06BACC9E2469003E4F--></AD_MESSAGE>
 
+<!--BF73CD95240B43239E7C8F7BD83E03D5--><AD_MESSAGE>
+<!--BF73CD95240B43239E7C8F7BD83E03D5-->  <AD_MESSAGE_ID><![CDATA[BF73CD95240B43239E7C8F7BD83E03D5]]></AD_MESSAGE_ID>
+<!--BF73CD95240B43239E7C8F7BD83E03D5-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--BF73CD95240B43239E7C8F7BD83E03D5-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--BF73CD95240B43239E7C8F7BD83E03D5-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--BF73CD95240B43239E7C8F7BD83E03D5-->  <VALUE><![CDATA[NotCommercialModulesAllowed]]></VALUE>
+<!--BF73CD95240B43239E7C8F7BD83E03D5-->  <MSGTEXT><![CDATA[Commercial modules installation is not allowed in a Community Edition Instance.]]></MSGTEXT>
+<!--BF73CD95240B43239E7C8F7BD83E03D5-->  <MSGTYPE><![CDATA[E]]></MSGTYPE>
+<!--BF73CD95240B43239E7C8F7BD83E03D5-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--BF73CD95240B43239E7C8F7BD83E03D5--></AD_MESSAGE>
+
 <!--BFB1B3D4C3994CD78DA498EF0DC1E00C--><AD_MESSAGE>
 <!--BFB1B3D4C3994CD78DA498EF0DC1E00C-->  <AD_MESSAGE_ID><![CDATA[BFB1B3D4C3994CD78DA498EF0DC1E00C]]></AD_MESSAGE_ID>
 <!--BFB1B3D4C3994CD78DA498EF0DC1E00C-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_REFERENCE.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src-db/database/sourcedata/AD_REFERENCE.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -3328,6 +3328,18 @@
 <!--1005900000-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1005900000--></AD_REFERENCE>
 
+<!--08622CB965B844CFBD2A337BEDB70EFD--><AD_REFERENCE>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <AD_REFERENCE_ID><![CDATA[08622CB965B844CFBD2A337BEDB70EFD]]></AD_REFERENCE_ID>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <NAME><![CDATA[AD_Heartbeat - Type of beat]]></NAME>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <DESCRIPTION><![CDATA[Types of beats]]></DESCRIPTION>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <HELP><![CDATA[Types of beats: When enabling, disabling the process, a scheduled beat, or unknown (old beats)]]></HELP>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
+<!--08622CB965B844CFBD2A337BEDB70EFD-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--08622CB965B844CFBD2A337BEDB70EFD--></AD_REFERENCE>
+
 <!--1722C8B5D1BC4B349332167C3E3A4561--><AD_REFERENCE>
 <!--1722C8B5D1BC4B349332167C3E3A4561-->  <AD_REFERENCE_ID><![CDATA[1722C8B5D1BC4B349332167C3E3A4561]]></AD_REFERENCE_ID>
 <!--1722C8B5D1BC4B349332167C3E3A4561-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -3515,7 +3527,7 @@
 <!--AD93286C917A4A74BE5898FD0158100A-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
 <!--AD93286C917A4A74BE5898FD0158100A-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
 <!--AD93286C917A4A74BE5898FD0158100A-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
-<!--AD93286C917A4A74BE5898FD0158100A-->  <NAME><![CDATA[AD_Heartbeat status]]></NAME>
+<!--AD93286C917A4A74BE5898FD0158100A-->  <NAME><![CDATA[AD_Heartbeat - Status]]></NAME>
 <!--AD93286C917A4A74BE5898FD0158100A-->  <DESCRIPTION><![CDATA[Heartbeat status]]></DESCRIPTION>
 <!--AD93286C917A4A74BE5898FD0158100A-->  <VALIDATIONTYPE><![CDATA[L]]></VALIDATIONTYPE>
 <!--AD93286C917A4A74BE5898FD0158100A-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
--- a/src-db/database/sourcedata/AD_REF_LIST.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src-db/database/sourcedata/AD_REF_LIST.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -8205,6 +8205,18 @@
 <!--0441FC8D3AF44718987A572F5B92AA28-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--0441FC8D3AF44718987A572F5B92AA28--></AD_REF_LIST>
 
+<!--0D7FF4CBD848492490B37032EF534E73--><AD_REF_LIST>
+<!--0D7FF4CBD848492490B37032EF534E73-->  <AD_REF_LIST_ID><![CDATA[0D7FF4CBD848492490B37032EF534E73]]></AD_REF_LIST_ID>
+<!--0D7FF4CBD848492490B37032EF534E73-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--0D7FF4CBD848492490B37032EF534E73-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--0D7FF4CBD848492490B37032EF534E73-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--0D7FF4CBD848492490B37032EF534E73-->  <VALUE><![CDATA[D]]></VALUE>
+<!--0D7FF4CBD848492490B37032EF534E73-->  <NAME><![CDATA[Disabling heartbeat]]></NAME>
+<!--0D7FF4CBD848492490B37032EF534E73-->  <DESCRIPTION><![CDATA[Used when disabling the process]]></DESCRIPTION>
+<!--0D7FF4CBD848492490B37032EF534E73-->  <AD_REFERENCE_ID><![CDATA[08622CB965B844CFBD2A337BEDB70EFD]]></AD_REFERENCE_ID>
+<!--0D7FF4CBD848492490B37032EF534E73-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--0D7FF4CBD848492490B37032EF534E73--></AD_REF_LIST>
+
 <!--0DB8E1CC78C641CE9FB3810F600456ED--><AD_REF_LIST>
 <!--0DB8E1CC78C641CE9FB3810F600456ED-->  <AD_REF_LIST_ID><![CDATA[0DB8E1CC78C641CE9FB3810F600456ED]]></AD_REF_LIST_ID>
 <!--0DB8E1CC78C641CE9FB3810F600456ED-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8568,6 +8580,18 @@
 <!--58C82EFABC4743808AD3F7AAD6CCE6A2-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--58C82EFABC4743808AD3F7AAD6CCE6A2--></AD_REF_LIST>
 
+<!--64C6D708C7A24307B7856F3AE9D90C9E--><AD_REF_LIST>
+<!--64C6D708C7A24307B7856F3AE9D90C9E-->  <AD_REF_LIST_ID><![CDATA[64C6D708C7A24307B7856F3AE9D90C9E]]></AD_REF_LIST_ID>
+<!--64C6D708C7A24307B7856F3AE9D90C9E-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--64C6D708C7A24307B7856F3AE9D90C9E-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--64C6D708C7A24307B7856F3AE9D90C9E-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--64C6D708C7A24307B7856F3AE9D90C9E-->  <VALUE><![CDATA[U]]></VALUE>
+<!--64C6D708C7A24307B7856F3AE9D90C9E-->  <NAME><![CDATA[Unknown]]></NAME>
+<!--64C6D708C7A24307B7856F3AE9D90C9E-->  <DESCRIPTION><![CDATA[Unknown type of beat (used for old beats)]]></DESCRIPTION>
+<!--64C6D708C7A24307B7856F3AE9D90C9E-->  <AD_REFERENCE_ID><![CDATA[08622CB965B844CFBD2A337BEDB70EFD]]></AD_REFERENCE_ID>
+<!--64C6D708C7A24307B7856F3AE9D90C9E-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--64C6D708C7A24307B7856F3AE9D90C9E--></AD_REF_LIST>
+
 <!--67DBE8572B63495B94918D02D9CFDEAC--><AD_REF_LIST>
 <!--67DBE8572B63495B94918D02D9CFDEAC-->  <AD_REF_LIST_ID><![CDATA[67DBE8572B63495B94918D02D9CFDEAC]]></AD_REF_LIST_ID>
 <!--67DBE8572B63495B94918D02D9CFDEAC-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -8984,6 +9008,18 @@
 <!--CD661B8E4FDD40519CC8B1B6ADE0FDC1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--CD661B8E4FDD40519CC8B1B6ADE0FDC1--></AD_REF_LIST>
 
+<!--CD8A322D6D054CF39318D03F4CB50B34--><AD_REF_LIST>
+<!--CD8A322D6D054CF39318D03F4CB50B34-->  <AD_REF_LIST_ID><![CDATA[CD8A322D6D054CF39318D03F4CB50B34]]></AD_REF_LIST_ID>
+<!--CD8A322D6D054CF39318D03F4CB50B34-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--CD8A322D6D054CF39318D03F4CB50B34-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--CD8A322D6D054CF39318D03F4CB50B34-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--CD8A322D6D054CF39318D03F4CB50B34-->  <VALUE><![CDATA[S]]></VALUE>
+<!--CD8A322D6D054CF39318D03F4CB50B34-->  <NAME><![CDATA[Scheduled beat]]></NAME>
+<!--CD8A322D6D054CF39318D03F4CB50B34-->  <DESCRIPTION><![CDATA[Used by the process to report a scheduled beat]]></DESCRIPTION>
+<!--CD8A322D6D054CF39318D03F4CB50B34-->  <AD_REFERENCE_ID><![CDATA[08622CB965B844CFBD2A337BEDB70EFD]]></AD_REFERENCE_ID>
+<!--CD8A322D6D054CF39318D03F4CB50B34-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--CD8A322D6D054CF39318D03F4CB50B34--></AD_REF_LIST>
+
 <!--CE61672A727941959F8F8213B3A40494--><AD_REF_LIST>
 <!--CE61672A727941959F8F8213B3A40494-->  <AD_REF_LIST_ID><![CDATA[CE61672A727941959F8F8213B3A40494]]></AD_REF_LIST_ID>
 <!--CE61672A727941959F8F8213B3A40494-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -9112,6 +9148,18 @@
 <!--E613BFBE3D53433292816FE4BEE9B15D-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--E613BFBE3D53433292816FE4BEE9B15D--></AD_REF_LIST>
 
+<!--EA7231981AC74EBD97ADAD008C0C5530--><AD_REF_LIST>
+<!--EA7231981AC74EBD97ADAD008C0C5530-->  <AD_REF_LIST_ID><![CDATA[EA7231981AC74EBD97ADAD008C0C5530]]></AD_REF_LIST_ID>
+<!--EA7231981AC74EBD97ADAD008C0C5530-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--EA7231981AC74EBD97ADAD008C0C5530-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--EA7231981AC74EBD97ADAD008C0C5530-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--EA7231981AC74EBD97ADAD008C0C5530-->  <VALUE><![CDATA[E]]></VALUE>
+<!--EA7231981AC74EBD97ADAD008C0C5530-->  <NAME><![CDATA[Enabling heartbeat]]></NAME>
+<!--EA7231981AC74EBD97ADAD008C0C5530-->  <DESCRIPTION><![CDATA[Used when enabling the process]]></DESCRIPTION>
+<!--EA7231981AC74EBD97ADAD008C0C5530-->  <AD_REFERENCE_ID><![CDATA[08622CB965B844CFBD2A337BEDB70EFD]]></AD_REFERENCE_ID>
+<!--EA7231981AC74EBD97ADAD008C0C5530-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--EA7231981AC74EBD97ADAD008C0C5530--></AD_REF_LIST>
+
 <!--ECD5FC9FD4144BE9A47244360CA3321D--><AD_REF_LIST>
 <!--ECD5FC9FD4144BE9A47244360CA3321D-->  <AD_REF_LIST_ID><![CDATA[ECD5FC9FD4144BE9A47244360CA3321D]]></AD_REF_LIST_ID>
 <!--ECD5FC9FD4144BE9A47244360CA3321D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src-db/database/sourcedata/AD_TEXTINTERFACES.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -20435,7 +20435,7 @@
 <!--1005400013-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1005400013-->  <TEXT><![CDATA[Configure]]></TEXT>
 <!--1005400013-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/Heartbeat.html]]></FILENAME>
-<!--1005400013-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--1005400013-->  <ISUSED><![CDATA[N]]></ISUSED>
 <!--1005400013-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1005400013--></AD_TEXTINTERFACES>
 
@@ -20457,7 +20457,7 @@
 <!--1005400015-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1005400015-->  <TEXT><![CDATA[Disable]]></TEXT>
 <!--1005400015-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/Heartbeat.html]]></FILENAME>
-<!--1005400015-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--1005400015-->  <ISUSED><![CDATA[N]]></ISUSED>
 <!--1005400015-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1005400015--></AD_TEXTINTERFACES>
 
@@ -20468,7 +20468,7 @@
 <!--1005400016-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
 <!--1005400016-->  <TEXT><![CDATA[Later]]></TEXT>
 <!--1005400016-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/Heartbeat.html]]></FILENAME>
-<!--1005400016-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--1005400016-->  <ISUSED><![CDATA[N]]></ISUSED>
 <!--1005400016-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1005400016--></AD_TEXTINTERFACES>
 
@@ -21945,6 +21945,17 @@
 <!--1BA2D3538589464DBA2858B42E69A945-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--1BA2D3538589464DBA2858B42E69A945--></AD_TEXTINTERFACES>
 
+<!--1CA4C30E66274ABA8D6F50EC868560F1--><AD_TEXTINTERFACES>
+<!--1CA4C30E66274ABA8D6F50EC868560F1-->  <AD_TEXTINTERFACES_ID><![CDATA[1CA4C30E66274ABA8D6F50EC868560F1]]></AD_TEXTINTERFACES_ID>
+<!--1CA4C30E66274ABA8D6F50EC868560F1-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--1CA4C30E66274ABA8D6F50EC868560F1-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--1CA4C30E66274ABA8D6F50EC868560F1-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--1CA4C30E66274ABA8D6F50EC868560F1-->  <TEXT><![CDATA[Continue]]></TEXT>
+<!--1CA4C30E66274ABA8D6F50EC868560F1-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/Heartbeat.html]]></FILENAME>
+<!--1CA4C30E66274ABA8D6F50EC868560F1-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--1CA4C30E66274ABA8D6F50EC868560F1-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--1CA4C30E66274ABA8D6F50EC868560F1--></AD_TEXTINTERFACES>
+
 <!--1F6A906C2E5211DEA13517F5229BDBE0--><AD_TEXTINTERFACES>
 <!--1F6A906C2E5211DEA13517F5229BDBE0-->  <AD_TEXTINTERFACES_ID><![CDATA[1F6A906C2E5211DEA13517F5229BDBE0]]></AD_TEXTINTERFACES_ID>
 <!--1F6A906C2E5211DEA13517F5229BDBE0-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -26618,6 +26629,83 @@
 <!--6E961D44DEFA3D3DE040007F0101642C-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--6E961D44DEFA3D3DE040007F0101642C--></AD_TEXTINTERFACES>
 
+<!--73C151932148B2ADE040007F01014A22--><AD_TEXTINTERFACES>
+<!--73C151932148B2ADE040007F01014A22-->  <AD_TEXTINTERFACES_ID><![CDATA[73C151932148B2ADE040007F01014A22]]></AD_TEXTINTERFACES_ID>
+<!--73C151932148B2ADE040007F01014A22-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--73C151932148B2ADE040007F01014A22-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--73C151932148B2ADE040007F01014A22-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--73C151932148B2ADE040007F01014A22-->  <TEXT><![CDATA[Install Modules]]></TEXT>
+<!--73C151932148B2ADE040007F01014A22-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html]]></FILENAME>
+<!--73C151932148B2ADE040007F01014A22-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--73C151932148B2ADE040007F01014A22-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--73C151932148B2ADE040007F01014A22--></AD_TEXTINTERFACES>
+
+<!--73C151932149B2ADE040007F01014A22--><AD_TEXTINTERFACES>
+<!--73C151932149B2ADE040007F01014A22-->  <AD_TEXTINTERFACES_ID><![CDATA[73C151932149B2ADE040007F01014A22]]></AD_TEXTINTERFACES_ID>
+<!--73C151932149B2ADE040007F01014A22-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--73C151932149B2ADE040007F01014A22-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--73C151932149B2ADE040007F01014A22-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--73C151932149B2ADE040007F01014A22-->  <TEXT><![CDATA[ is released under a commercial license that requires acquiring an activation key before installation.]]></TEXT>
+<!--73C151932149B2ADE040007F01014A22-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html]]></FILENAME>
+<!--73C151932149B2ADE040007F01014A22-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--73C151932149B2ADE040007F01014A22-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--73C151932149B2ADE040007F01014A22--></AD_TEXTINTERFACES>
+
+<!--73C15193214AB2ADE040007F01014A22--><AD_TEXTINTERFACES>
+<!--73C15193214AB2ADE040007F01014A22-->  <AD_TEXTINTERFACES_ID><![CDATA[73C15193214AB2ADE040007F01014A22]]></AD_TEXTINTERFACES_ID>
+<!--73C15193214AB2ADE040007F01014A22-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--73C15193214AB2ADE040007F01014A22-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--73C15193214AB2ADE040007F01014A22-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--73C15193214AB2ADE040007F01014A22-->  <TEXT><![CDATA[Learn how]]></TEXT>
+<!--73C15193214AB2ADE040007F01014A22-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html]]></FILENAME>
+<!--73C15193214AB2ADE040007F01014A22-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--73C15193214AB2ADE040007F01014A22-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--73C15193214AB2ADE040007F01014A22--></AD_TEXTINTERFACES>
+
+<!--73C15193214BB2ADE040007F01014A22--><AD_TEXTINTERFACES>
+<!--73C15193214BB2ADE040007F01014A22-->  <AD_TEXTINTERFACES_ID><![CDATA[73C15193214BB2ADE040007F01014A22]]></AD_TEXTINTERFACES_ID>
+<!--73C15193214BB2ADE040007F01014A22-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--73C15193214BB2ADE040007F01014A22-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--73C15193214BB2ADE040007F01014A22-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--73C15193214BB2ADE040007F01014A22-->  <TEXT><![CDATA[ to acquire and activate commercial modules.]]></TEXT>
+<!--73C15193214BB2ADE040007F01014A22-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html]]></FILENAME>
+<!--73C15193214BB2ADE040007F01014A22-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--73C15193214BB2ADE040007F01014A22-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--73C15193214BB2ADE040007F01014A22--></AD_TEXTINTERFACES>
+
+<!--73C15193214CB2ADE040007F01014A22--><AD_TEXTINTERFACES>
+<!--73C15193214CB2ADE040007F01014A22-->  <AD_TEXTINTERFACES_ID><![CDATA[73C15193214CB2ADE040007F01014A22]]></AD_TEXTINTERFACES_ID>
+<!--73C15193214CB2ADE040007F01014A22-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--73C15193214CB2ADE040007F01014A22-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--73C15193214CB2ADE040007F01014A22-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--73C15193214CB2ADE040007F01014A22-->  <TEXT><![CDATA[ is a commercial module that requires a subscription to an Openbravo Professional Edition.]]></TEXT>
+<!--73C15193214CB2ADE040007F01014A22-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html]]></FILENAME>
+<!--73C15193214CB2ADE040007F01014A22-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--73C15193214CB2ADE040007F01014A22-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--73C15193214CB2ADE040007F01014A22--></AD_TEXTINTERFACES>
+
+<!--73C15193214DB2ADE040007F01014A22--><AD_TEXTINTERFACES>
+<!--73C15193214DB2ADE040007F01014A22-->  <AD_TEXTINTERFACES_ID><![CDATA[73C15193214DB2ADE040007F01014A22]]></AD_TEXTINTERFACES_ID>
+<!--73C15193214DB2ADE040007F01014A22-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--73C15193214DB2ADE040007F01014A22-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--73C15193214DB2ADE040007F01014A22-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--73C15193214DB2ADE040007F01014A22-->  <TEXT><![CDATA[ to acquire and activate your subscription.]]></TEXT>
+<!--73C15193214DB2ADE040007F01014A22-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html]]></FILENAME>
+<!--73C15193214DB2ADE040007F01014A22-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--73C15193214DB2ADE040007F01014A22-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--73C15193214DB2ADE040007F01014A22--></AD_TEXTINTERFACES>
+
+<!--73C15193214EB2ADE040007F01014A22--><AD_TEXTINTERFACES>
+<!--73C15193214EB2ADE040007F01014A22-->  <AD_TEXTINTERFACES_ID><![CDATA[73C15193214EB2ADE040007F01014A22]]></AD_TEXTINTERFACES_ID>
+<!--73C15193214EB2ADE040007F01014A22-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--73C15193214EB2ADE040007F01014A22-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--73C15193214EB2ADE040007F01014A22-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--73C15193214EB2ADE040007F01014A22-->  <TEXT><![CDATA[Close]]></TEXT>
+<!--73C15193214EB2ADE040007F01014A22-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html]]></FILENAME>
+<!--73C15193214EB2ADE040007F01014A22-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--73C15193214EB2ADE040007F01014A22-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--73C15193214EB2ADE040007F01014A22--></AD_TEXTINTERFACES>
+
 <!--788BFEB299DB11DDA986001B388C61A4--><AD_TEXTINTERFACES>
 <!--788BFEB299DB11DDA986001B388C61A4-->  <AD_TEXTINTERFACES_ID><![CDATA[788BFEB299DB11DDA986001B388C61A4]]></AD_TEXTINTERFACES_ID>
 <!--788BFEB299DB11DDA986001B388C61A4-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
@@ -27265,6 +27353,17 @@
 <!--E76C696EF9D211DD98162F8F330D81D6-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
 <!--E76C696EF9D211DD98162F8F330D81D6--></AD_TEXTINTERFACES>
 
+<!--EE07D8FD2D5C406B83CD909147485422--><AD_TEXTINTERFACES>
+<!--EE07D8FD2D5C406B83CD909147485422-->  <AD_TEXTINTERFACES_ID><![CDATA[EE07D8FD2D5C406B83CD909147485422]]></AD_TEXTINTERFACES_ID>
+<!--EE07D8FD2D5C406B83CD909147485422-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
+<!--EE07D8FD2D5C406B83CD909147485422-->  <AD_ORG_ID><![CDATA[0]]></AD_ORG_ID>
+<!--EE07D8FD2D5C406B83CD909147485422-->  <ISACTIVE><![CDATA[Y]]></ISACTIVE>
+<!--EE07D8FD2D5C406B83CD909147485422-->  <TEXT><![CDATA[Heartbeat Configuration]]></TEXT>
+<!--EE07D8FD2D5C406B83CD909147485422-->  <FILENAME><![CDATA[/org/openbravo/erpCommon/ad_process/HeartbeatRedirect.html]]></FILENAME>
+<!--EE07D8FD2D5C406B83CD909147485422-->  <ISUSED><![CDATA[Y]]></ISUSED>
+<!--EE07D8FD2D5C406B83CD909147485422-->  <AD_MODULE_ID><![CDATA[0]]></AD_MODULE_ID>
+<!--EE07D8FD2D5C406B83CD909147485422--></AD_TEXTINTERFACES>
+
 <!--F38A36D2A59911DDA5829BF7FFA4945D--><AD_TEXTINTERFACES>
 <!--F38A36D2A59911DDA5829BF7FFA4945D-->  <AD_TEXTINTERFACES_ID><![CDATA[F38A36D2A59911DDA5829BF7FFA4945D]]></AD_TEXTINTERFACES_ID>
 <!--F38A36D2A59911DDA5829BF7FFA4945D-->  <AD_CLIENT_ID><![CDATA[0]]></AD_CLIENT_ID>
--- a/src-test/org/openbravo/test/dal/DalTest.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src-test/org/openbravo/test/dal/DalTest.java	Tue Sep 22 12:40:41 2009 +0200
@@ -30,6 +30,7 @@
 import org.openbravo.dal.core.SessionHandler;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.model.ad.system.SystemInformation;
 import org.openbravo.model.common.businesspartner.Category;
 import org.openbravo.model.common.businesspartner.CategoryAccounts;
 import org.openbravo.model.common.currency.Currency;
@@ -51,6 +52,27 @@
   private static final Logger log = Logger.getLogger(DalTest.class);
 
   /**
+   * Test to assert save false in a null char(1) column - Part I
+   */
+  public void testSaveBooleanValue1() {
+    setUserContext("0");
+    SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class, "0");
+    if (sysInfo.isEnableHeartbeat() == null) {
+      sysInfo.setEnableHeartbeat(false);
+    }
+    OBDal.getInstance().save(sysInfo);
+  }
+
+  /**
+   * Test to assert save false in a null char(1) column - Part II
+   */
+  public void testSaveBooleanValue2() {
+    setUserContext("0");
+    SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class, "0");
+    assertTrue(sysInfo.isEnableHeartbeat() != null);
+  }
+
+  /**
    * Test creates a {@link Category}, test simple save through {@link OBDal}. The new object is
    * removed in a later test.
    */
--- a/src/build.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/build.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -756,9 +756,9 @@
     </delete>
 
     <mkdir dir="${build}" />
-     <axis-wsdl2java output="${base.src}" verbose="false" url="http://centralrepository.openbravo.com/openbravo/services/WebService?wsdl" serverside="true" debug="false">
-      <mapping namespace="http://centralrepository.openbravo.com/openbravo/services/WebService" package="org.openbravo.services.webservice" />
-      <mapping namespace="/services/WebService" package="org.openbravo.services.webservice" />
+     <axis-wsdl2java output="${base.src}" verbose="false" url="http://centralrepository.openbravo.com/openbravo/services/WebService2?wsdl" serverside="true" debug="false">
+      <mapping namespace="http://centralrepository.openbravo.com/openbravo/services/WebService2" package="org.openbravo.services.webservice" />
+      <mapping namespace="/services/WebService2" package="org.openbravo.services.webservice" />
     </axis-wsdl2java>
   </target>
 
--- a/src/org/openbravo/base/secureApp/AdvisePopUpRefresh.html	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/base/secureApp/AdvisePopUpRefresh.html	Tue Sep 22 12:40:41 2009 +0200
@@ -13,7 +13,7 @@
 <html>
 <head>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<title>Warning</title>
+<title id="paramTitle">Warning</title>
 <link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
 <link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS"></link>
 <script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
--- a/src/org/openbravo/dal/core/DalMappingGenerator.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/dal/core/DalMappingGenerator.java	Tue Sep 22 12:40:41 2009 +0200
@@ -26,13 +26,13 @@
 import java.io.InputStreamReader;
 
 import org.apache.log4j.Logger;
+import org.hibernate.type.YesNoType;
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.model.Entity;
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.model.Property;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.provider.OBSingleton;
-import org.openbravo.base.session.OBYesNoType;
 import org.openbravo.base.util.Check;
 
 /**
@@ -173,7 +173,7 @@
       type = p.getPrimitiveType().getName();
     }
     if (p.isBoolean()) {
-      type = OBYesNoType.class.getName(); // "yes_no";
+      type = YesNoType.class.getName(); // "yes_no";
     }
     sb.append(" type=\"" + type + "\"");
 
--- a/src/org/openbravo/erpCommon/ad_forms/Heartbeat.html	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/Heartbeat.html	Tue Sep 22 12:40:41 2009 +0200
@@ -26,8 +26,9 @@
   <script language="JavaScript" type="text/javascript" id="paramDirectory">var baseDirectory = "../../../../../web/";</script>
   <script language="JavaScript" type="text/javascript" id="paramLanguage">var defaultLang = "en_US";</script>
   <script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script> 
-  <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script> 
+  <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
   <script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
+  <script language="JavaScript" src="../../../../../web/js/appStatus.js" type="text/javascript"></script>
   <script language="JavaScript" type="text/javascript" id="openRegistration">
   function openRegistration() {
 	 var w = window.opener;
@@ -37,19 +38,18 @@
 	  	return true;
    }
   </script>
+  <script language="JavaScript" type="text/javascript" id="paramCMD">var cmd = 'CONFIGURE';</script>
   <script language="JavaScript" type="text/javascript">  
   function configure() {
-  	openLink('../HeartbeatConfiguration/HeartbeatConfiguration_Relation.html', 'appFrame');
-  	self.close();
+	var command = typeof cmd === 'undefined' ? 'CONFIGURE' : cmd;
+	setProcessingMode('popup', true);
+	submitCommandForm(command, false, null);
   }
-  function disable() {
-  	openRegistration();
-  	submitCommandForm('DISABLE', false, null);
-  	window.close();
-  }
-  function postpone() {
-    openRegistration();
-  	submitCommandForm('POSTPONE', false, null);
+
+  function cancel() {
+  	if (typeof openRegistration === "function") {
+  		openRegistration();
+  	}
   	window.close();
   }
   </script>
@@ -77,8 +77,9 @@
 </div>
 
 <form method="post" action="Heartbeat.html" name="frmMain" style="position: relative;">
-<input type="hidden" name="Command">
-<input type="hidden" name="IsPopUpCall" value="1"></input>
+<input type="hidden" name="Command" />
+<input type="hidden" name="IsPopUpCall" value="1" />
+<input type="hidden" id="paramRecordId" name="inpcRecordId" value="xx" />
 
 <div class="Popup_ContentPane_CircleLogo">
   <div class="Popup_WindowLogo">
@@ -139,73 +140,50 @@
           <tr><td height="20" colspan="5"/></tr>
           <tr>
             <td/>
-            <td class="Button_RightAlign_ContentCell">
+            <td class="Button_LeftAlign_ContentCell">
               <div>
                 <button type="button" 
-                  id="buttonConfigure" 
+                  id="buttonContinue" 
                   class="ButtonLink" 
                   onclick="configure();return false;" 
-                  onfocus="buttonEvent('onfocus', this); window.status='Configure'; return true;" 
+                  onfocus="buttonEvent('onfocus', this); window.status='Continue'; return true;" 
                   onblur="buttonEvent('onblur', this);" 
                   onkeyup="buttonEvent('onkeyup', this);" 
                   onkeydown="buttonEvent('onkeydown', this);" 
                   onkeypress="buttonEvent('onkeypress', this);" 
                   onmouseup="buttonEvent('onmouseup', this);" 
                   onmousedown="buttonEvent('onmousedown', this);" 
-                  onmouseover="buttonEvent('onmouseover', this); window.status='Configure'; return true;" 
+                  onmouseover="buttonEvent('onmouseover', this); window.status='Continue'; return true;" 
                   onmouseout="buttonEvent('onmouseout', this);">
                   <table class="Button">
                     <tr>
-                      <td class="Button_left"><img class="Button_Icon Button_Icon_ok" alt="Configure" title="Configure" src="../../../../../web/images/blank.gif" border="0" /></td>
-                      <td class="Button_text Button_width">Configure</td>
+                      <td class="Button_left"><img class="Button_Icon Button_Icon_ok" alt="Continue" title="Continue" src="../../../../../web/images/blank.gif" border="0" /></td>
+                      <td class="Button_text Button_width">Continue</td>
                       <td class="Button_right"></td>
                     </tr>
                   </table>
                 </button>
               </div>
             </td>
-            <td class="Button_LeftAlign_ContentCell">
+            <td />
+            <td class="Button_RightAlign_ContentCell">
               <div>
                 <button type="button" 
                   class="ButtonLink" 
-                  onclick="disable();return false;" 
-                  onfocus="buttonEvent('onfocus', this); window.status='Search'; return true;" 
+                  onclick="cancel();return false;" 
+                  onfocus="buttonEvent('onfocus', this); window.status='Cancel'; return true;" 
                   onblur="buttonEvent('onblur', this);" 
                   onkeyup="buttonEvent('onkeyup', this);" 
                   onkeydown="buttonEvent('onkeydown', this);" 
                   onkeypress="buttonEvent('onkeypress', this);" 
                   onmouseup="buttonEvent('onmouseup', this);" 
                   onmousedown="buttonEvent('onmousedown', this);" 
-                  onmouseover="buttonEvent('onmouseover', this); window.status='Search'; return true;" 
+                  onmouseover="buttonEvent('onmouseover', this); window.status='Cancel'; return true;" 
                   onmouseout="buttonEvent('onmouseout', this);">
                   <table class="Button">
                     <tr>
-                      <td class="Button_left"><img class="Button_Icon Button_Icon_cancel" alt="Disable" title="Disable" src="../../../../../web/images/blank.gif" border="0" /></td>
-                      <td class="Button_text Button_width">Disable</td>
-                      <td class="Button_right"></td>
-                    </tr>
-                  </table>
-                </button>
-              </div>
-            </td>
-            <td class="Button_LeftAlign_ContentCell">
-              <div>
-                <button type="button" 
-                  class="ButtonLink" 
-                  onclick="postpone();return false;" 
-                  onfocus="buttonEvent('onfocus', this); window.status='Later'; return true;" 
-                  onblur="buttonEvent('onblur', this);" 
-                  onkeyup="buttonEvent('onkeyup', this);" 
-                  onkeydown="buttonEvent('onkeydown', this);" 
-                  onkeypress="buttonEvent('onkeypress', this);" 
-                  onmouseup="buttonEvent('onmouseup', this);" 
-                  onmousedown="buttonEvent('onmousedown', this);" 
-                  onmouseover="buttonEvent('onmouseover', this); window.status='Later'; return true;" 
-                  onmouseout="buttonEvent('onmouseout', this);">
-                  <table class="Button">
-                    <tr>
-                      <td class="Button_left"><img class="Button_Icon Button_Icon_process" alt="Later" title="Later" src="../../../../../web/images/blank.gif" border="0" /></td>
-                      <td class="Button_text Button_width">Later</td>
+                      <td class="Button_left"><img class="Button_Icon Button_Icon_cancel" alt="Cancel" title="Cancel" src="../../../../../web/images/blank.gif" border="0" /></td>
+                      <td class="Button_text Button_width">Cancel</td>
                       <td class="Button_right"></td>
                     </tr>
                   </table>
--- a/src/org/openbravo/erpCommon/ad_forms/Heartbeat.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/Heartbeat.java	Tue Sep 22 12:40:41 2009 +0200
@@ -19,7 +19,6 @@
 import java.io.PrintWriter;
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
-import java.util.Calendar;
 import java.util.Date;
 
 import javax.servlet.ServletConfig;
@@ -27,6 +26,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
+import org.openbravo.base.filter.IsIDFilter;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.erpCommon.businessUtility.RegistrationData;
@@ -63,15 +63,12 @@
       }
     }
 
-    if (vars.commandIn("DEFAULT")) {
+    if (vars.commandIn("DEFAULT", "DEFAULT_MODULE")) {
       printPageDataSheet(response, vars);
-    } else if (vars.commandIn("DISABLE")) {
-      HeartbeatData.disableHeartbeat(myPool);
-    } else if (vars.commandIn("POSTPONE")) {
-      final Calendar cal = Calendar.getInstance();
-      cal.add(Calendar.DATE, 2);
-      final String date = new SimpleDateFormat(vars.getJavaDateFormat()).format(cal.getTime());
-      HeartbeatData.postpone(myPool, date);
+    } else if (vars.commandIn("CONFIGURE", "CONFIGURE_MODULE")) {
+      response.sendRedirect(strDireccion + "/ad_process/TestHeartbeat.html?Command="
+          + vars.getCommand() + "&inpcRecordId="
+          + vars.getStringParameter("inpcRecordId", IsIDFilter.instance));
     } else
       pageError(response);
   }
@@ -90,8 +87,23 @@
     xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
     xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
     xmlDocument.setParameter("theme", vars.getTheme());
+
+    String msgCode = vars.getCommand().equals("DEFAULT_MODULE") ? "HB_WELCOME_MODULE"
+        : "HB_WELCOME";
     xmlDocument.setParameter("welcome", Utility.formatMessageBDToHtml(Utility.messageBD(this,
-        "HB_WELCOME", vars.getLanguage())));
+        msgCode, vars.getLanguage())));
+
+    xmlDocument.setParameter("recordId", vars.getStringParameter("inpcRecordId",
+        IsIDFilter.instance));
+
+    String jsCommand = "var cmd='";
+    if (vars.commandIn("DEFAULT")) {
+      jsCommand += "CONFIGURE";
+    } else {
+      jsCommand += "CONFIGURE_MODULE";
+    }
+    jsCommand += "';";
+    xmlDocument.setParameter("cmd", jsCommand);
 
     final RegistrationData[] rData = RegistrationData.select(this);
     if (rData.length > 0) {
--- a/src/org/openbravo/erpCommon/ad_forms/Heartbeat.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/Heartbeat.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -23,5 +23,7 @@
 	<PARAMETER id="paramDirectory" name="directory" default=""/>
 	<PARAMETER id="paramLanguage" name="language" default=""/>
 	<PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
+    <PARAMETER id="paramCMD" name="cmd" default="var cmd='CONFIGURE';" />
+    <PARAMETER id="paramRecordId" name="recordId" attribute="value" default="" replace="xx" />
  	<PARAMETER id="openRegistration" name="registration" />
 </REPORT>
--- a/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement.java	Tue Sep 22 12:40:41 2009 +0200
@@ -22,6 +22,7 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.PrintWriter;
+import java.util.ArrayList;
 import java.util.HashMap;
 
 import javax.servlet.ServletException;
@@ -39,6 +40,7 @@
 import org.openbravo.erpCommon.modules.ModuleTree;
 import org.openbravo.erpCommon.modules.UninstallModule;
 import org.openbravo.erpCommon.modules.VersionUtility;
+import org.openbravo.erpCommon.obps.ActivationKey;
 import org.openbravo.erpCommon.utility.ComboTableData;
 import org.openbravo.erpCommon.utility.FieldProviderFactory;
 import org.openbravo.erpCommon.utility.HttpsUtils;
@@ -107,7 +109,7 @@
       printPageDetail(response, vars, record, local);
     } else if (vars.commandIn("INSTALL")) {
       final String record = vars.getStringParameter("inpcRecordId");
-      printPageInstall1(response, vars, record, false, null, new String[0]);
+      printPageInstall1(response, request, vars, record, false, null, new String[0]);
     } else if (vars.commandIn("INSTALL2")) {
       printPageInstall2(response, vars);
     } else if (vars.commandIn("INSTALL3")) {
@@ -118,7 +120,7 @@
     } else if (vars.commandIn("LOCAL")) {
       printSearchFile(response, vars, null);
     } else if (vars.commandIn("INSTALLFILE")) {
-      printPageInstallFile(response, vars);
+      printPageInstallFile(response, request, vars);
 
     } else if (vars.commandIn("UNINSTALL")) {
       final String modules = vars.getInStringParameter("inpNodes", IsIDFilter.instance);
@@ -140,7 +142,7 @@
         modulesToUpdate = new String[1];
         modulesToUpdate[0] = updateModule;
       }
-      printPageInstall1(response, vars, null, false, null, modulesToUpdate);
+      printPageInstall1(response, request, vars, null, false, null, modulesToUpdate);
     } else
       pageError(response);
   }
@@ -227,7 +229,7 @@
       out.println(xmlDocument.print());
       out.close();
     } catch (final Exception e) {
-      e.printStackTrace();
+      log4j.error(e);
     }
   }
 
@@ -263,7 +265,7 @@
             + Utility.messageBD(this, "InstallUpdatesNow", lang) + "</a>";
       }
     } catch (final Exception e) {
-      e.printStackTrace();
+      log4j.error(e);
     }
     return rt;
   }
@@ -484,8 +486,8 @@
    * @param response
    * @throws IOException
    */
-  private void printPageInstallFile(HttpServletResponse response, VariablesSecureApp vars)
-      throws ServletException, IOException {
+  private void printPageInstallFile(HttpServletResponse response, HttpServletRequest request,
+      VariablesSecureApp vars) throws ServletException, IOException {
     final FileItem fi = vars.getMultiFile("inpFile");
 
     if (!fi.getName().toUpperCase().endsWith(".OBX")) {
@@ -502,7 +504,7 @@
       try {
         if (im.isModuleUpdate(fi.getInputStream())) {
           vars.setSessionObject("ModuleManagementInstall|File", vars.getMultiFile("inpFile"));
-          printPageInstall1(response, vars, null, true, fi.getInputStream(), new String[0]);
+          printPageInstall1(response, request, vars, null, true, fi.getInputStream(), new String[0]);
         } else {
           OBError message = im.getOBError(this);
           printSearchFile(response, vars, message);
@@ -528,11 +530,18 @@
    * @throws IOException
    * @throws ServletException
    */
-  private void printPageInstall1(HttpServletResponse response, VariablesSecureApp vars,
-      String recordId, boolean islocal, InputStream obx, String[] updateModules)
-      throws IOException, ServletException {
+  private void printPageInstall1(HttpServletResponse response, HttpServletRequest request,
+      VariablesSecureApp vars, String recordId, boolean islocal, InputStream obx,
+      String[] updateModules) throws IOException, ServletException {
     final String discard[] = { "", "", "", "", "", "" };
     Module module = null;
+
+    // Remote installation is only allowed for heartbeat enabled instances
+    if (!islocal && !isHeartbeatEnabled()) {
+      response.sendRedirect(strDireccion
+          + "/ad_forms/Heartbeat.html?Command=DEFAULT_MODULE&inpcRecordId=" + recordId);
+    }
+
     if (!islocal && (updateModules == null || updateModules.length == 0)) {
       // if it is a remote installation get the module from webservice,
       // other case the obx file is passed as an InputStream
@@ -541,7 +550,7 @@
         final WebServiceImpl ws = loc.getWebService();
         module = ws.moduleDetail(recordId);
       } catch (final Exception e) {
-        e.printStackTrace();
+        log4j.error(e);
       }
     } else {
       discard[4] = "core";
@@ -568,15 +577,17 @@
         check = im.checkDependenciesFile(obx);
       }
 
+      // Check commercial modules can be installed
+
       if (check) { // dependencies are statisfied, show modules to install
-        final Module[] installOrig = im.getModulesToInstall(); // This
-        // includes
-        // the
-        // also
-        // the
-        // module
-        // to
-        // install
+        // installOrig includes also the module to install
+        final Module[] installOrig = im.getModulesToInstall();
+
+        // check commercial modules and show error page if not allowed to install
+        if (!checkCommercialModules(im, response, vars)) {
+          return;
+        }
+
         if (installOrig == null || installOrig.length == 0)
           discard[0] = "modulesToinstall";
         else {
@@ -631,7 +642,7 @@
         discard[5] = "discardContinue";
       }
     } catch (final Exception e) {
-      e.printStackTrace();
+      log4j.error(e);
       message = new OBError();
       message.setType("Error");
       message.setTitle(Utility.messageBD(this, message.getType(), vars.getLanguage()));
@@ -671,6 +682,54 @@
     out.close();
   }
 
+  private boolean checkCommercialModules(ImportModule im, HttpServletResponse response,
+      VariablesSecureApp vars) throws IOException {
+    ActivationKey ak = new ActivationKey();
+    boolean OBPSActiveInstance = ActivationKey.isActiveInstance();
+    ArrayList<Module> notAllowedMods = new ArrayList<Module>();
+
+    for (Module instMod : im.getModulesToInstall()) {
+      if (instMod.getIsCommercial()
+          && (!OBPSActiveInstance || !ak.isModuleSubscribed(instMod.getModuleID(), true))) {
+        notAllowedMods.add(instMod);
+      }
+    }
+
+    for (Module updMod : im.getModulesToUpdate()) {
+      if (updMod.getIsCommercial()
+          && (!OBPSActiveInstance || !ak.isModuleSubscribed(updMod.getModuleID(), true))) {
+        notAllowedMods.add(updMod);
+      }
+    }
+
+    if (notAllowedMods.size() > 0) {
+      String discard[] = { "" };
+
+      if (OBPSActiveInstance) {
+        discard[0] = "CEInstance";
+      } else {
+        discard[0] = "OBPSInstance";
+      }
+      XmlDocument xmlDocument = xmlEngine.readXmlTemplate(
+          "org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial", discard)
+          .createXmlDocument();
+      xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
+      xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
+      xmlDocument.setParameter("theme", vars.getTheme());
+      xmlDocument.setData("modules", FieldProviderFactory.getFieldProviderArray(notAllowedMods));
+      response.setContentType("text/html; charset=UTF-8");
+      final PrintWriter out = response.getWriter();
+      out.println(xmlDocument.print());
+      out.close();
+    }
+    return notAllowedMods.size() == 0;
+  }
+
+  private boolean isHeartbeatEnabled() {
+    SystemInformation sys = OBDal.getInstance().get(SystemInformation.class, "0");
+    return sys.isEnableHeartbeat() != null && sys.isEnableHeartbeat();
+  }
+
   /**
    * Shows the second installation pup-up with all the license agreements for the modules to
    * install/update
@@ -787,7 +846,6 @@
     OBError message;
     if (im.getIsLocal())
       im.execute(((FileItem) vars.getSessionObject("ModuleManagementInstall|File"))
-          .getInputStream(), ((FileItem) vars.getSessionObject("ModuleManagementInstall|File"))
           .getInputStream());
     else
       im.execute();
@@ -836,7 +894,7 @@
             response
                 .sendRedirect(strDireccion + request.getServletPath() + "?Command=ADD_NOSEARCH");
           } catch (final Exception ex) {
-            ex.printStackTrace();
+            log4j.error(ex);
           }
         }
       }
@@ -850,11 +908,11 @@
       message.setTitle(Utility.messageBD(this, "Error", vars.getLanguage()));
       message.setMessage(Utility.messageBD(this, "WSError", vars.getLanguage()));
       vars.setMessage("ModuleManagement", message);
-      e.printStackTrace();
+      log4j.error(e);
       try {
         response.sendRedirect(strDireccion + request.getServletPath() + "?Command=ADD_NOSEARCH");
       } catch (final Exception ex) {
-        ex.printStackTrace();
+        log4j.error(ex);
       }
     }
     if (modules != null && modules.length > 0) {
@@ -895,7 +953,7 @@
       } else
         return new String[0];
     } catch (final Exception e) {
-      e.printStackTrace();
+      log4j.error(e);
       return (new String[0]);
     }
   }
@@ -911,7 +969,7 @@
       } else
         return new String[0];
     } catch (final Exception e) {
-      e.printStackTrace();
+      log4j.error(e);
       return (new String[0]);
     }
   }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.html	Tue Sep 22 12:40:41 2009 +0200
@@ -0,0 +1,253 @@
+<!--
+ *************************************************************************
+ * 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 SL 
+ * All portions are Copyright (C) 2009 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>Install Modules</title>
+  <link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
+  <link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS"></link>
+  <script language="JavaScript" src="../../../../../web/js/messages.js" type="text/javascript"></script>
+  <script language="JavaScript" type="text/javascript" id="paramLanguage">defaultLang = "en_US";</script>
+  <script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script>
+  <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script>
+  <script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
+
+  <script language="JavaScript" type="text/javascript" id="paramDirectory">
+  var baseDirectory="../../../../../web/";
+  </script>
+  <script language="JavaScript" type="text/javascript">
+  function closeThisPage() {
+    window.close();
+    return true;
+  }
+
+  </script>
+  <script language="JavaScript" type="text/javascript">
+  function onLoadDo(){
+    this.windowTables = new Array(
+      new windowTableId('client', 'buttonCancel')
+    );
+    setWindowTableParentElement();
+    enableShortcuts('popup');
+    setBrowserAutoComplete(false);
+
+    setWindowElementFocus('buttonCancel', 'id');
+  }
+  </script>    
+</head>
+
+<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="onLoadDo();">
+<form id="form" method="post" action="ModuleManagement.html" name="frmMain">
+  <input type="hidden" name="Command">
+  <input type="hidden" name="inpModuleID" id="moduleID" value=""/>
+  <input type="hidden" name="inpLocalInstall" id="inpLocalInstall" value=""/>
+  <input type="hidden" name="IsPopUpCall" value="1"></input>
+  <input type="hidden" name="inpcRecordId" value="" id="paramKey"></input>
+  
+
+  <div class="Popup_ContentPane_CircleLogo">
+    <div class="Popup_WindowLogo">
+      <img class="Popup_WindowLogo_Icon Popup_WindowLogo_Icon_moduleInstall" src="../../../../../web/images/blank.gif" border=0/></img>
+    </div>
+  </div>
+
+  <table cellspacing="0" cellpadding="0" width="100%">
+
+    <tr>
+      <td>
+        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_NavBar">
+          <tr class="Popup_NavBar_bg"><td></td>
+            <td class="Popup_NavBar_separator_cell"></td>
+            <td class="Popup_NavBar_bg_logo_left"></td>
+            <td class="Popup_NavBar_bg_logo" width="1" onclick="openNewBrowser('http://www.openbravo.com', 'Openbravo');return false;"><img src="../../../../../web/images/blank.gif" alt="Openbravo" title="Openbravo" border="0" id="openbravoLogo" class="Popup_NavBar_logo" /></td>
+            <td class="Popup_NavBar_bg_logo_right"></td>
+            <td class="Popup_NavBar_Popup_title_cell"><span>Install Modules</span></td>
+            <td class="Popup_NavBar_separator_cell"></td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+
+    <tr>
+      <td>
+        <table cellspacing="0" cellpadding="0" class="Popup_ContentPane_SeparatorBar">
+          <tr>
+            <td class="Popup_SeparatorBar_bg"></td>
+          </tr>
+        </table>
+      </td>
+    </tr>
+
+
+
+    <tr>
+      <td>
+        <div class="Popup_ContentPane_Client" style="overflow: auto;" id="client">
+         
+   <!-- MessageBox -->
+
+                            <table cellpadding="0" cellspacing="0" id="messageBoxID" class="MessageBoxyy">
+                              <tbody>
+                              <tr class="MessageBox_TopMargin">
+                                <td class="MessageBox_LeftMargin"></td>
+                                <td></td>
+                                <td class="MessageBox_RightMargin"></td>
+                              </tr>
+                              <tr>
+                                <td class="MessageBox_LeftMargin"></td>
+                                <td>
+
+                                  <table cellpadding="0" cellspacing="0" style="width: 100%;">
+                                    <tbody>
+                                    <tr>
+                                      <td>
+                                        <div class="MessageBox_TopLeft"></div>
+                                        <div class="MessageBox_Left"></div>
+                                      </td>
+                                      <td class="MessageBox_bg">
+
+                                        <table class="MessageBox_Top">
+                                        <tbody>
+                                          <tr>
+                                            <td>
+                                              <span>
+                                              <table cellpadding="0" cellspacing="0" class="MessageBox_Body_ContentCell">
+                                                <tbody>
+                                                <tr>
+                                                  <td class="MessageBox_Icon_ContentCell">
+                                                    <div class="MessageBox_Icon"></div>
+                                                  </td>
+                                                  <td style="vertical-align: top;" id="messageBoxIDContent">
+                                                    <span>
+                                                      <div class="MessageBox_TextTitle" id="messageBoxIDTitle">
+                                                        xxInfo: AccessTableWithNoView
+                                                      </div>
+                                                      <div class="MessageBox_TextDescription" id="messageBoxIDMessage">
+                                                        xxThe current information is empty.
+                                                      </div>
+                                                      <div class="MessageBox_TextSeparator"></div>
+                                                    </span>
+                                                  </td>
+                                                </tr>
+                                                </tbody>
+                                              </table>
+                                              </span>
+                                            </td>
+                                          </tr>
+                                          </tbody>
+                                        </table>
+
+                                      </td>
+                                      <td class="MessageBox_RightTrans">
+                                        <div class="MessageBox_TopRight"></div>
+                                        <div class="MessageBox_Right"></div>
+                                      </td>
+                                    </tr>
+                                    <tr>
+                                      <td rowspan="2" class="MessageBox_BottomLeft">
+                                      </td>
+                                      <td class="MessageBox_BottomTrans MessageBox_bg">
+                                      </td>
+                                      <td rowspan="2" class="MessageBox_BottomRight">
+                                      </td>
+                                    </tr>
+                                    <tr>
+                                      <td class="MessageBox_Bottom">
+                                      </td>
+                                    </tr>
+                                    </tbody>
+                                  </table>
+
+                                </td>
+                                <td class="MessageBox_RightMargin"></td>
+                              </tr>
+                              <tr class="MessageBox_BottomMargin">
+                                <td class="MessageBox_LeftMargin"></td>
+                                <td></td>
+                                <td class="MessageBox_RightMargin"></td>
+                              </tr>
+                              </tbody>
+                            </table>
+                             <table cellpadding="0" cellspacing="0">
+          <tr>
+          <table cellspacing="0" cellpadding="0" class="Popup_Client_TablePopup">      
+            <tr>
+              <td class="TableEdition_OneCell_width"></td>
+              <td class="TableEdition_OneCell_width"></td>
+              <td class="TableEdition_OneCell_width"></td>
+              <td class="TableEdition_OneCell_width"></td>
+            </tr>
+            
+            
+            <tr>
+              <td class="PlainText_normal" colspan="4" style="padding: 0 0 10 0; text-align: left;">
+                <span id="OBPSInstance">
+                <p class="Label_ReadOnly_Text"><FIELDS_TMP id="moduleNames"><FIELD_TMP id="name"></FIELD_TMP></FIELDS_TMP>&nbsp;is released under a commercial license that requires acquiring an activation key before installation.</p>
+                <p><a class="Label_ReadOnly_Text LabelLink_noicon" href="http://www.openbravo.com/product/erp/module/acquire" target="_blank">Learn how</a>&nbsp;to acquire and activate commercial modules.</p>
+                </span>
+                <span id="CEInstance">
+                <p class="Label_ReadOnly_Text"><FIELDS_TMP id="moduleNames"><FIELD_TMP id="name"></FIELD_TMP></FIELDS_TMP>&nbsp;is a commercial module that requires a subscription to an Openbravo Professional Edition.</p>
+                <p><a class="Label_ReadOnly_Text LabelLink_noicon" href="http://www.openbravo.com/product/erp/acquire" target="_blank">Learn how</a>&nbsp;to acquire and activate your subscription.</p>
+                </span>
+               </td>
+            </tr>
+            
+            
+            <tr><td height="20px"></td></tr>
+            <tr>
+              <td/>
+              
+              <td class="Button_LeftAlign_ContentCell">
+                <div>
+                  <button type="button" 
+                    id="buttonCancel" 
+                    class="ButtonLink" 
+                    onclick="closeThisPage();return false;" 
+                    onfocus="buttonEvent('onfocus', this); window.status='Cancel'; return true;" 
+                    onblur="buttonEvent('onblur', this);" 
+                    onkeyup="buttonEvent('onkeyup', this);" 
+                    onkeydown="buttonEvent('onkeydown', this);" 
+                    onkeypress="buttonEvent('onkeypress', this);" 
+                    onmouseup="buttonEvent('onmouseup', this);" 
+                    onmousedown="buttonEvent('onmousedown', this);" 
+                    onmouseover="buttonEvent('onmouseover', this); window.status='Cancel'; return true;" 
+                    onmouseout="buttonEvent('onmouseout', this);">
+                    <table class="Button">
+                      <tr>
+                        <td class="Button_left"><img class="Button_Icon Button_Icon_ok" alt="Cancel" title="Cancel" src="../../../../../web/images/blank.gif" border="0" /></td>
+                        <td class="Button_text Button_width">Close</td>
+                        <td class="Button_right"></td>
+                      </tr>
+                    </table>
+                  </button>
+                </div>
+              </td>
+              <td/>
+              <td/>
+            </tr>
+            
+
+        </table></td></tr></table>
+      </div>
+    </td>
+  </tr>
+</table>
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_forms/ModuleManagement_ErrorCommercial.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!--
+ *************************************************************************
+ * 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 SL 
+ * All portions are Copyright (C) 2009 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+
+
+<REPORT>
+  <template file="ModuleManagement_ErrorCommercial.html" />
+  
+  <PARAMETER id="paramLanguage" name="language" default=""/>
+  <PARAMETER id="paramKey" name="key" default="" attribute="value"/>
+  <PARAMETER id="paramDirectory" name="directory" default=""/>
+  <PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
+  
+  <PARAMETER id="messageBoxID" name="messageType" attribute="class" replace="yy" default="HIDDEN"/>
+  <PARAMETER id="messageBoxIDTitle" name="messageTitle" default=""/>
+  <PARAMETER id="messageBoxIDMessage" name="messageMessage" default=""/>
+
+  <structure name="modules">
+    <FIELD id="name">name</FIELD>
+    <SECTION id="moduleNames"/>
+  </structure>
+  
+
+</REPORT>
--- a/src/org/openbravo/erpCommon/ad_forms/Registration.html	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/Registration.html	Tue Sep 22 12:40:41 2009 +0200
@@ -28,10 +28,12 @@
   <script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script> 
   <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script> 
   <script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
+  <script language="JavaScript" type="text/javascript" id="paramURL">var url = "http://www.openbravo.com/embedreg/form";</script>
   <script language="JavaScript" type="text/javascript">
   function configure() {
+	var regURL = typeof url === 'undefined' ? 'http://www.openbravo.com/embedreg/form' : url;
   	submitCommandForm('REGISTER', false, null);
-  	window.opener.submitCommandForm('DEFAULT', false, null, 'http://www.openbravo.com/embedreg/form', '_blank', null, false);
+  	window.opener.submitCommandForm('DEFAULT', false, null, regURL, '_blank', null, false);
   	self.close();
   }
   function disable() {
--- a/src/org/openbravo/erpCommon/ad_forms/Registration.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/Registration.java	Tue Sep 22 12:40:41 2009 +0200
@@ -30,7 +30,9 @@
 
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
+import org.openbravo.dal.service.OBDal;
 import org.openbravo.erpCommon.utility.Utility;
+import org.openbravo.model.ad.system.SystemInformation;
 import org.openbravo.xmlEngine.XmlDocument;
 
 public class Registration extends HttpSecureAppServlet {
@@ -90,6 +92,17 @@
     xmlDocument.setParameter("welcome", Utility.formatMessageBDToHtml(Utility.messageBD(this,
         "REG_WELCOME", vars.getLanguage())));
 
+    // Building registration URL js variable
+    SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class, "0");
+
+    String url = "var url = 'http://www.openbravo.com/embedreg/form";
+    if (sysInfo.getSystemIdentifier() != null) {
+      url += "?system_id=" + sysInfo.getSystemIdentifier();
+    }
+    url += "';";
+
+    xmlDocument.setParameter("url", url);
+
     out.println(xmlDocument.print());
     out.close();
   }
--- a/src/org/openbravo/erpCommon/ad_forms/Registration.xml	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_forms/Registration.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -12,7 +12,7 @@
  * under the License. 
  * The Original Code is Openbravo ERP. 
  * The Initial Developer of the Original Code is Openbravo SL 
- * All portions are Copyright (C) 2001-2008 Openbravo SL 
+ * All portions are Copyright (C) 2001-2009 Openbravo SL 
  * All Rights Reserved. 
  * Contributor(s):  ______________________________________.
  ************************************************************************
@@ -22,5 +22,6 @@
 	<PARAMETER id="paramWelcome" name="welcome" replaceCharacters="htmlHelp" />
 	<PARAMETER id="paramDirectory" name="directory" default=""/>
 	<PARAMETER id="paramLanguage" name="language" default=""/>
-	<PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/> 
+	<PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
+    <PARAMETER id="paramURL" name="url" default="" />
 </REPORT>
--- a/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess.java	Tue Sep 22 12:40:41 2009 +0200
@@ -24,6 +24,7 @@
 import org.openbravo.scheduling.ProcessBundle;
 import org.openbravo.scheduling.ProcessContext;
 import org.openbravo.scheduling.ProcessLogger;
+import org.openbravo.scheduling.ProcessBundle.Channel;
 
 public class HeartbeatProcess implements Process {
 
@@ -33,26 +34,34 @@
 
   private static final String CERT_ALIAS = "openbravo-butler";
 
+  private static final String ENABLING_BEAT = "E";
+  private static final String SCHEDULED_BEAT = "S";
+  private static final String DISABLING_BEAT = "D";
+  private static final String UNKNOWN_BEAT = "U";
+
   private ProcessContext ctx;
 
   private ConnectionProvider connection;
   private ProcessLogger logger;
+  private Channel channel;
 
   public void execute(ProcessBundle bundle) throws Exception {
 
     connection = bundle.getConnection();
     logger = bundle.getLogger();
+    channel = bundle.getChannel();
 
     this.ctx = bundle.getContext();
 
     SystemInfo.load(bundle.getConnection());
 
     String msg = null;
-    if (!isHeartbeatActive()) {
+    if (this.channel == Channel.SCHEDULED && !isHeartbeatActive()) {
       msg = Utility.messageBD(connection, "HB_INACTIVE", ctx.getLanguage());
       logger.logln(msg);
       return;
     }
+
     if (!isInternetAvailable(connection)) {
       msg = Utility.messageBD(connection, "HB_INTERNET_UNAVAILABLE", ctx.getLanguage());
       logger.logln(msg);
@@ -62,11 +71,26 @@
     logger.logln("Hearbeat process starting...");
     try {
       Properties systemInfo = getSystemInfo(connection);
-      String queryStr = createQueryStr(systemInfo);
+
+      String beatType = UNKNOWN_BEAT;
+
+      if (this.channel == Channel.SCHEDULED) {
+        beatType = SCHEDULED_BEAT;
+      } else {
+        final String active = SystemInfoData.isHeartbeatActive(connection);
+        if (active.equals("") || active.equals("N")) {
+          beatType = ENABLING_BEAT;
+        } else {
+          beatType = DISABLING_BEAT;
+        }
+      }
+
+      String queryStr = createQueryStr(systemInfo, beatType);
       String response = sendInfo(queryStr);
-      logSystemInfo(connection, systemInfo);
+      logSystemInfo(connection, systemInfo, beatType);
       List<Alert> updates = parseUpdates(response);
       saveUpdateAlerts(connection, updates);
+      updateHeartbeatStatus();
 
     } catch (Exception e) {
       logger.logln(e.getMessage());
@@ -75,6 +99,23 @@
     }
   }
 
+  private void updateHeartbeatStatus() throws Exception {
+
+    if (this.channel == Channel.SCHEDULED) {
+      // Don't update status when is a scheduled beat
+      return;
+    }
+
+    String active = SystemInfoData.isHeartbeatActive(connection);
+    if (active.equals("") || active.equals("N")) {
+      active = "Y";
+    } else {
+      active = "N";
+    }
+
+    SystemInfoData.updateHeartbeatActive(connection, active);
+  }
+
   /**
    * @return true if heart beat is enabled, false otherwise
    */
@@ -107,11 +148,11 @@
   }
 
   /**
-   * @param connection
+   * @param con
    * @return the system info as properties
    * @throws ServletException
    */
-  private Properties getSystemInfo(ConnectionProvider connection) throws ServletException {
+  private Properties getSystemInfo(ConnectionProvider con) throws ServletException {
     logger.logln(logger.messageDb("HB_GATHER", ctx.getLanguage()));
     return SystemInfo.getSystemInfo();
   }
@@ -122,7 +163,7 @@
    * @param props
    * @return the UTF-8 encoded query string
    */
-  private String createQueryStr(Properties props) {
+  private String createQueryStr(Properties props, String beatType) {
     logger.logln(logger.messageDb("HB_QUERY", ctx.getLanguage()));
     if (props == null)
       return null;
@@ -133,6 +174,7 @@
       String value = props.getProperty(elem);
       sb.append(elem + "=" + (value == null ? "" : value) + "&");
     }
+    sb.append("beatType=" + beatType);
 
     return HttpsUtils.encode(sb.toString(), "UTF-8");
   }
@@ -158,7 +200,7 @@
     return HttpsUtils.sendSecure(url, queryStr, CERT_ALIAS, "changeit");
   }
 
-  private void logSystemInfo(ConnectionProvider connection, Properties systemInfo)
+  private void logSystemInfo(ConnectionProvider conn, Properties systemInfo, String beatType)
       throws ServletException {
     logger.logln(logger.messageDb("HB_LOG", ctx.getLanguage()));
     String id = SequenceIdData.getUUID();
@@ -184,11 +226,11 @@
     String proxyPort = systemInfo.getProperty("proxyPort");
     String numRegisteredUsers = systemInfo.getProperty("numRegisteredUsers");
 
-    HeartbeatProcessData.insertHeartbeatLog(connection, id, "0", "0", systemIdentifier,
+    HeartbeatProcessData.insertHeartbeatLog(conn, id, "0", "0", systemIdentifier,
         isHeartbeatActive, isProxyRequired, proxyServer, proxyPort, activityRate, complexityRate,
         os, osVersion, db, dbVersion, servletContainer, servletContainerVersion, webserver,
         webserverVersion, obVersion, obInstallMode, codeRevision, numRegisteredUsers, javaVersion,
-        antVersion);
+        antVersion, beatType);
   }
 
   /**
@@ -219,17 +261,17 @@
   }
 
   /**
-   * @param connection
+   * @param conn
    * @param updates
    */
-  private void saveUpdateAlerts(ConnectionProvider connection, List<Alert> updates) {
+  private void saveUpdateAlerts(ConnectionProvider conn, List<Alert> updates) {
     if (updates == null) {
       logger.logln("No Updates found...");
       return;
     }
     // info("  ");
     for (Alert update : updates) {
-      update.save(connection);
+      update.save(conn);
     }
   }
 
--- a/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess_data.xsql	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/HeartbeatProcess_data.xsql	Tue Sep 22 12:40:41 2009 +0200
@@ -41,9 +41,9 @@
                           UPDATED, UPDATEDBY, SYSTEM_IDENTIFIER, ISHEARTBEATACTIVE, ISPROXYREQUIRED, PROXY_SERVER, PROXY_PORT,
                           ACTIVITY_RATE, COMPLEXITY_RATE, OS, OS_VERSION, DB, DB_VERSION, SERVLET_CONTAINER,
                           SERVLET_CONTAINER_VERSION, WEBSERVER, WEBSERVER_VERSION, OB_VERSION, OB_INSTALLMODE, CODE_REVISION, NUM_REGISTERED_USERS,
-                          JAVA_VERSION, ANT_VERSION) 
+                          JAVA_VERSION, ANT_VERSION, BEAT_TYPE)
       		VALUES (?, ?, ?, 'Y', NOW(), 0, NOW(), 0, ?, ?, ?, ?, TO_NUMBER(?), TO_NUMBER(?), 
-      		TO_NUMBER(?), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, TO_NUMBER(?), ?, ?)
+      		TO_NUMBER(?), ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, TO_NUMBER(?), ?, ?, ?)
     ]]></Sql>
     <Parameter name="id"/>
     <Parameter name="adClientId"/>null
@@ -69,6 +69,7 @@
     <Parameter name="numRegisteredUsers"/>
     <Parameter name="javaVersion"/>
     <Parameter name="antVersion"/>
+    <Parameter name="beatType"/>
    </SqlMethod>
 
 </SqlClass>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_process/HeartbeatRedirect.html	Tue Sep 22 12:40:41 2009 +0200
@@ -0,0 +1,40 @@
+<!--
+ *************************************************************************
+ * 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 SL 
+ * All portions are Copyright (C) 2009 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+
+<html>
+<head>
+  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+  <title>Heartbeat Configuration</title>
+  <link rel="shortcut icon" href="../../../../../web/images/favicon.ico" type="image/x-icon" />
+  <link rel="stylesheet" type="text/css" href="../../../../../web/skins/Default/Openbravo_ERP_250.css" id="paramCSS"></link>
+  <script language="JavaScript" type="text/javascript" id="paramDirectory">var baseDirectory = "../../../../../web/";</script>
+  <script language="JavaScript" type="text/javascript" id="paramLanguage">var defaultLang = "en_US";</script>
+  <script language="JavaScript" src="../../../../../web/js/shortcuts.js" type="text/javascript"></script> 
+  <script language="JavaScript" src="../../../../../web/js/utils.js" type="text/javascript"></script> 
+  <script language="JavaScript" src="../../../../../web/js/windowKeyboard.js" type="text/javascript"></script>
+  <script language="JavaScript" type="text/javascript">    
+  function redirect() {  
+	  openLink('../HeartbeatConfiguration/HeartbeatConfiguration_Relation.html', 'appFrame');
+	  window.close();
+  }
+  </script>
+</head>
+<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="redirect();">
+</body>
+</html>
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_process/HeartbeatRedirect.xml	Tue Sep 22 12:40:41 2009 +0200
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ *************************************************************************
+ * 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 SL 
+ * All portions are Copyright (C) 2009 Openbravo SL 
+ * All Rights Reserved. 
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+<REPORT>
+	<template file="HeartbeatRedirect.html"/>
+	<PARAMETER id="paramDirectory" name="directory" default=""/>
+	<PARAMETER id="paramLanguage" name="language" default=""/>
+	<PARAMETER id="paramCSS" name="theme" attribute="href" replace="Default"/>
+</REPORT>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/org/openbravo/erpCommon/ad_process/SystemInfo_data.xsql	Tue Sep 22 12:40:41 2009 +0200
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ *************************************************************************
+ * 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 SL
+ * All portions are Copyright (C) 2009 Openbravo SL
+ * All Rights Reserved.
+ * Contributor(s):  ______________________________________.
+ ************************************************************************
+-->
+
+<SqlClass name="SystemInfoData" package="org.openbravo.erpCommon.ad_process">
+   <SqlMethod name="isHeartbeatActive" type="preparedStatement" return="string">
+      <SqlMethodComment></SqlMethodComment>
+      <Sql><![CDATA[
+      	SELECT isheartbeatactive FROM ad_system_info
+    ]]></Sql>
+   </SqlMethod>
+   <SqlMethod name="updateHeartbeatActive" type="preparedStatement" return="rowCount">
+    <SqlMethodComment></SqlMethodComment>
+    <Sql>
+      <![CDATA[
+        UPDATE ad_system_info SET isheartbeatactive = ?, testproxy = ?
+     ]]>
+     </Sql>
+     <Parameter name="isHeartbeatActive"/>
+     <Parameter name="isHeartbeatActive"/>
+   </SqlMethod>
+</SqlClass>
--- a/src/org/openbravo/erpCommon/ad_process/TestHeartbeat.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/ad_process/TestHeartbeat.java	Tue Sep 22 12:40:41 2009 +0200
@@ -20,6 +20,9 @@
 package org.openbravo.erpCommon.ad_process;
 
 import java.io.IOException;
+import java.io.PrintWriter;
+import java.sql.Timestamp;
+import java.util.Calendar;
 import java.util.List;
 
 import javax.servlet.ServletException;
@@ -27,11 +30,13 @@
 import javax.servlet.http.HttpServletResponse;
 
 import org.hibernate.criterion.Expression;
+import org.openbravo.base.filter.IsIDFilter;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.base.secureApp.HttpSecureAppServlet;
 import org.openbravo.base.secureApp.VariablesSecureApp;
 import org.openbravo.dal.service.OBCriteria;
 import org.openbravo.dal.service.OBDal;
+import org.openbravo.erpCommon.utility.OBError;
 import org.openbravo.erpCommon.utility.Utility;
 import org.openbravo.model.ad.system.SystemInformation;
 import org.openbravo.model.ad.ui.Process;
@@ -42,30 +47,42 @@
 import org.openbravo.scheduling.ProcessContext;
 import org.openbravo.scheduling.ProcessRunner;
 import org.openbravo.scheduling.ProcessBundle.Channel;
+import org.openbravo.xmlEngine.XmlDocument;
 
 public class TestHeartbeat extends HttpSecureAppServlet {
 
   private static final long serialVersionUID = 1L;
   private static final String HB_Process_ID = "1005800000";
+  private static final String HB_tabId = "1005400005";
   private static final String SystemInfomation_ID = "0";
-  private static final String WEEKLY = "5";
+  private static final String EVERY_N_DAYS = "N";
   private static final String SCHEDULE = "S";
 
   @Override
   public void doPost(HttpServletRequest request, HttpServletResponse response)
       throws ServletException, IOException {
+
     VariablesSecureApp vars = new VariablesSecureApp(request);
-    final boolean isHearbeatEnabled = vars.getRequiredStringParameter("inptestproxy").equals("Y");
 
-    if (isHearbeatEnabled) { // Disable
+    final Process HBProcess = OBDal.getInstance().get(Process.class, HB_Process_ID);
+    final SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class,
+        SystemInfomation_ID);
+    final boolean isHearbeatEnabled = sysInfo.isEnableHeartbeat() == null ? false : sysInfo
+        .isEnableHeartbeat();
+
+    final String clickedButton = vars.getStringParameter("inpLastFieldChanged");
+
+    if (isHearbeatEnabled || clickedButton.equalsIgnoreCase("inpisheartbeatactive")) {
+      // Disable Heartbeat
       try {
 
-        // Getting the process
-        final Process HBProcess = OBDal.getInstance().get(Process.class, HB_Process_ID);
+        if (sysInfo.isEnableHeartbeat() != null && sysInfo.isEnableHeartbeat()) {
+          // Sending beat
+          ProcessBundle beat = new ProcessBundle(HB_Process_ID, vars).init(this);
+          new ProcessRunner(beat).execute(this);
+        }
 
         // Deactivating the process at SystemInfo
-        final SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class,
-            SystemInfomation_ID);
         sysInfo.setEnableHeartbeat(false);
         sysInfo.setTestHeartbeat("N");
         OBDal.getInstance().save(sysInfo);
@@ -91,45 +108,53 @@
         }
 
         String msg = Utility.messageBD(this, "HB_SUCCESS", vars.getLanguage());
-        advisePopUp(request, response, "SUCCESS", "Heartbeat Configuration", msg);
+        advisePopUpRefresh(request, response, "SUCCESS", "Heartbeat Configuration", msg);
 
       } catch (Exception e) {
         log4j.error(e.getMessage(), e);
-        advisePopUp(request, response, "ERROR", "Heartbeat Configuration", e.getMessage());
+        advisePopUpRefresh(request, response, "ERROR", "Heartbeat Configuration", e.getMessage());
       }
 
-    } else { // Enable
+    } else { // Enable Heartbeat
 
       try {
 
-        // Activating the process
-        final Process HBProcess = OBDal.getInstance().get(Process.class, HB_Process_ID);
         HBProcess.setActive(true);
         OBDal.getInstance().save(HBProcess);
 
-        // Activating the process at SystemInfo
-        final SystemInformation sysInfo = OBDal.getInstance().get(SystemInformation.class,
-            SystemInfomation_ID);
-        sysInfo.setEnableHeartbeat(true);
-        sysInfo.setTestHeartbeat("Y");
-        OBDal.getInstance().save(sysInfo);
-
-        // Committing because sqlc uses a different connection
         OBDal.getInstance().commitAndClose();
 
-        // Making the first beat
+        // Sending beat
         ProcessBundle bundle = new ProcessBundle(HB_Process_ID, vars).init(this);
         final String beatExecutionId = new ProcessRunner(bundle).execute(this);
 
         // Getting beat result
-        final OBCriteria<ProcessRun> runCriteria = OBDal.getInstance().createCriteria(
-            ProcessRun.class);
-        runCriteria.add(Expression.eq(ProcessRun.PROPERTY_ID, beatExecutionId));
-        final List<ProcessRun> prl = runCriteria.list();
-        final ProcessRun processRunResult = prl.get(0);
+        final ProcessRun result = OBDal.getInstance().get(ProcessRun.class, beatExecutionId);
 
-        if (processRunResult.getStatus().equals("ERR")) {
-          advisePopUp(request, response, "ERROR", "Heartbeat Configuration");
+        if (result.getStatus().equals("ERR")) {
+          // Restoring not active state
+          sysInfo.setEnableHeartbeat(false);
+          sysInfo.setTestHeartbeat("N");
+          OBDal.getInstance().save(sysInfo);
+          OBDal.getInstance().commitAndClose();
+
+          String msg = Utility.messageBD(this, "HB_INTERNAL_ERROR", vars.getLanguage());
+          // Extracting the last line from the log
+          String log = result.getLog().substring(0, result.getLog().lastIndexOf("\n"));
+          log = log.substring(log.lastIndexOf("\n"));
+
+          msg += "\n" + log;
+          msg = Utility.formatMessageBDToHtml(msg);
+
+          if (vars.commandIn("CONFIGURE", "CONFIGURE_MODULE")) {
+            OBError err = new OBError();
+            err.setType("Error");
+            err.setMessage(msg);
+            vars.setMessage(HB_tabId, err);
+            printPageRedirect(response, vars);
+          } else {
+            advisePopUpRefresh(request, response, "ERROR", "Heartbeat Configuration", msg);
+          }
           return;
         }
 
@@ -143,23 +168,32 @@
 
         ProcessRequest pr = null;
 
-        if (requestList.size() == 0) {
+        if (requestList.size() == 0) { // Creating a process request
           pr = OBProvider.getInstance().get(ProcessRequest.class);
           pr.setProcess(HBProcess);
           pr.setActive(true);
-          pr.setSecurityBasedOnRole(true);
-          pr.setFrequency(WEEKLY);
-          pr.setFriday(true);
-          pr.setTiming(SCHEDULE);
           final ProcessContext context = new ProcessContext(vars);
           pr.setOpenbravoContext(context.toString());
-
         } else {
           pr = requestList.get(0);
         }
 
+        // Schedule the next beat in 7 days
+        Calendar c1 = Calendar.getInstance();
+        c1.add(Calendar.DATE, 7);
+        pr.setStartDate(c1.getTime());
+
+        // At today's same time
+        pr.setStartTime(new Timestamp(Calendar.getInstance().getTimeInMillis()));
+
+        pr.setSecurityBasedOnRole(true);
+        pr.setDailyOption(EVERY_N_DAYS);
+        pr.setDailyInterval(Long.parseLong("7"));
+        pr.setTiming(SCHEDULE);
+
         OBDal.getInstance().save(pr);
 
+        // SQLC uses a different connection
         OBDal.getInstance().commitAndClose();
 
         final ProcessBundle bundle2 = ProcessBundle.request(pr.getId(), vars, this);
@@ -169,13 +203,36 @@
           OBScheduler.getInstance().reschedule(pr.getId(), bundle2);
         }
 
-        String msg = Utility.messageBD(this, "HB_SUCCESS", vars.getLanguage());
-        advisePopUp(request, response, "SUCCESS", "Heartbeat Configuration", msg);
-
+        if (vars.commandIn("CONFIGURE_MODULE")) {
+          // Continue with the module install
+          String recordId = vars.getStringParameter("inpcRecordId", IsIDFilter.instance);
+          response.sendRedirect(strDireccion
+              + "/ad_forms/ModuleManagement.html?Command=INSTALL&inpcRecordId=" + recordId);
+        } else {
+          // Prompt HB configured
+          String msg = Utility.messageBD(this, "HB_SUCCESS", vars.getLanguage());
+          advisePopUpRefresh(request, response, "SUCCESS", "Heartbeat Configuration", msg);
+        }
       } catch (Exception e) {
         log4j.error(e.getMessage(), e);
-        advisePopUp(request, response, "ERROR", "Heartbeat Configuration", e.getMessage());
+        advisePopUpRefresh(request, response, "ERROR", "Heartbeat Configuration", e.getMessage());
       }
     }
   }
+
+  private void printPageRedirect(HttpServletResponse response, VariablesSecureApp vars)
+      throws IOException, ServletException {
+    response.setContentType("text/html; charset=UTF-8");
+    final PrintWriter out = response.getWriter();
+
+    XmlDocument xmlDocument = null;
+    xmlDocument = xmlEngine.readXmlTemplate("org/openbravo/erpCommon/ad_process/HeartbeatRedirect")
+        .createXmlDocument();
+
+    xmlDocument.setParameter("directory", "var baseDirectory = \"" + strReplaceWith + "/\";\n");
+    xmlDocument.setParameter("language", "defaultLang=\"" + vars.getLanguage() + "\";");
+    xmlDocument.setParameter("theme", vars.getTheme());
+    out.println(xmlDocument.print());
+    out.close();
+  }
 }
--- a/src/org/openbravo/erpCommon/modules/ImportModule.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/modules/ImportModule.java	Tue Sep 22 12:40:41 2009 +0200
@@ -80,7 +80,7 @@
  * 
  */
 public class ImportModule {
-  private static ConnectionProvider pool;
+  static ConnectionProvider pool;
   static Logger log4j = Logger.getLogger(ImportModule.class);
   private String obDir;
   private Database db;
@@ -92,7 +92,7 @@
   private Module[] modulesToUpdate = null;
   private StringBuffer log = new StringBuffer();
   private int logLevel = 0;
-  private VariablesSecureApp vars;
+  VariablesSecureApp vars;
 
   public static final int MSG_SUCCESS = 0;
   public static final int MSG_WARN = 1;
@@ -222,7 +222,7 @@
             "Cannot perform installation correctly: " + errors.getMessage()
                 + (force ? ". Forced anyway" : ""), "E");
       } catch (final ServletException ex) {
-        ex.printStackTrace();
+        log4j.error(ex);
       }
     }
     return checked;
@@ -244,6 +244,7 @@
     modulesToInstall = mid.getModulesToInstall();
     modulesToUpdate = mid.getModulesToUpdate();
     checked = mid.isValidConfiguration();
+
     return checked;
   }
 
@@ -258,7 +259,18 @@
     final File file = new File(fileName);
     if (!file.exists())
       throw new Exception("File " + fileName + " do not exist!");
-    execute(new FileInputStream(fileName), new FileInputStream(fileName));
+    execute(new FileInputStream(fileName));
+  }
+
+  /**
+   * Deprecated, use instead ImportModule.execute(InputStream file)
+   * 
+   * @param file
+   * @param file2
+   */
+  @Deprecated
+  public void execute(InputStream file, InputStream file2) {
+    execute(file);
   }
 
   /**
@@ -268,7 +280,7 @@
    * This method receives a InputStream of the obx file
    * 
    */
-  public void execute(InputStream file, InputStream file2) {
+  public void execute(InputStream file) {
     try {
       if (checked || force) {
         if (installLocally) {
@@ -278,7 +290,11 @@
               .getModuleID()
               : modulesToUpdate[0].getModuleID();
 
-          installModule(file, moduleToInstallID);
+          final Vector<DynaBean> dynMod = new Vector<DynaBean>();
+          final Vector<DynaBean> dynDep = new Vector<DynaBean>();
+          final Vector<DynaBean> dynDbPrefix = new Vector<DynaBean>();
+
+          installModule(file, moduleToInstallID, dynMod, dynDep, dynDbPrefix);
 
           if (moduleToInstallID.equals("0"))
             Utility.mergeOpenbravoProperties(obDir + "/config/Openbravo.properties", obDir
@@ -300,13 +316,13 @@
         }
       }
     } catch (final Exception e) {
-      e.printStackTrace();
+      log4j.error(e);
       addLog(e.toString(), MSG_ERROR);
       try {
         ImportModuleData.insertLog(pool, (vars == null ? "0" : vars.getUser()), "", "", "", e
             .toString(), "E");
       } catch (final ServletException ex) {
-        ex.printStackTrace();
+        log4j.error(ex);
       }
       rollback();
     }
@@ -326,7 +342,7 @@
       loc = new WebServiceImplServiceLocator();
       ws = loc.getWebService();
     } catch (final Exception e) {
-      e.printStackTrace();
+      log4j.error(e);
       addLog("@CouldntConnectToWS@", MSG_ERROR);
       try {
         ImportModuleData.insertLog(pool, (vars == null ? "0" : vars.getUser()), "", "", "",
@@ -347,16 +363,19 @@
       if (modulesToInstall != null) {
         for (int i = 0; i < modulesToInstall.length; i++) {
           try {
-            final byte[] getMod = ws.getModule(modulesToInstall[i].getModuleVersionID());
-            ByteArrayInputStream obx = new ByteArrayInputStream(getMod);
+            // get remote module obx
+            InputStream obx = ModuleUtiltiy.getRemoteModule(this, modulesToInstall[i]
+                .getModuleVersionID());
+            if (obx == null) {
+              return;
+            }
 
-            installModule(obx, modulesToInstall[i].getModuleID());
-            // Add entries in .classpath for eclipse users
             final Vector<DynaBean> dynMod = new Vector<DynaBean>();
             final Vector<DynaBean> dynDep = new Vector<DynaBean>();
             final Vector<DynaBean> dynDbPrefix = new Vector<DynaBean>();
-            obx = new ByteArrayInputStream(getMod);
-            getModulesFromObx(dynMod, dynDep, dynDbPrefix, obx);
+            installModule(obx, modulesToInstall[i].getModuleID(), dynMod, dynDep, dynDbPrefix);
+
+            // Add entries in .classpath for eclipse users
             insertDynaModulesInDB(dynMod, dynDep, dynDbPrefix);
             addDynaClasspathEntries(dynMod);
           } catch (final Exception e) {
@@ -380,14 +399,18 @@
       if (modulesToUpdate != null) {
         for (int i = 0; i < modulesToUpdate.length; i++) {
           try {
-            final byte[] getMod = ws.getModule(modulesToUpdate[i].getModuleVersionID());
-            installModule(new ByteArrayInputStream(getMod), modulesToUpdate[i].getModuleID());
+            // get remote module obx
+            InputStream obx = ModuleUtiltiy.getRemoteModule(this, modulesToUpdate[i]
+                .getModuleVersionID());
+            if (obx == null) {
+              return;
+            }
 
             final Vector<DynaBean> dynMod = new Vector<DynaBean>();
             final Vector<DynaBean> dynDep = new Vector<DynaBean>();
             final Vector<DynaBean> dynDBPrefix = new Vector<DynaBean>();
+            installModule(obx, modulesToUpdate[i].getModuleID(), dynMod, dynDep, dynDBPrefix);
 
-            getModulesFromObx(dynMod, dynDep, dynDBPrefix, new ByteArrayInputStream(getMod));
             insertDynaModulesInDB(dynMod, dynDep, dynDBPrefix);
 
             if (modulesToUpdate[i].getModuleID().equals("0"))
@@ -440,6 +463,7 @@
         } catch (final Exception e) {
           e.printStackTrace();
         }
+        log4j.info("Removing old core version files...");
         Utility.deleteDir(core);
       } else { // updating a module different than core
 
@@ -457,6 +481,7 @@
             Zip.zip(obDir + "/modules/" + moduleInDB.javapackage, obDir + "/backup_install/"
                 + moduleInDB.javapackage + "-" + moduleInDB.version + ".zip");
             // Delete directory to be updated
+            log4j.info("Removing old module version files...");
             Utility.deleteDir(new File(obDir + "/modules/" + moduleInDB.javapackage));
           } catch (final Exception e) {
             log4j.error(e);
@@ -513,7 +538,7 @@
    */
   public OBError getOBError(ConnectionProvider conn) {
     if (log.length() != 0) {
-      final String lang = vars.getLanguage();
+
       final OBError rt = new OBError();
       switch (logLevel) {
       case MSG_ERROR:
@@ -526,9 +551,15 @@
         rt.setType("Success");
         break;
       }
-      rt.setMessage(Utility.parseTranslation(conn, vars, lang, log.toString()));
 
-      rt.setTitle(Utility.messageBD(conn, rt.getType(), lang));
+      if (vars != null) {
+        final String lang = vars.getLanguage();
+        rt.setMessage(Utility.parseTranslation(conn, vars, lang, log.toString()));
+        rt.setTitle(Utility.messageBD(conn, rt.getType(), lang));
+      } else {
+        rt.setMessage(log.toString());
+        rt.setTitle(rt.getType());
+      }
       return rt;
     } else
       return null;
@@ -546,7 +577,7 @@
       ImportModuleData.insertLog(pool, (vars == null ? "0" : vars.getUser()), "", "", "",
           "Rollback installation", "E");
     } catch (final ServletException ex) {
-      ex.printStackTrace();
+      log4j.error(ex);
     }
     if (modulesToInstall != null && modulesToInstall.length > 0) {
       for (int i = 0; i < modulesToInstall.length; i++) {
@@ -557,7 +588,7 @@
           ImportModuleData.deleteDBPrefix(pool, modulesToInstall[i].getModuleID());
           ImportModuleData.deleteModule(pool, modulesToInstall[i].getModuleID());
         } catch (final Exception e) {
-          e.printStackTrace();
+          log4j.error(e);
           addLog("Error deleting module " + modulesToInstall[i].getName() + " from db. "
               + e.getMessage(), MSG_ERROR);
         }
@@ -582,7 +613,7 @@
             Zip.unzip(obDir + "/backup_install/" + modulesToUpdate[i].getPackageName() + "-"
                 + modulesToUpdate[i].getVersionNo() + ".zip", obDir);
           } catch (final Exception e) {
-            e.printStackTrace();
+            log4j.error(e);
           }
         } else { // restore regular modules
           try {
@@ -591,7 +622,7 @@
                 + modulesToUpdate[i].getVersionNo() + ".zip", obDir + "/modules/"
                 + modulesToUpdate[i].getPackageName());
           } catch (final Exception e) {
-            e.printStackTrace();
+            log4j.error(e);
           }
         }
       }
@@ -626,7 +657,7 @@
    * Adds a message with a log level to the current instance log.
    * 
    */
-  private void addLog(String m, int level) {
+  void addLog(String m, int level) {
     log4j.info(m);
     if (level > logLevel) {
       logLevel = level;
@@ -654,6 +685,9 @@
       rt[i].setDescription((String) dynModule.get("DESCRIPTION"));
       rt[i].setHelp((String) dynModule.get("HELP"));
       rt[i].setDependencies(dyanaBeanToDependencies(dynDependencies, rt[i].getModuleID()));
+      // old modules don't have iscommercial column
+      Object isCommercial = dynModule.get("ISCOMMERCIAL");
+      rt[i].setIsCommercial(isCommercial != null && ((String) isCommercial).equals("Y"));
       rt[i].setModuleVersionID((String) dynModule.get("AD_MODULE_ID")); // To
       // show
       // details
@@ -762,6 +796,18 @@
     return ba;
   }
 
+  private byte[] getBytesCurrentEntryStream(ZipInputStream obxInputStream) throws Exception {
+    final ByteArrayOutputStream fout = new ByteArrayOutputStream();
+    final byte[] buf = new byte[1024];
+    int len;
+    while ((len = obxInputStream.read(buf)) > 0) {
+      fout.write(buf, 0, len);
+    }
+
+    fout.close();
+    return fout.toByteArray();
+  }
+
   /**
    * Inserts in database the Vector<DynaBean> with its dependencies
    * 
@@ -842,6 +888,8 @@
   /**
    * Returns all the modules and dependencies described within the obx file (as InputStream)
    * 
+   * Used to check dependencies in local intallation
+   * 
    * @param dModulesToInstall
    * @param dDependencies
    * @param obx
@@ -864,7 +912,7 @@
         getModulesFromObx(dModulesToInstall, dDependencies, dDBprefix, ba);
       } else if (entry.getName().replace("\\", "/").endsWith(
           "src-db/database/sourcedata/AD_MODULE.xml")) {
-        final Vector<DynaBean> module = getEntryDynaBeans(obxInputStream);
+        final Vector<DynaBean> module = getEntryDynaBeans(getBytesCurrentEntryStream(obxInputStream));
         boolean isPackage = false;
         if (module != null && module.size() > 0) {
           isPackage = !((String) module.get(0).get("TYPE")).equals("M");
@@ -874,12 +922,12 @@
         foundModule = true && !isPackage;
       } else if (entry.getName().replace("\\", "/").endsWith(
           "src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml")) {
-        dDependencies.addAll(getEntryDynaBeans(obxInputStream));
+        dDependencies.addAll(getEntryDynaBeans(getBytesCurrentEntryStream(obxInputStream)));
         obxInputStream.closeEntry();
         foundDependency = true;
       } else if (entry.getName().replace("\\", "/").endsWith(
           "src-db/database/sourcedata/AD_MODULE_DBPREFIX.xml")) {
-        dDBprefix.addAll(getEntryDynaBeans(obxInputStream));
+        dDBprefix.addAll(getEntryDynaBeans(getBytesCurrentEntryStream(obxInputStream)));
         obxInputStream.closeEntry();
         foundPrefix = true;
       } else
@@ -896,8 +944,9 @@
    * @return
    * @throws Exception
    */
-  private Vector<DynaBean> getEntryDynaBeans(ZipInputStream obxInputStream) throws Exception {
-    final ByteArrayInputStream ba = getCurrentEntryStream(obxInputStream);
+  private Vector<DynaBean> getEntryDynaBeans(byte[] obxEntryBytes) throws Exception {
+    final ByteArrayInputStream ba = new ByteArrayInputStream(obxEntryBytes);
+
     final DatabaseDataIO io = new DatabaseDataIO();
     final DataReader dr = io.getConfiguredCompareDataReader(db);
     dr.getSink().start();
@@ -913,7 +962,8 @@
    *          The ID for the current module to install
    * @throws Exception
    */
-  private void installModule(InputStream obx, String moduleID) throws Exception {
+  private void installModule(InputStream obx, String moduleID, Vector<DynaBean> dModulesToInstall,
+      Vector<DynaBean> dDependencies, Vector<DynaBean> dDBprefix) throws Exception {
     if (!(new File(obDir + "/modules").canWrite())) {
       addLog("@CannotWriteDirectory@ " + obDir + "/modules. ", MSG_ERROR);
       throw new PermissionException("Cannot write on directory: " + obDir + "/modules");
@@ -925,28 +975,15 @@
       if (entry.getName().endsWith(".obx")) { // If it is a new module
         // install it
         if (installLocally) {
-          final ByteArrayOutputStream fout = new ByteArrayOutputStream();
-          final byte[] buf = new byte[1024];
-          int len;
-          while ((len = obxInputStream.read(buf)) > 0) {
-            fout.write(buf, 0, len);
-          }
+          final ByteArrayInputStream ba = new ByteArrayInputStream(
+              getBytesCurrentEntryStream(obxInputStream));
 
-          fout.close();
-          final ByteArrayInputStream ba = new ByteArrayInputStream(fout.toByteArray());
-          final ByteArrayInputStream ba1 = new ByteArrayInputStream(fout.toByteArray());
-
-          // Obtain the ID for the module to be installed (this is
-          // done for core)
-          final Vector<DynaBean> obxModule = new Vector<DynaBean>();
-          getModulesFromObx(obxModule, new Vector<DynaBean>(), new Vector<DynaBean>(), ba1);
-
-          installModule(ba, (String) obxModule.get(0).get("AD_MODULE_ID"));
+          installModule(ba, moduleID, dModulesToInstall, dDependencies, dDBprefix);
         } // If install remotely it is no necessary to install the .obx
         // because it will be get from CR
         obxInputStream.closeEntry();
       } else {
-
+        // Unzip the contents
         final String fileName = obDir + (moduleID.equals("0") ? "/" : "/modules/")
             + entry.getName().replace("\\", "/");
         final File entryFile = new File(fileName);
@@ -966,17 +1003,51 @@
         }
 
         if (!entry.isDirectory()) {
+          // It is a file
+          byte[] entryBytes = null;
+          boolean found = false;
+          // Read the xml file to obtain module info
+          if (entry.getName().replace("\\", "/").endsWith(
+              "src-db/database/sourcedata/AD_MODULE.xml")) {
+            entryBytes = getBytesCurrentEntryStream(obxInputStream);
+            final Vector<DynaBean> module = getEntryDynaBeans(entryBytes);
+            dModulesToInstall.addAll(module);
+            moduleID = (String) module.get(0).get("AD_MODULE_ID");
+            obxInputStream.closeEntry();
+            found = true;
+          } else if (entry.getName().replace("\\", "/").endsWith(
+              "src-db/database/sourcedata/AD_MODULE_DEPENDENCY.xml")) {
+            entryBytes = getBytesCurrentEntryStream(obxInputStream);
+            dDependencies.addAll(getEntryDynaBeans(entryBytes));
+            obxInputStream.closeEntry();
+            found = true;
+          } else if (entry.getName().replace("\\", "/").endsWith(
+              "src-db/database/sourcedata/AD_MODULE_DBPREFIX.xml")) {
+            entryBytes = getBytesCurrentEntryStream(obxInputStream);
+            dDBprefix.addAll(getEntryDynaBeans(entryBytes));
+            obxInputStream.closeEntry();
+            found = true;
+          }
+
           // Unzip the file
           log4j.info("Installing " + fileName);
+
           final FileOutputStream fout = new FileOutputStream(entryFile);
-          final byte[] buf = new byte[1024];
 
-          int len;
-          while ((len = obxInputStream.read(buf)) > 0) {
-            fout.write(buf, 0, len);
+          if (found) {
+            // the entry is already read as a byte[]
+            fout.write(entryBytes);
+          } else {
+            final byte[] buf = new byte[4096];
+            int len;
+            while ((len = obxInputStream.read(buf)) > 0) {
+              fout.write(buf, 0, len);
+            }
           }
+
           fout.close();
         }
+
         obxInputStream.closeEntry();
       }
     }
@@ -1011,7 +1082,7 @@
         }
       }
     } catch (final ServletException e) {
-      e.printStackTrace();
+      log4j.error(e);
     }
   }
 
@@ -1039,12 +1110,12 @@
         updates = ws.moduleScanForUpdates(currentlyInstalledModules);
       } catch (final Exception e) {
         // do nothing just log the error
-        e.printStackTrace();
+        log4j.error(e);
         try {
           ImportModuleData.insertLog(conn, user, "", "", "",
               "Scan for updates: Couldn't contact with webservice server", "E");
         } catch (final ServletException ex) {
-          ex.printStackTrace();
+          log4j.error(e);
         }
         return updateModules; // return empty hashmap
       }
@@ -1066,16 +1137,16 @@
         ImportModuleData.insertLog(conn, (vars == null ? "0" : vars.getUser()), "", "", "",
             "Total: found " + updateModules.size() + " updates", "S");
       } catch (final ServletException ex) {
-        ex.printStackTrace();
+        log4j.error(ex);
       }
       return updateModules;
     } catch (final Exception e) {
-      e.printStackTrace();
+      log4j.error(e);
       try {
         ImportModuleData.insertLog(conn, (vars == null ? "0" : vars.getUser()), "", "", "",
             "Scan for updates: Error: " + e.toString(), "E");
       } catch (final ServletException ex) {
-        ex.printStackTrace();
+        log4j.error(ex);
       }
       return new HashMap<String, String>();
     }
@@ -1095,7 +1166,7 @@
       parentId = ImportModuleData.getParentNode(conn, node);
     } catch (final ServletException e) {
       // do nothing just stop adding elements
-      e.printStackTrace();
+      log4j.error(e);
       return;
     }
     if (parentId == null || parentId.equals(""))
@@ -1118,7 +1189,7 @@
     try {
       data = ImportModuleData.selectInstalled(conn);
     } catch (final Exception e) {
-      e.printStackTrace();
+      log4j.error(e);
     }
     if (data != null) {
       for (int i = 0; i < data.length; i++) {
--- a/src/org/openbravo/erpCommon/modules/ModuleUtiltiy.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/modules/ModuleUtiltiy.java	Tue Sep 22 12:40:41 2009 +0200
@@ -19,12 +19,24 @@
 
 package org.openbravo.erpCommon.modules;
 
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.URL;
+import java.net.URLEncoder;
+import java.rmi.RemoteException;
 import java.util.ArrayList;
 
 import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletResponse;
 
+import org.apache.axis.AxisFault;
+import org.apache.log4j.Logger;
 import org.openbravo.data.FieldProvider;
 import org.openbravo.database.ConnectionProvider;
+import org.openbravo.erpCommon.obps.ActivationKey;
+import org.openbravo.erpCommon.utility.HttpsUtils;
+import org.openbravo.services.webservice.WebServiceImpl;
+import org.openbravo.services.webservice.WebServiceImplServiceLocator;
 
 /**
  * This class implements different utilities related to modules
@@ -32,6 +44,7 @@
  * 
  */
 public class ModuleUtiltiy {
+  protected static Logger log4j = Logger.getLogger(ModuleUtiltiy.class);
 
   /**
    * It receives an ArrayList<String> with modules IDs and returns the same list ordered taking into
@@ -68,7 +81,7 @@
 
       return rt;
     } catch (Exception e) {
-      e.printStackTrace();
+      log4j.error(e);
       return modules;
     }
   }
@@ -131,4 +144,88 @@
     modules = rt;
     return;
   }
+
+  /**
+   * Obtains remotelly an obx for the desired moduleVersionID
+   * 
+   * @param im
+   *          {@link ImportModule} instance used to add the log
+   * @param moduleVersionID
+   *          ID for the module version to obtain
+   * @return An {@link InputStream} with containing the obx for the module (null if error)
+   */
+  public static InputStream getRemoteModule(ImportModule im, String moduleVersionID) {
+    WebServiceImplServiceLocator loc;
+    WebServiceImpl ws = null;
+    String strUrl = "";
+    boolean isCommercial;
+
+    try {
+      loc = new WebServiceImplServiceLocator();
+      ws = loc.getWebService();
+    } catch (final Exception e) {
+      log4j.error(e);
+      im.addLog("@CouldntConnectToWS@", ImportModule.MSG_ERROR);
+      try {
+        ImportModuleData.insertLog(ImportModule.pool, (im.vars == null ? "0" : im.vars.getUser()),
+            "", "", "", "Couldn't contact with webservice server", "E");
+      } catch (final ServletException ex) {
+        log4j.error(ex);
+      }
+      return null;
+    }
+
+    try {
+      isCommercial = ws.isCommercial(moduleVersionID);
+      strUrl = ws.getURLforDownload(moduleVersionID);
+    } catch (AxisFault e1) {
+      im.addLog("@" + e1.getFaultCode() + "@", ImportModule.MSG_ERROR);
+      return null;
+    } catch (RemoteException e) {
+      im.addLog(e.getMessage(), ImportModule.MSG_ERROR);
+      return null;
+    }
+
+    if (isCommercial && !ActivationKey.isActiveInstance()) {
+      im.addLog("@NotCommercialModulesAllowed@", ImportModule.MSG_ERROR);
+      return null;
+    }
+
+    try {
+      URL url = new URL(strUrl);
+      HttpURLConnection conn = null;
+
+      if (strUrl.startsWith("https://")) {
+        ActivationKey ak = new ActivationKey();
+        String instanceKey = "obinstance=" + URLEncoder.encode(ak.getPublicKey(), "utf-8");
+        conn = HttpsUtils.sendHttpsRequest(url, instanceKey, "localhost-1", "changeit");
+      } else {
+        conn = (HttpURLConnection) url.openConnection();
+        conn.setRequestProperty("Keep-Alive", "300");
+        conn.setRequestProperty("Connection", "keep-alive");
+        conn.setRequestMethod("GET");
+        conn.setDoInput(true);
+        conn.setDoOutput(true);
+        conn.setUseCaches(false);
+        conn.setAllowUserInteraction(false);
+      }
+
+      if (conn.getResponseCode() == HttpServletResponse.SC_OK) {
+        // OBX is ready to be used
+        return conn.getInputStream();
+      }
+
+      // There is an error, let's check for a parseable message
+      String msg = conn.getHeaderField("OB-ErrMessage");
+      if (msg != null) {
+        im.addLog(msg, ImportModule.MSG_ERROR);
+      } else {
+        im.addLog("@ErrorDownloadingOBX@ " + conn.getResponseCode(), ImportModule.MSG_ERROR);
+      }
+    } catch (Exception e) {
+      im.addLog("@ErrorDownloadingOBX@ " + e.getMessage(), ImportModule.MSG_ERROR);
+    }
+    return null;
+
+  }
 }
--- a/src/org/openbravo/erpCommon/obps/ActivationKey.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/obps/ActivationKey.java	Tue Sep 22 12:40:41 2009 +0200
@@ -451,4 +451,8 @@
     return moduleList;
   }
 
+  public boolean isModuleSubscribed(String moduleId, boolean onlyActive) {
+    return getSubscribedModules(onlyActive).contains(moduleId);
+  }
+
 }
--- a/src/org/openbravo/erpCommon/utility/HttpsUtils.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/erpCommon/utility/HttpsUtils.java	Tue Sep 22 12:40:41 2009 +0200
@@ -232,18 +232,11 @@
   static String sendSecure(HttpsURLConnection conn, String data) throws IOException {
     String result = null;
     BufferedReader br = null;
-    BufferedWriter bw = null;
     try {
-      conn.setDoOutput(true);
-
-      bw = new BufferedWriter(new OutputStreamWriter(conn.getOutputStream()));
-      bw.write(data);
-      bw.flush();
-      bw.close();
-
       String s = null;
       StringBuilder sb = new StringBuilder();
-      br = new BufferedReader(new InputStreamReader(conn.getInputStream()));
+      br = new BufferedReader(new InputStreamReader(sendSecureHttpsConnection(conn, data)
+          .getInputStream()));
       while ((s = br.readLine()) != null) {
         sb.append(s + "\n");
       }
@@ -256,11 +249,41 @@
     return result;
   }
 
+  private static HttpsURLConnection sendSecureHttpsConnection(HttpsURLConnection conn, String data)
+      throws IOException {
+    BufferedWriter bw = null;
+    try {
+      conn.setDoOutput(true);
+
+      bw = new BufferedWriter(new OutputStreamWriter(conn.getOutputStream()));
+      bw.write(data);
+      bw.flush();
+      bw.close();
+
+      return conn;
+    } catch (IOException e) {
+      log4j.error(e.getMessage(), e);
+      throw e;
+    }
+  }
+
   public static String sendSecure(URL url, String data, String alias, String passphrase)
       throws GeneralSecurityException, IOException {
+    HttpsURLConnection conn = getHttpsConn(url, alias, passphrase);
+    return sendSecure(conn, data);
+  }
+
+  public static HttpURLConnection sendHttpsRequest(URL url, String data, String alias,
+      String passphrase) throws GeneralSecurityException, IOException {
+
+    HttpsURLConnection conn = getHttpsConn(url, alias, passphrase);
+    return sendSecureHttpsConnection(conn, data);
+
+  }
+
+  public static HttpsURLConnection getHttpsConn(URL url, String alias, String passphrase)
+      throws KeyStoreException, GeneralSecurityException, SSLHandshakeException {
     KeyStore ks = null;
-    HttpsURLConnection conn = null;
-
     try {
       ks = loadKeyStore(passphrase);
     } catch (KeyStoreException e) { // Problem loading keystore
@@ -273,13 +296,11 @@
     }
     // Now try and establish the secure connection
     try {
-      conn = getSecureConnection(url, ks);
+      return getSecureConnection(url, ks);
     } catch (GeneralSecurityException e) {
       log4j.error(e.getMessage(), e);
       throw new SSLHandshakeException(e.getMessage());
     }
-    // If we get to here it's time to send.
-    return sendSecure(conn, data);
   }
 
   public static String encode(String queryStr, String encoding) {
--- a/src/org/openbravo/scheduling/OBScheduler.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/scheduling/OBScheduler.java	Tue Sep 22 12:40:41 2009 +0200
@@ -226,17 +226,17 @@
   }
 
   /**
-   * @param sched
+   * @param schdlr
    * @throws SchedulerException
    */
-  public void initialize(Scheduler sched) throws SchedulerException {
-    this.ctx = sched.getContext();
-    this.sched = sched;
+  public void initialize(Scheduler schdlr) throws SchedulerException {
+    this.ctx = schdlr.getContext();
+    this.sched = schdlr;
 
     final ProcessMonitor monitor = new ProcessMonitor("Monitor." + OB_GROUP, this.ctx);
-    sched.addSchedulerListener(monitor);
-    sched.addGlobalJobListener(monitor);
-    sched.addGlobalTriggerListener(monitor);
+    schdlr.addSchedulerListener(monitor);
+    schdlr.addGlobalJobListener(monitor);
+    schdlr.addGlobalTriggerListener(monitor);
 
     dateTimeFormat = getConfigParameters().getJavaDateTimeFormat();
     ProcessRequestData[] data = null;
--- a/src/org/openbravo/scheduling/ProcessBundle.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/scheduling/ProcessBundle.java	Tue Sep 22 12:40:41 2009 +0200
@@ -310,6 +310,7 @@
    * @throws ServletException
    *           if an error occurrs retrieving the request from the database
    */
+  @SuppressWarnings("unchecked")
   public static final ProcessBundle request(String requestId, VariablesSecureApp vars,
       ConnectionProvider conn) throws ServletException {
     final ProcessRequestData data = ProcessRequestData.select(conn, requestId);
--- a/src/org/openbravo/services/webservice/Module.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/services/webservice/Module.java	Tue Sep 22 12:40:41 2009 +0200
@@ -40,6 +40,8 @@
 
     private java.lang.String versionNo;
 
+    private java.lang.Boolean isCommercial;
+
     public Module() {
     }
 
@@ -59,7 +61,8 @@
            java.lang.String type,
            java.lang.String updateDescription,
            java.lang.String url,
-           java.lang.String versionNo) {
+           java.lang.String versionNo,
+           java.lang.Boolean isCommercial) {
            this.author = author;
            this.dbPrefix = dbPrefix;
            this.dependencies = dependencies;
@@ -76,6 +79,7 @@
            this.updateDescription = updateDescription;
            this.url = url;
            this.versionNo = versionNo;
+           this.isCommercial = isCommercial;
     }
 
 
@@ -398,6 +402,26 @@
         this.versionNo = versionNo;
     }
 
+
+    /**
+     * Gets the isCommercial value for this Module.
+     * 
+     * @return isCommercial
+     */
+    public java.lang.Boolean getIsCommercial() {
+        return isCommercial;
+    }
+
+
+    /**
+     * Sets the isCommercial value for this Module.
+     * 
+     * @param isCommercial
+     */
+    public void setIsCommercial(java.lang.Boolean isCommercial) {
+        this.isCommercial = isCommercial;
+    }
+
     private java.lang.Object __equalsCalc = null;
     public synchronized boolean equals(java.lang.Object obj) {
         if (!(obj instanceof Module)) return false;
@@ -457,7 +481,10 @@
               this.url.equals(other.getUrl()))) &&
             ((this.versionNo==null && other.getVersionNo()==null) || 
              (this.versionNo!=null &&
-              this.versionNo.equals(other.getVersionNo())));
+              this.versionNo.equals(other.getVersionNo()))) &&
+            ((this.isCommercial==null && other.getIsCommercial()==null) || 
+             (this.isCommercial!=null &&
+              this.isCommercial.equals(other.getIsCommercial())));
         __equalsCalc = null;
         return _equals;
     }
@@ -533,6 +560,9 @@
         if (getVersionNo() != null) {
             _hashCode += getVersionNo().hashCode();
         }
+        if (getIsCommercial() != null) {
+            _hashCode += getIsCommercial().hashCode();
+        }
         __hashCodeCalc = false;
         return _hashCode;
     }
@@ -542,7 +572,7 @@
         new org.apache.axis.description.TypeDesc(Module.class, true);
 
     static {
-        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService", "Module"));
+        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService2", "Module"));
         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
         elemField.setFieldName("author");
         elemField.setXmlName(new javax.xml.namespace.QName("", "author"));
@@ -558,7 +588,7 @@
         elemField = new org.apache.axis.description.ElementDesc();
         elemField.setFieldName("dependencies");
         elemField.setXmlName(new javax.xml.namespace.QName("", "dependencies"));
-        elemField.setXmlType(new javax.xml.namespace.QName("/services/WebService", "ModuleDependency"));
+        elemField.setXmlType(new javax.xml.namespace.QName("/services/WebService2", "ModuleDependency"));
         elemField.setNillable(true);
         typeDesc.addFieldDesc(elemField);
         elemField = new org.apache.axis.description.ElementDesc();
@@ -576,7 +606,7 @@
         elemField = new org.apache.axis.description.ElementDesc();
         elemField.setFieldName("includes");
         elemField.setXmlName(new javax.xml.namespace.QName("", "includes"));
-        elemField.setXmlType(new javax.xml.namespace.QName("/services/WebService", "ModuleDependency"));
+        elemField.setXmlType(new javax.xml.namespace.QName("/services/WebService2", "ModuleDependency"));
         elemField.setNillable(true);
         typeDesc.addFieldDesc(elemField);
         elemField = new org.apache.axis.description.ElementDesc();
@@ -639,6 +669,12 @@
         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
         elemField.setNillable(true);
         typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("isCommercial");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "isCommercial"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
     }
 
     /**
--- a/src/org/openbravo/services/webservice/ModuleDependency.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/services/webservice/ModuleDependency.java	Tue Sep 22 12:40:41 2009 +0200
@@ -14,8 +14,6 @@
 
     private java.lang.String moduleVersionDependencyID;
 
-    private java.lang.String moduleVersionID;
-
     private java.lang.String versionEnd;
 
     private java.lang.String versionStart;
@@ -27,13 +25,11 @@
            java.lang.String moduleID,
            java.lang.String moduleName,
            java.lang.String moduleVersionDependencyID,
-           java.lang.String moduleVersionID,
            java.lang.String versionEnd,
            java.lang.String versionStart) {
            this.moduleID = moduleID;
            this.moduleName = moduleName;
            this.moduleVersionDependencyID = moduleVersionDependencyID;
-           this.moduleVersionID = moduleVersionID;
            this.versionEnd = versionEnd;
            this.versionStart = versionStart;
     }
@@ -100,26 +96,6 @@
 
 
     /**
-     * Gets the moduleVersionID value for this ModuleDependency.
-     * 
-     * @return moduleVersionID
-     */
-    public java.lang.String getModuleVersionID() {
-        return moduleVersionID;
-    }
-
-
-    /**
-     * Sets the moduleVersionID value for this ModuleDependency.
-     * 
-     * @param moduleVersionID
-     */
-    public void setModuleVersionID(java.lang.String moduleVersionID) {
-        this.moduleVersionID = moduleVersionID;
-    }
-
-
-    /**
      * Gets the versionEnd value for this ModuleDependency.
      * 
      * @return versionEnd
@@ -179,9 +155,6 @@
             ((this.moduleVersionDependencyID==null && other.getModuleVersionDependencyID()==null) || 
              (this.moduleVersionDependencyID!=null &&
               this.moduleVersionDependencyID.equals(other.getModuleVersionDependencyID()))) &&
-            ((this.moduleVersionID==null && other.getModuleVersionID()==null) || 
-             (this.moduleVersionID!=null &&
-              this.moduleVersionID.equals(other.getModuleVersionID()))) &&
             ((this.versionEnd==null && other.getVersionEnd()==null) || 
              (this.versionEnd!=null &&
               this.versionEnd.equals(other.getVersionEnd()))) &&
@@ -208,9 +181,6 @@
         if (getModuleVersionDependencyID() != null) {
             _hashCode += getModuleVersionDependencyID().hashCode();
         }
-        if (getModuleVersionID() != null) {
-            _hashCode += getModuleVersionID().hashCode();
-        }
         if (getVersionEnd() != null) {
             _hashCode += getVersionEnd().hashCode();
         }
@@ -226,7 +196,7 @@
         new org.apache.axis.description.TypeDesc(ModuleDependency.class, true);
 
     static {
-        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService", "ModuleDependency"));
+        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService2", "ModuleDependency"));
         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
         elemField.setFieldName("moduleID");
         elemField.setXmlName(new javax.xml.namespace.QName("", "moduleID"));
@@ -246,12 +216,6 @@
         elemField.setNillable(true);
         typeDesc.addFieldDesc(elemField);
         elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("moduleVersionID");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "moduleVersionID"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
         elemField.setFieldName("versionEnd");
         elemField.setXmlName(new javax.xml.namespace.QName("", "versionEnd"));
         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
--- a/src/org/openbravo/services/webservice/ModuleInstallDetail.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/services/webservice/ModuleInstallDetail.java	Tue Sep 22 12:40:41 2009 +0200
@@ -186,7 +186,7 @@
         new org.apache.axis.description.TypeDesc(ModuleInstallDetail.class, true);
 
     static {
-        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService", "ModuleInstallDetail"));
+        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService2", "ModuleInstallDetail"));
         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
         elemField.setFieldName("dependencyErrors");
         elemField.setXmlName(new javax.xml.namespace.QName("", "dependencyErrors"));
@@ -196,13 +196,13 @@
         elemField = new org.apache.axis.description.ElementDesc();
         elemField.setFieldName("modulesToInstall");
         elemField.setXmlName(new javax.xml.namespace.QName("", "modulesToInstall"));
-        elemField.setXmlType(new javax.xml.namespace.QName("/services/WebService", "Module"));
+        elemField.setXmlType(new javax.xml.namespace.QName("/services/WebService2", "Module"));
         elemField.setNillable(true);
         typeDesc.addFieldDesc(elemField);
         elemField = new org.apache.axis.description.ElementDesc();
         elemField.setFieldName("modulesToUpdate");
         elemField.setXmlName(new javax.xml.namespace.QName("", "modulesToUpdate"));
-        elemField.setXmlType(new javax.xml.namespace.QName("/services/WebService", "Module"));
+        elemField.setXmlType(new javax.xml.namespace.QName("/services/WebService2", "Module"));
         elemField.setNillable(true);
         typeDesc.addFieldDesc(elemField);
         elemField = new org.apache.axis.description.ElementDesc();
--- a/src/org/openbravo/services/webservice/SimpleModule.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/services/webservice/SimpleModule.java	Tue Sep 22 12:40:41 2009 +0200
@@ -32,6 +32,8 @@
 
     private java.lang.String versionNo;
 
+    private java.lang.Boolean isCommercial;
+
     public SimpleModule() {
     }
 
@@ -47,7 +49,8 @@
            java.lang.String type,
            java.lang.String updateDescription,
            java.lang.String url,
-           java.lang.String versionNo) {
+           java.lang.String versionNo,
+           java.lang.Boolean isCommercial) {
            this.author = author;
            this.description = description;
            this.help = help;
@@ -60,6 +63,7 @@
            this.updateDescription = updateDescription;
            this.url = url;
            this.versionNo = versionNo;
+           this.isCommercial = isCommercial;
     }
 
 
@@ -302,6 +306,26 @@
         this.versionNo = versionNo;
     }
 
+
+    /**
+     * Gets the isCommercial value for this SimpleModule.
+     * 
+     * @return isCommercial
+     */
+    public java.lang.Boolean getIsCommercial() {
+        return isCommercial;
+    }
+
+
+    /**
+     * Sets the isCommercial value for this SimpleModule.
+     * 
+     * @param isCommercial
+     */
+    public void setIsCommercial(java.lang.Boolean isCommercial) {
+        this.isCommercial = isCommercial;
+    }
+
     private java.lang.Object __equalsCalc = null;
     public synchronized boolean equals(java.lang.Object obj) {
         if (!(obj instanceof SimpleModule)) return false;
@@ -349,7 +373,10 @@
               this.url.equals(other.getUrl()))) &&
             ((this.versionNo==null && other.getVersionNo()==null) || 
              (this.versionNo!=null &&
-              this.versionNo.equals(other.getVersionNo())));
+              this.versionNo.equals(other.getVersionNo()))) &&
+            ((this.isCommercial==null && other.getIsCommercial()==null) || 
+             (this.isCommercial!=null &&
+              this.isCommercial.equals(other.getIsCommercial())));
         __equalsCalc = null;
         return _equals;
     }
@@ -397,6 +424,9 @@
         if (getVersionNo() != null) {
             _hashCode += getVersionNo().hashCode();
         }
+        if (getIsCommercial() != null) {
+            _hashCode += getIsCommercial().hashCode();
+        }
         __hashCodeCalc = false;
         return _hashCode;
     }
@@ -406,7 +436,7 @@
         new org.apache.axis.description.TypeDesc(SimpleModule.class, true);
 
     static {
-        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService", "SimpleModule"));
+        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService2", "SimpleModule"));
         org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
         elemField.setFieldName("author");
         elemField.setXmlName(new javax.xml.namespace.QName("", "author"));
@@ -479,6 +509,12 @@
         elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
         elemField.setNillable(true);
         typeDesc.addFieldDesc(elemField);
+        elemField = new org.apache.axis.description.ElementDesc();
+        elemField.setFieldName("isCommercial");
+        elemField.setXmlName(new javax.xml.namespace.QName("", "isCommercial"));
+        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
+        elemField.setNillable(true);
+        typeDesc.addFieldDesc(elemField);
     }
 
     /**
--- a/src/org/openbravo/services/webservice/WebServiceImpl.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/services/webservice/WebServiceImpl.java	Tue Sep 22 12:40:41 2009 +0200
@@ -8,19 +8,12 @@
 package org.openbravo.services.webservice;
 
 public interface WebServiceImpl extends java.rmi.Remote {
-    public byte[] getModule(java.lang.String in0) throws java.rmi.RemoteException;
-    public org.openbravo.services.webservice.Customer[] getCustomers(int in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException;
-    public org.openbravo.services.webservice.Customer getCustomer(int in0, int in1, java.lang.String in2, java.lang.String in3) throws java.rmi.RemoteException;
-    public org.openbravo.services.webservice.Customer getCustomer(int in0, java.lang.String in1, java.lang.String in2, java.lang.String in3, java.lang.String in4) throws java.rmi.RemoteException;
-    public java.lang.Boolean updateCustomer(org.openbravo.services.webservice.BusinessPartner in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException;
-    public int[] getCustomerAddresses(int in0, int in1, java.lang.String in2, java.lang.String in3) throws java.rmi.RemoteException;
-    public org.openbravo.services.webservice.Location getCustomerLocation(int in0, int in1, int in2, java.lang.String in3, java.lang.String in4) throws java.rmi.RemoteException;
-    public java.lang.Boolean updateAddress(org.openbravo.services.webservice.Location in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException;
-    public org.openbravo.services.webservice.Contact getCustomerContact(int in0, int in1, int in2, java.lang.String in3, java.lang.String in4) throws java.rmi.RemoteException;
-    public java.lang.Boolean updateContact(org.openbravo.services.webservice.Contact in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException;
-    public org.openbravo.services.webservice.SimpleModule[] moduleSearch(java.lang.String in0, java.lang.String[] in1) throws java.rmi.RemoteException;
-    public org.openbravo.services.webservice.Module moduleDetail(java.lang.String in0) throws java.rmi.RemoteException;
-    public org.openbravo.services.webservice.SimpleModule[] moduleScanForUpdates(java.util.HashMap in0) throws java.rmi.RemoteException;
-    public org.openbravo.services.webservice.Module moduleRegister(org.openbravo.services.webservice.Module in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException;
-    public org.openbravo.services.webservice.ModuleInstallDetail checkConsistency(java.util.HashMap in0, java.lang.String[] in1, java.lang.String[] in2) throws java.rmi.RemoteException;
+    public byte[] getModule(java.lang.String moduleVersionID) throws java.rmi.RemoteException;
+    public org.openbravo.services.webservice.SimpleModule[] moduleSearch(java.lang.String word, java.lang.String[] exclude) throws java.rmi.RemoteException;
+    public org.openbravo.services.webservice.Module moduleDetail(java.lang.String moduleVersionID) throws java.rmi.RemoteException;
+    public org.openbravo.services.webservice.SimpleModule[] moduleScanForUpdates(java.util.HashMap moduleIdInstalledModules) throws java.rmi.RemoteException;
+    public org.openbravo.services.webservice.Module moduleRegister(org.openbravo.services.webservice.Module module, java.lang.String userName, java.lang.String password) throws java.rmi.RemoteException;
+    public org.openbravo.services.webservice.ModuleInstallDetail checkConsistency(java.util.HashMap versionIdInstalled, java.lang.String[] versionIdToInstall, java.lang.String[] versionIdToUpdate) throws java.rmi.RemoteException;
+    public java.lang.String getURLforDownload(java.lang.String moduleVersionID) throws java.rmi.RemoteException;
+    public boolean isCommercial(java.lang.String moduleVersionID) throws java.rmi.RemoteException;
 }
--- a/src/org/openbravo/services/webservice/WebServiceImplServiceLocator.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/services/webservice/WebServiceImplServiceLocator.java	Tue Sep 22 12:40:41 2009 +0200
@@ -22,7 +22,7 @@
     }
 
     // Use to get a proxy class for WebService
-    private java.lang.String WebService_address = "http://centralrepository.openbravo.com/openbravo/services/WebService";
+    private java.lang.String WebService_address = "http://centralrepository.openbravo.com/openbravo/services/WebService2";
 
     public java.lang.String getWebServiceAddress() {
         return WebService_address;
@@ -54,7 +54,6 @@
         try {
             org.openbravo.services.webservice.WebServiceSoapBindingStub _stub = new org.openbravo.services.webservice.WebServiceSoapBindingStub(portAddress, this);
             _stub.setPortName(getWebServiceWSDDServiceName());
-            _stub.setTimeout(5000);
             return _stub;
         }
         catch (org.apache.axis.AxisFault e) {
@@ -106,7 +105,7 @@
     }
 
     public javax.xml.namespace.QName getServiceName() {
-        return new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "WebServiceImplService");
+        return new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "WebServiceImplService");
     }
 
     private java.util.HashSet ports = null;
@@ -114,7 +113,7 @@
     public java.util.Iterator getPorts() {
         if (ports == null) {
             ports = new java.util.HashSet();
-            ports.add(new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "WebService"));
+            ports.add(new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "WebService"));
         }
         return ports.iterator();
     }
--- a/src/org/openbravo/services/webservice/WebServiceSoapBindingImpl.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/services/webservice/WebServiceSoapBindingImpl.java	Tue Sep 22 12:40:41 2009 +0200
@@ -8,63 +8,35 @@
 package org.openbravo.services.webservice;
 
 public class WebServiceSoapBindingImpl implements org.openbravo.services.webservice.WebServiceImpl{
-    public byte[] getModule(java.lang.String in0) throws java.rmi.RemoteException {
+    public byte[] getModule(java.lang.String moduleVersionID) throws java.rmi.RemoteException {
         return null;
     }
 
-    public org.openbravo.services.webservice.Customer[] getCustomers(int in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException {
+    public org.openbravo.services.webservice.SimpleModule[] moduleSearch(java.lang.String word, java.lang.String[] exclude) throws java.rmi.RemoteException {
         return null;
     }
 
-    public org.openbravo.services.webservice.Customer getCustomer(int in0, int in1, java.lang.String in2, java.lang.String in3) throws java.rmi.RemoteException {
+    public org.openbravo.services.webservice.Module moduleDetail(java.lang.String moduleVersionID) throws java.rmi.RemoteException {
         return null;
     }
 
-    public org.openbravo.services.webservice.Customer getCustomer(int in0, java.lang.String in1, java.lang.String in2, java.lang.String in3, java.lang.String in4) throws java.rmi.RemoteException {
+    public java.lang.String getURLforDownload(java.lang.String moduleVersionID) throws java.rmi.RemoteException {
         return null;
     }
 
-    public java.lang.Boolean updateCustomer(org.openbravo.services.webservice.BusinessPartner in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException {
+    public boolean isCommercial(java.lang.String moduleVersionID) throws java.rmi.RemoteException {
+        return false;
+    }
+
+    public org.openbravo.services.webservice.SimpleModule[] moduleScanForUpdates(java.util.HashMap moduleIdInstalledModules) throws java.rmi.RemoteException {
         return null;
     }
 
-    public int[] getCustomerAddresses(int in0, int in1, java.lang.String in2, java.lang.String in3) throws java.rmi.RemoteException {
+    public org.openbravo.services.webservice.Module moduleRegister(org.openbravo.services.webservice.Module module, java.lang.String userName, java.lang.String password) throws java.rmi.RemoteException {
         return null;
     }
 
-    public org.openbravo.services.webservice.Location getCustomerLocation(int in0, int in1, int in2, java.lang.String in3, java.lang.String in4) throws java.rmi.RemoteException {
-        return null;
-    }
-
-    public java.lang.Boolean updateAddress(org.openbravo.services.webservice.Location in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException {
-        return null;
-    }
-
-    public org.openbravo.services.webservice.Contact getCustomerContact(int in0, int in1, int in2, java.lang.String in3, java.lang.String in4) throws java.rmi.RemoteException {
-        return null;
-    }
-
-    public java.lang.Boolean updateContact(org.openbravo.services.webservice.Contact in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException {
-        return null;
-    }
-
-    public org.openbravo.services.webservice.SimpleModule[] moduleSearch(java.lang.String in0, java.lang.String[] in1) throws java.rmi.RemoteException {
-        return null;
-    }
-
-    public org.openbravo.services.webservice.Module moduleDetail(java.lang.String in0) throws java.rmi.RemoteException {
-        return null;
-    }
-
-    public org.openbravo.services.webservice.SimpleModule[] moduleScanForUpdates(java.util.HashMap in0) throws java.rmi.RemoteException {
-        return null;
-    }
-
-    public org.openbravo.services.webservice.Module moduleRegister(org.openbravo.services.webservice.Module in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException {
-        return null;
-    }
-
-    public org.openbravo.services.webservice.ModuleInstallDetail checkConsistency(java.util.HashMap in0, java.lang.String[] in1, java.lang.String[] in2) throws java.rmi.RemoteException {
+    public org.openbravo.services.webservice.ModuleInstallDetail checkConsistency(java.util.HashMap versionIdInstalled, java.lang.String[] versionIdToInstall, java.lang.String[] versionIdToUpdate) throws java.rmi.RemoteException {
         return null;
     }
 
--- a/src/org/openbravo/services/webservice/WebServiceSoapBindingStub.java	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/services/webservice/WebServiceSoapBindingStub.java	Tue Sep 22 12:40:41 2009 +0200
@@ -16,9 +16,8 @@
     static org.apache.axis.description.OperationDesc [] _operations;
 
     static {
-        _operations = new org.apache.axis.description.OperationDesc[15];
+        _operations = new org.apache.axis.description.OperationDesc[8];
         _initOperationDesc1();
-        _initOperationDesc2();
     }
 
     private static void _initOperationDesc1(){
@@ -26,9 +25,9 @@
         org.apache.axis.description.ParameterDesc param;
         oper = new org.apache.axis.description.OperationDesc();
         oper.setName("getModule");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "moduleVersionID"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
         oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "base64Binary"));
+        oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "base64Binary"));
         oper.setReturnClass(byte[].class);
         oper.setReturnQName(new javax.xml.namespace.QName("", "getModuleReturn"));
         oper.setStyle(org.apache.axis.constants.Style.RPC);
@@ -36,225 +35,91 @@
         _operations[0] = oper;
 
         oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("getCustomers");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        oper.setName("moduleSearch");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "word"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "exclude"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "ArrayOf_xsd_string"), java.lang.String[].class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_tns1_Customer"));
-        oper.setReturnClass(org.openbravo.services.webservice.Customer[].class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "getCustomersReturn"));
+        oper.setReturnType(new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "ArrayOf_tns1_SimpleModule"));
+        oper.setReturnClass(org.openbravo.services.webservice.SimpleModule[].class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "moduleSearchReturn"));
         oper.setStyle(org.apache.axis.constants.Style.RPC);
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         _operations[1] = oper;
 
         oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("getCustomer");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        oper.setName("moduleDetail");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "moduleVersionID"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in3"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("/services/WebService", "Customer"));
-        oper.setReturnClass(org.openbravo.services.webservice.Customer.class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "getCustomerReturn"));
+        oper.setReturnType(new javax.xml.namespace.QName("/services/WebService2", "Module"));
+        oper.setReturnClass(org.openbravo.services.webservice.Module.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "moduleDetailReturn"));
         oper.setStyle(org.apache.axis.constants.Style.RPC);
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         _operations[2] = oper;
 
         oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("getCustomer");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        oper.setName("getURLforDownload");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "moduleVersionID"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in3"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in4"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("/services/WebService", "Customer"));
-        oper.setReturnClass(org.openbravo.services.webservice.Customer.class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "getCustomerReturn"));
+        oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
+        oper.setReturnClass(java.lang.String.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "getURLforDownloadReturn"));
         oper.setStyle(org.apache.axis.constants.Style.RPC);
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         _operations[3] = oper;
 
         oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("updateCustomer");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("/services/WebService", "BusinessPartner"), org.openbravo.services.webservice.BusinessPartner.class, false, false);
+        oper.setName("isCommercial");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "moduleVersionID"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "boolean"));
-        oper.setReturnClass(java.lang.Boolean.class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "updateCustomerReturn"));
+        oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
+        oper.setReturnClass(boolean.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "isCommercialReturn"));
         oper.setStyle(org.apache.axis.constants.Style.RPC);
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         _operations[4] = oper;
 
         oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("getCustomerAddresses");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        oper.setName("moduleScanForUpdates");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "moduleIdInstalledModules"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://xml.apache.org/xml-soap", "Map"), java.util.HashMap.class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in3"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_xsd_int"));
-        oper.setReturnClass(int[].class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "getCustomerAddressesReturn"));
+        oper.setReturnType(new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "ArrayOf_tns1_SimpleModule"));
+        oper.setReturnClass(org.openbravo.services.webservice.SimpleModule[].class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "moduleScanForUpdatesReturn"));
         oper.setStyle(org.apache.axis.constants.Style.RPC);
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         _operations[5] = oper;
 
         oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("getCustomerLocation");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        oper.setName("moduleRegister");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "module"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("/services/WebService2", "Module"), org.openbravo.services.webservice.Module.class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "userName"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "password"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in3"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in4"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("/services/WebService", "Location"));
-        oper.setReturnClass(org.openbravo.services.webservice.Location.class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "getCustomerLocationReturn"));
+        oper.setReturnType(new javax.xml.namespace.QName("/services/WebService2", "Module"));
+        oper.setReturnClass(org.openbravo.services.webservice.Module.class);
+        oper.setReturnQName(new javax.xml.namespace.QName("", "moduleRegisterReturn"));
         oper.setStyle(org.apache.axis.constants.Style.RPC);
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
         _operations[6] = oper;
 
         oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("updateAddress");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("/services/WebService", "Location"), org.openbravo.services.webservice.Location.class, false, false);
+        oper.setName("checkConsistency");
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "versionIdInstalled"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://xml.apache.org/xml-soap", "Map"), java.util.HashMap.class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "versionIdToInstall"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "ArrayOf_xsd_string"), java.lang.String[].class, false, false);
         oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
+        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "versionIdToUpdate"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "ArrayOf_xsd_string"), java.lang.String[].class, false, false);
         oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "boolean"));
-        oper.setReturnClass(java.lang.Boolean.class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "updateAddressReturn"));
-        oper.setStyle(org.apache.axis.constants.Style.RPC);
-        oper.setUse(org.apache.axis.constants.Use.ENCODED);
-        _operations[7] = oper;
-
-        oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("getCustomerContact");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"), int.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in3"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in4"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("/services/WebService", "Contact"));
-        oper.setReturnClass(org.openbravo.services.webservice.Contact.class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "getCustomerContactReturn"));
-        oper.setStyle(org.apache.axis.constants.Style.RPC);
-        oper.setUse(org.apache.axis.constants.Use.ENCODED);
-        _operations[8] = oper;
-
-        oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("updateContact");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("/services/WebService", "Contact"), org.openbravo.services.webservice.Contact.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "boolean"));
-        oper.setReturnClass(java.lang.Boolean.class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "updateContactReturn"));
-        oper.setStyle(org.apache.axis.constants.Style.RPC);
-        oper.setUse(org.apache.axis.constants.Use.ENCODED);
-        _operations[9] = oper;
-
-    }
-
-    private static void _initOperationDesc2(){
-        org.apache.axis.description.OperationDesc oper;
-        org.apache.axis.description.ParameterDesc param;
-        oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("moduleSearch");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_xsd_string"), java.lang.String[].class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_tns1_SimpleModule"));
-        oper.setReturnClass(org.openbravo.services.webservice.SimpleModule[].class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "moduleSearchReturn"));
-        oper.setStyle(org.apache.axis.constants.Style.RPC);
-        oper.setUse(org.apache.axis.constants.Use.ENCODED);
-        _operations[10] = oper;
-
-        oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("moduleDetail");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("/services/WebService", "Module"));
-        oper.setReturnClass(org.openbravo.services.webservice.Module.class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "moduleDetailReturn"));
-        oper.setStyle(org.apache.axis.constants.Style.RPC);
-        oper.setUse(org.apache.axis.constants.Use.ENCODED);
-        _operations[11] = oper;
-
-        oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("moduleScanForUpdates");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://xml.apache.org/xml-soap", "Map"), java.util.HashMap.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_tns1_SimpleModule"));
-        oper.setReturnClass(org.openbravo.services.webservice.SimpleModule[].class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "moduleScanForUpdatesReturn"));
-        oper.setStyle(org.apache.axis.constants.Style.RPC);
-        oper.setUse(org.apache.axis.constants.Use.ENCODED);
-        _operations[12] = oper;
-
-        oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("moduleRegister");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("/services/WebService", "Module"), org.openbravo.services.webservice.Module.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/", "string"), java.lang.String.class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("/services/WebService", "Module"));
-        oper.setReturnClass(org.openbravo.services.webservice.Module.class);
-        oper.setReturnQName(new javax.xml.namespace.QName("", "moduleRegisterReturn"));
-        oper.setStyle(org.apache.axis.constants.Style.RPC);
-        oper.setUse(org.apache.axis.constants.Use.ENCODED);
-        _operations[13] = oper;
-
-        oper = new org.apache.axis.description.OperationDesc();
-        oper.setName("checkConsistency");
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in0"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://xml.apache.org/xml-soap", "Map"), java.util.HashMap.class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in1"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_xsd_string"), java.lang.String[].class, false, false);
-        oper.addParameter(param);
-        param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("", "in2"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_xsd_string"), java.lang.String[].class, false, false);
-        oper.addParameter(param);
-        oper.setReturnType(new javax.xml.namespace.QName("/services/WebService", "ModuleInstallDetail"));
+        oper.setReturnType(new javax.xml.namespace.QName("/services/WebService2", "ModuleInstallDetail"));
         oper.setReturnClass(org.openbravo.services.webservice.ModuleInstallDetail.class);
         oper.setReturnQName(new javax.xml.namespace.QName("", "checkConsistencyReturn"));
         oper.setStyle(org.apache.axis.constants.Style.RPC);
         oper.setUse(org.apache.axis.constants.Use.ENCODED);
-        _operations[14] = oper;
+        _operations[7] = oper;
 
     }
 
@@ -287,126 +152,62 @@
             java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
             java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
             java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
-            qName = new javax.xml.namespace.QName("/services/WebService", "BusinessPartner");
-            cachedSerQNames.add(qName);
-            cls = org.openbravo.services.webservice.BusinessPartner.class;
-            cachedSerClasses.add(cls);
-            cachedSerFactories.add(beansf);
-            cachedDeserFactories.add(beandf);
-
-            qName = new javax.xml.namespace.QName("/services/WebService", "Contact");
-            cachedSerQNames.add(qName);
-            cls = org.openbravo.services.webservice.Contact.class;
-            cachedSerClasses.add(cls);
-            cachedSerFactories.add(beansf);
-            cachedDeserFactories.add(beandf);
-
-            qName = new javax.xml.namespace.QName("/services/WebService", "Customer");
-            cachedSerQNames.add(qName);
-            cls = org.openbravo.services.webservice.Customer.class;
-            cachedSerClasses.add(cls);
-            cachedSerFactories.add(beansf);
-            cachedDeserFactories.add(beandf);
-
-            qName = new javax.xml.namespace.QName("/services/WebService", "Location");
-            cachedSerQNames.add(qName);
-            cls = org.openbravo.services.webservice.Location.class;
-            cachedSerClasses.add(cls);
-            cachedSerFactories.add(beansf);
-            cachedDeserFactories.add(beandf);
-
-            qName = new javax.xml.namespace.QName("/services/WebService", "Module");
+            qName = new javax.xml.namespace.QName("/services/WebService2", "Module");
             cachedSerQNames.add(qName);
             cls = org.openbravo.services.webservice.Module.class;
             cachedSerClasses.add(cls);
             cachedSerFactories.add(beansf);
             cachedDeserFactories.add(beandf);
 
-            qName = new javax.xml.namespace.QName("/services/WebService", "ModuleDependency");
+            qName = new javax.xml.namespace.QName("/services/WebService2", "ModuleDependency");
             cachedSerQNames.add(qName);
             cls = org.openbravo.services.webservice.ModuleDependency.class;
             cachedSerClasses.add(cls);
             cachedSerFactories.add(beansf);
             cachedDeserFactories.add(beandf);
 
-            qName = new javax.xml.namespace.QName("/services/WebService", "ModuleInstallDetail");
+            qName = new javax.xml.namespace.QName("/services/WebService2", "ModuleInstallDetail");
             cachedSerQNames.add(qName);
             cls = org.openbravo.services.webservice.ModuleInstallDetail.class;
             cachedSerClasses.add(cls);
             cachedSerFactories.add(beansf);
             cachedDeserFactories.add(beandf);
 
-            qName = new javax.xml.namespace.QName("/services/WebService", "SimpleModule");
+            qName = new javax.xml.namespace.QName("/services/WebService2", "SimpleModule");
             cachedSerQNames.add(qName);
             cls = org.openbravo.services.webservice.SimpleModule.class;
             cachedSerClasses.add(cls);
             cachedSerFactories.add(beansf);
             cachedDeserFactories.add(beandf);
 
-            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_tns1_Contact");
+            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "ArrayOf_tns1_Module");
             cachedSerQNames.add(qName);
-            cls = org.openbravo.services.webservice.Contact[].class;
+            cls = org.openbravo.services.webservice.Module[].class;
             cachedSerClasses.add(cls);
-            qName = new javax.xml.namespace.QName("/services/WebService", "Contact");
+            qName = new javax.xml.namespace.QName("/services/WebService2", "Module");
             qName2 = null;
             cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
             cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
 
-            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_tns1_Customer");
+            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "ArrayOf_tns1_ModuleDependency");
             cachedSerQNames.add(qName);
-            cls = org.openbravo.services.webservice.Customer[].class;
+            cls = org.openbravo.services.webservice.ModuleDependency[].class;
             cachedSerClasses.add(cls);
-            qName = new javax.xml.namespace.QName("/services/WebService", "Customer");
+            qName = new javax.xml.namespace.QName("/services/WebService2", "ModuleDependency");
             qName2 = null;
             cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
             cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
 
-            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_tns1_Location");
+            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "ArrayOf_tns1_SimpleModule");
             cachedSerQNames.add(qName);
-            cls = org.openbravo.services.webservice.Location[].class;
+            cls = org.openbravo.services.webservice.SimpleModule[].class;
             cachedSerClasses.add(cls);
-            qName = new javax.xml.namespace.QName("/services/WebService", "Location");
+            qName = new javax.xml.namespace.QName("/services/WebService2", "SimpleModule");
             qName2 = null;
             cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
             cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
 
-            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_tns1_Module");
-            cachedSerQNames.add(qName);
-            cls = org.openbravo.services.webservice.Module[].class;
-            cachedSerClasses.add(cls);
-            qName = new javax.xml.namespace.QName("/services/WebService", "Module");
-            qName2 = null;
-            cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
-            cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
-
-            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_tns1_ModuleDependency");
-            cachedSerQNames.add(qName);
-            cls = org.openbravo.services.webservice.ModuleDependency[].class;
-            cachedSerClasses.add(cls);
-            qName = new javax.xml.namespace.QName("/services/WebService", "ModuleDependency");
-            qName2 = null;
-            cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
-            cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
-
-            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_tns1_SimpleModule");
-            cachedSerQNames.add(qName);
-            cls = org.openbravo.services.webservice.SimpleModule[].class;
-            cachedSerClasses.add(cls);
-            qName = new javax.xml.namespace.QName("/services/WebService", "SimpleModule");
-            qName2 = null;
-            cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
-            cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
-
-            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_xsd_int");
-            cachedSerQNames.add(qName);
-            cls = int[].class;
-            cachedSerClasses.add(cls);
-            qName = new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int");
-            qName2 = null;
-            cachedSerFactories.add(new org.apache.axis.encoding.ser.ArraySerializerFactory(qName, qName2));
-            cachedDeserFactories.add(new org.apache.axis.encoding.ser.ArrayDeserializerFactory());
-
-            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService", "ArrayOf_xsd_string");
+            qName = new javax.xml.namespace.QName("http://centralrepository.openbravo.com/openbravo/services/WebService2", "ArrayOf_xsd_string");
             cachedSerQNames.add(qName);
             cls = java.lang.String[].class;
             cachedSerClasses.add(cls);
@@ -482,7 +283,7 @@
         }
     }
 
-    public byte[] getModule(java.lang.String in0) throws java.rmi.RemoteException {
+    public byte[] getModule(java.lang.String moduleVersionID) throws java.rmi.RemoteException {
         if (super.cachedEndpoint == null) {
             throw new org.apache.axis.NoEndPointException();
         }
@@ -495,7 +296,7 @@
 
         setRequestHeaders(_call);
         setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0});
+ try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {moduleVersionID});
 
         if (_resp instanceof java.rmi.RemoteException) {
             throw (java.rmi.RemoteException)_resp;
@@ -513,7 +314,7 @@
 }
     }
 
-    public org.openbravo.services.webservice.Customer[] getCustomers(int in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException {
+    public org.openbravo.services.webservice.SimpleModule[] moduleSearch(java.lang.String word, java.lang.String[] exclude) throws java.rmi.RemoteException {
         if (super.cachedEndpoint == null) {
             throw new org.apache.axis.NoEndPointException();
         }
@@ -522,290 +323,11 @@
         _call.setUseSOAPAction(true);
         _call.setSOAPActionURI("");
         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "getCustomers"));
-
-        setRequestHeaders(_call);
-        setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(in0), in1, in2});
-
-        if (_resp instanceof java.rmi.RemoteException) {
-            throw (java.rmi.RemoteException)_resp;
-        }
-        else {
-            extractAttachments(_call);
-            try {
-                return (org.openbravo.services.webservice.Customer[]) _resp;
-            } catch (java.lang.Exception _exception) {
-                return (org.openbravo.services.webservice.Customer[]) org.apache.axis.utils.JavaUtils.convert(_resp, org.openbravo.services.webservice.Customer[].class);
-            }
-        }
-  } catch (org.apache.axis.AxisFault axisFaultException) {
-  throw axisFaultException;
-}
-    }
-
-    public org.openbravo.services.webservice.Customer getCustomer(int in0, int in1, java.lang.String in2, java.lang.String in3) throws java.rmi.RemoteException {
-        if (super.cachedEndpoint == null) {
-            throw new org.apache.axis.NoEndPointException();
-        }
-        org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[2]);
-        _call.setUseSOAPAction(true);
-        _call.setSOAPActionURI("");
-        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "getCustomer"));
-
-        setRequestHeaders(_call);
-        setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(in0), new java.lang.Integer(in1), in2, in3});
-
-        if (_resp instanceof java.rmi.RemoteException) {
-            throw (java.rmi.RemoteException)_resp;
-        }
-        else {
-            extractAttachments(_call);
-            try {
-                return (org.openbravo.services.webservice.Customer) _resp;
-            } catch (java.lang.Exception _exception) {
-                return (org.openbravo.services.webservice.Customer) org.apache.axis.utils.JavaUtils.convert(_resp, org.openbravo.services.webservice.Customer.class);
-            }
-        }
-  } catch (org.apache.axis.AxisFault axisFaultException) {
-  throw axisFaultException;
-}
-    }
-
-    public org.openbravo.services.webservice.Customer getCustomer(int in0, java.lang.String in1, java.lang.String in2, java.lang.String in3, java.lang.String in4) throws java.rmi.RemoteException {
-        if (super.cachedEndpoint == null) {
-            throw new org.apache.axis.NoEndPointException();
-        }
-        org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[3]);
-        _call.setUseSOAPAction(true);
-        _call.setSOAPActionURI("");
-        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "getCustomer"));
-
-        setRequestHeaders(_call);
-        setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(in0), in1, in2, in3, in4});
-
-        if (_resp instanceof java.rmi.RemoteException) {
-            throw (java.rmi.RemoteException)_resp;
-        }
-        else {
-            extractAttachments(_call);
-            try {
-                return (org.openbravo.services.webservice.Customer) _resp;
-            } catch (java.lang.Exception _exception) {
-                return (org.openbravo.services.webservice.Customer) org.apache.axis.utils.JavaUtils.convert(_resp, org.openbravo.services.webservice.Customer.class);
-            }
-        }
-  } catch (org.apache.axis.AxisFault axisFaultException) {
-  throw axisFaultException;
-}
-    }
-
-    public java.lang.Boolean updateCustomer(org.openbravo.services.webservice.BusinessPartner in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException {
-        if (super.cachedEndpoint == null) {
-            throw new org.apache.axis.NoEndPointException();
-        }
-        org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[4]);
-        _call.setUseSOAPAction(true);
-        _call.setSOAPActionURI("");
-        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "updateCustomer"));
-
-        setRequestHeaders(_call);
-        setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1, in2});
-
-        if (_resp instanceof java.rmi.RemoteException) {
-            throw (java.rmi.RemoteException)_resp;
-        }
-        else {
-            extractAttachments(_call);
-            try {
-                return (java.lang.Boolean) _resp;
-            } catch (java.lang.Exception _exception) {
-                return (java.lang.Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.Boolean.class);
-            }
-        }
-  } catch (org.apache.axis.AxisFault axisFaultException) {
-  throw axisFaultException;
-}
-    }
-
-    public int[] getCustomerAddresses(int in0, int in1, java.lang.String in2, java.lang.String in3) throws java.rmi.RemoteException {
-        if (super.cachedEndpoint == null) {
-            throw new org.apache.axis.NoEndPointException();
-        }
-        org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[5]);
-        _call.setUseSOAPAction(true);
-        _call.setSOAPActionURI("");
-        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "getCustomerAddresses"));
-
-        setRequestHeaders(_call);
-        setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(in0), new java.lang.Integer(in1), in2, in3});
-
-        if (_resp instanceof java.rmi.RemoteException) {
-            throw (java.rmi.RemoteException)_resp;
-        }
-        else {
-            extractAttachments(_call);
-            try {
-                return (int[]) _resp;
-            } catch (java.lang.Exception _exception) {
-                return (int[]) org.apache.axis.utils.JavaUtils.convert(_resp, int[].class);
-            }
-        }
-  } catch (org.apache.axis.AxisFault axisFaultException) {
-  throw axisFaultException;
-}
-    }
-
-    public org.openbravo.services.webservice.Location getCustomerLocation(int in0, int in1, int in2, java.lang.String in3, java.lang.String in4) throws java.rmi.RemoteException {
-        if (super.cachedEndpoint == null) {
-            throw new org.apache.axis.NoEndPointException();
-        }
-        org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[6]);
-        _call.setUseSOAPAction(true);
-        _call.setSOAPActionURI("");
-        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "getCustomerLocation"));
-
-        setRequestHeaders(_call);
-        setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(in0), new java.lang.Integer(in1), new java.lang.Integer(in2), in3, in4});
-
-        if (_resp instanceof java.rmi.RemoteException) {
-            throw (java.rmi.RemoteException)_resp;
-        }
-        else {
-            extractAttachments(_call);
-            try {
-                return (org.openbravo.services.webservice.Location) _resp;
-            } catch (java.lang.Exception _exception) {
-                return (org.openbravo.services.webservice.Location) org.apache.axis.utils.JavaUtils.convert(_resp, org.openbravo.services.webservice.Location.class);
-            }
-        }
-  } catch (org.apache.axis.AxisFault axisFaultException) {
-  throw axisFaultException;
-}
-    }
-
-    public java.lang.Boolean updateAddress(org.openbravo.services.webservice.Location in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException {
-        if (super.cachedEndpoint == null) {
-            throw new org.apache.axis.NoEndPointException();
-        }
-        org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[7]);
-        _call.setUseSOAPAction(true);
-        _call.setSOAPActionURI("");
-        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "updateAddress"));
-
-        setRequestHeaders(_call);
-        setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1, in2});
-
-        if (_resp instanceof java.rmi.RemoteException) {
-            throw (java.rmi.RemoteException)_resp;
-        }
-        else {
-            extractAttachments(_call);
-            try {
-                return (java.lang.Boolean) _resp;
-            } catch (java.lang.Exception _exception) {
-                return (java.lang.Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.Boolean.class);
-            }
-        }
-  } catch (org.apache.axis.AxisFault axisFaultException) {
-  throw axisFaultException;
-}
-    }
-
-    public org.openbravo.services.webservice.Contact getCustomerContact(int in0, int in1, int in2, java.lang.String in3, java.lang.String in4) throws java.rmi.RemoteException {
-        if (super.cachedEndpoint == null) {
-            throw new org.apache.axis.NoEndPointException();
-        }
-        org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[8]);
-        _call.setUseSOAPAction(true);
-        _call.setSOAPActionURI("");
-        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "getCustomerContact"));
-
-        setRequestHeaders(_call);
-        setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {new java.lang.Integer(in0), new java.lang.Integer(in1), new java.lang.Integer(in2), in3, in4});
-
-        if (_resp instanceof java.rmi.RemoteException) {
-            throw (java.rmi.RemoteException)_resp;
-        }
-        else {
-            extractAttachments(_call);
-            try {
-                return (org.openbravo.services.webservice.Contact) _resp;
-            } catch (java.lang.Exception _exception) {
-                return (org.openbravo.services.webservice.Contact) org.apache.axis.utils.JavaUtils.convert(_resp, org.openbravo.services.webservice.Contact.class);
-            }
-        }
-  } catch (org.apache.axis.AxisFault axisFaultException) {
-  throw axisFaultException;
-}
-    }
-
-    public java.lang.Boolean updateContact(org.openbravo.services.webservice.Contact in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException {
-        if (super.cachedEndpoint == null) {
-            throw new org.apache.axis.NoEndPointException();
-        }
-        org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[9]);
-        _call.setUseSOAPAction(true);
-        _call.setSOAPActionURI("");
-        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
-        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "updateContact"));
-
-        setRequestHeaders(_call);
-        setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1, in2});
-
-        if (_resp instanceof java.rmi.RemoteException) {
-            throw (java.rmi.RemoteException)_resp;
-        }
-        else {
-            extractAttachments(_call);
-            try {
-                return (java.lang.Boolean) _resp;
-            } catch (java.lang.Exception _exception) {
-                return (java.lang.Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.Boolean.class);
-            }
-        }
-  } catch (org.apache.axis.AxisFault axisFaultException) {
-  throw axisFaultException;
-}
-    }
-
-    public org.openbravo.services.webservice.SimpleModule[] moduleSearch(java.lang.String in0, java.lang.String[] in1) throws java.rmi.RemoteException {
-        if (super.cachedEndpoint == null) {
-            throw new org.apache.axis.NoEndPointException();
-        }
-        org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[10]);
-        _call.setUseSOAPAction(true);
-        _call.setSOAPActionURI("");
-        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
         _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "moduleSearch"));
 
         setRequestHeaders(_call);
         setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1});
+ try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {word, exclude});
 
         if (_resp instanceof java.rmi.RemoteException) {
             throw (java.rmi.RemoteException)_resp;
@@ -823,12 +345,12 @@
 }
     }
 
-    public org.openbravo.services.webservice.Module moduleDetail(java.lang.String in0) throws java.rmi.RemoteException {
+    public org.openbravo.services.webservice.Module moduleDetail(java.lang.String moduleVersionID) throws java.rmi.RemoteException {
         if (super.cachedEndpoint == null) {
             throw new org.apache.axis.NoEndPointException();
         }
         org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[11]);
+        _call.setOperation(_operations[2]);
         _call.setUseSOAPAction(true);
         _call.setSOAPActionURI("");
         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
@@ -836,7 +358,7 @@
 
         setRequestHeaders(_call);
         setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0});
+ try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {moduleVersionID});
 
         if (_resp instanceof java.rmi.RemoteException) {
             throw (java.rmi.RemoteException)_resp;
@@ -854,12 +376,74 @@
 }
     }
 
-    public org.openbravo.services.webservice.SimpleModule[] moduleScanForUpdates(java.util.HashMap in0) throws java.rmi.RemoteException {
+    public java.lang.String getURLforDownload(java.lang.String moduleVersionID) throws java.rmi.RemoteException {
         if (super.cachedEndpoint == null) {
             throw new org.apache.axis.NoEndPointException();
         }
         org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[12]);
+        _call.setOperation(_operations[3]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "getURLforDownload"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+ try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {moduleVersionID});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        else {
+            extractAttachments(_call);
+            try {
+                return (java.lang.String) _resp;
+            } catch (java.lang.Exception _exception) {
+                return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
+            }
+        }
+  } catch (org.apache.axis.AxisFault axisFaultException) {
+  throw axisFaultException;
+}
+    }
+
+    public boolean isCommercial(java.lang.String moduleVersionID) throws java.rmi.RemoteException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[4]);
+        _call.setUseSOAPAction(true);
+        _call.setSOAPActionURI("");
+        _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
+        _call.setOperationName(new javax.xml.namespace.QName("http://services.ws.erpCommon.openbravo.org", "isCommercial"));
+
+        setRequestHeaders(_call);
+        setAttachments(_call);
+ try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {moduleVersionID});
+
+        if (_resp instanceof java.rmi.RemoteException) {
+            throw (java.rmi.RemoteException)_resp;
+        }
+        else {
+            extractAttachments(_call);
+            try {
+                return ((java.lang.Boolean) _resp).booleanValue();
+            } catch (java.lang.Exception _exception) {
+                return ((java.lang.Boolean) org.apache.axis.utils.JavaUtils.convert(_resp, boolean.class)).booleanValue();
+            }
+        }
+  } catch (org.apache.axis.AxisFault axisFaultException) {
+  throw axisFaultException;
+}
+    }
+
+    public org.openbravo.services.webservice.SimpleModule[] moduleScanForUpdates(java.util.HashMap moduleIdInstalledModules) throws java.rmi.RemoteException {
+        if (super.cachedEndpoint == null) {
+            throw new org.apache.axis.NoEndPointException();
+        }
+        org.apache.axis.client.Call _call = createCall();
+        _call.setOperation(_operations[5]);
         _call.setUseSOAPAction(true);
         _call.setSOAPActionURI("");
         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
@@ -867,7 +451,7 @@
 
         setRequestHeaders(_call);
         setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0});
+ try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {moduleIdInstalledModules});
 
         if (_resp instanceof java.rmi.RemoteException) {
             throw (java.rmi.RemoteException)_resp;
@@ -885,12 +469,12 @@
 }
     }
 
-    public org.openbravo.services.webservice.Module moduleRegister(org.openbravo.services.webservice.Module in0, java.lang.String in1, java.lang.String in2) throws java.rmi.RemoteException {
+    public org.openbravo.services.webservice.Module moduleRegister(org.openbravo.services.webservice.Module module, java.lang.String userName, java.lang.String password) throws java.rmi.RemoteException {
         if (super.cachedEndpoint == null) {
             throw new org.apache.axis.NoEndPointException();
         }
         org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[13]);
+        _call.setOperation(_operations[6]);
         _call.setUseSOAPAction(true);
         _call.setSOAPActionURI("");
         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
@@ -898,7 +482,7 @@
 
         setRequestHeaders(_call);
         setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1, in2});
+ try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {module, userName, password});
 
         if (_resp instanceof java.rmi.RemoteException) {
             throw (java.rmi.RemoteException)_resp;
@@ -916,12 +500,12 @@
 }
     }
 
-    public org.openbravo.services.webservice.ModuleInstallDetail checkConsistency(java.util.HashMap in0, java.lang.String[] in1, java.lang.String[] in2) throws java.rmi.RemoteException {
+    public org.openbravo.services.webservice.ModuleInstallDetail checkConsistency(java.util.HashMap versionIdInstalled, java.lang.String[] versionIdToInstall, java.lang.String[] versionIdToUpdate) throws java.rmi.RemoteException {
         if (super.cachedEndpoint == null) {
             throw new org.apache.axis.NoEndPointException();
         }
         org.apache.axis.client.Call _call = createCall();
-        _call.setOperation(_operations[14]);
+        _call.setOperation(_operations[7]);
         _call.setUseSOAPAction(true);
         _call.setSOAPActionURI("");
         _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
@@ -929,7 +513,7 @@
 
         setRequestHeaders(_call);
         setAttachments(_call);
- try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0, in1, in2});
+ try {        java.lang.Object _resp = _call.invoke(new java.lang.Object[] {versionIdInstalled, versionIdToInstall, versionIdToUpdate});
 
         if (_resp instanceof java.rmi.RemoteException) {
             throw (java.rmi.RemoteException)_resp;
--- a/src/org/openbravo/services/webservice/deploy.wsdd	Tue Sep 22 11:10:42 2009 +0200
+++ b/src/org/openbravo/services/webservice/deploy.wsdd	Tue Sep 22 12:40:41 2009 +0200
@@ -13,131 +13,70 @@
   <!-- Services from WebServiceImplService WSDL service -->
 
   <service name="WebService" provider="java:RPC" style="rpc" use="encoded">
-      <parameter name="wsdlTargetNamespace" value="http://centralrepository.openbravo.com/openbravo/services/WebService"/>
+      <parameter name="wsdlTargetNamespace" value="http://centralrepository.openbravo.com/openbravo/services/WebService2"/>
       <parameter name="wsdlServiceElement" value="WebServiceImplService"/>
-      <parameter name="schemaUnqualified" value="/services/WebService,http://xml.apache.org/xml-soap,http://centralrepository.openbravo.com/openbravo/services/WebService"/>
+      <parameter name="schemaUnqualified" value="http://xml.apache.org/xml-soap,/services/WebService2,http://centralrepository.openbravo.com/openbravo/services/WebService2"/>
       <parameter name="wsdlServicePort" value="WebService"/>
       <parameter name="className" value="org.openbravo.services.webservice.WebServiceSoapBindingImpl"/>
       <parameter name="wsdlPortType" value="WebServiceImpl"/>
       <parameter name="typeMappingVersion" value="1.2"/>
-      <operation name="getModule" qname="operNS:getModule" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="getModuleReturn" returnType="rtns:base64Binary" xmlns:rtns="http://schemas.xmlsoap.org/soap/encoding/" soapAction="" >
-        <parameter qname="in0" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
+      <operation name="getModule" qname="operNS:getModule" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="getModuleReturn" returnType="rtns:base64Binary" xmlns:rtns="http://www.w3.org/2001/XMLSchema" soapAction="" >
+        <parameter qname="moduleVersionID" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
       </operation>
-      <operation name="getCustomers" qname="operNS:getCustomers" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="getCustomersReturn" returnType="rtns:ArrayOf_tns1_Customer" xmlns:rtns="http://centralrepository.openbravo.com/openbravo/services/WebService" returnItemType="tns2:Customer" xmlns:tns2="/services/WebService" soapAction="" >
-        <parameter qname="in0" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in1" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in2" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
+      <operation name="moduleSearch" qname="operNS:moduleSearch" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="moduleSearchReturn" returnType="rtns:ArrayOf_tns1_SimpleModule" xmlns:rtns="http://centralrepository.openbravo.com/openbravo/services/WebService2" returnItemType="tns2:SimpleModule" xmlns:tns2="/services/WebService2" soapAction="" >
+        <parameter qname="word" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
+        <parameter qname="exclude" type="tns:ArrayOf_xsd_string" xmlns:tns="http://centralrepository.openbravo.com/openbravo/services/WebService2"/>
       </operation>
-      <operation name="getCustomer" qname="operNS:getCustomer" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="getCustomerReturn" returnType="rtns:Customer" xmlns:rtns="/services/WebService" soapAction="" >
-        <parameter qname="in0" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in1" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in2" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in3" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
+      <operation name="moduleDetail" qname="operNS:moduleDetail" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="moduleDetailReturn" returnType="rtns:Module" xmlns:rtns="/services/WebService2" soapAction="" >
+        <parameter qname="moduleVersionID" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
       </operation>
-      <operation name="getCustomer" qname="operNS:getCustomer" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="getCustomerReturn" returnType="rtns:Customer" xmlns:rtns="/services/WebService" soapAction="" >
-        <parameter qname="in0" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in1" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in2" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in3" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in4" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
+      <operation name="getURLforDownload" qname="operNS:getURLforDownload" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="getURLforDownloadReturn" returnType="rtns:string" xmlns:rtns="http://www.w3.org/2001/XMLSchema" soapAction="" >
+        <parameter qname="moduleVersionID" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
       </operation>
-      <operation name="updateCustomer" qname="operNS:updateCustomer" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="updateCustomerReturn" returnType="rtns:boolean" xmlns:rtns="http://schemas.xmlsoap.org/soap/encoding/" soapAction="" >
-        <parameter qname="in0" type="tns:BusinessPartner" xmlns:tns="/services/WebService"/>
-        <parameter qname="in1" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in2" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
+      <operation name="isCommercial" qname="operNS:isCommercial" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="isCommercialReturn" returnType="rtns:boolean" xmlns:rtns="http://www.w3.org/2001/XMLSchema" soapAction="" >
+        <parameter qname="moduleVersionID" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
       </operation>
-      <operation name="getCustomerAddresses" qname="operNS:getCustomerAddresses" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="getCustomerAddressesReturn" returnType="rtns:ArrayOf_xsd_int" xmlns:rtns="http://centralrepository.openbravo.com/openbravo/services/WebService" returnItemType="tns2:int" xmlns:tns2="http://www.w3.org/2001/XMLSchema" soapAction="" >
-        <parameter qname="in0" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in1" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in2" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in3" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
+      <operation name="moduleScanForUpdates" qname="operNS:moduleScanForUpdates" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="moduleScanForUpdatesReturn" returnType="rtns:ArrayOf_tns1_SimpleModule" xmlns:rtns="http://centralrepository.openbravo.com/openbravo/services/WebService2" returnItemType="tns2:SimpleModule" xmlns:tns2="/services/WebService2" soapAction="" >
+        <parameter qname="moduleIdInstalledModules" type="tns:Map" xmlns:tns="http://xml.apache.org/xml-soap"/>
       </operation>
-      <operation name="getCustomerLocation" qname="operNS:getCustomerLocation" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="getCustomerLocationReturn" returnType="rtns:Location" xmlns:rtns="/services/WebService" soapAction="" >
-        <parameter qname="in0" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in1" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in2" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in3" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in4" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
+      <operation name="moduleRegister" qname="operNS:moduleRegister" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="moduleRegisterReturn" returnType="rtns:Module" xmlns:rtns="/services/WebService2" soapAction="" >
+        <parameter qname="module" type="tns:Module" xmlns:tns="/services/WebService2"/>
+        <parameter qname="userName" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
+        <parameter qname="password" type="tns:string" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
       </operation>
-      <operation name="updateAddress" qname="operNS:updateAddress" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="updateAddressReturn" returnType="rtns:boolean" xmlns:rtns="http://schemas.xmlsoap.org/soap/encoding/" soapAction="" >
-        <parameter qname="in0" type="tns:Location" xmlns:tns="/services/WebService"/>
-        <parameter qname="in1" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in2" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
+      <operation name="checkConsistency" qname="operNS:checkConsistency" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="checkConsistencyReturn" returnType="rtns:ModuleInstallDetail" xmlns:rtns="/services/WebService2" soapAction="" >
+        <parameter qname="versionIdInstalled" type="tns:Map" xmlns:tns="http://xml.apache.org/xml-soap"/>
+        <parameter qname="versionIdToInstall" type="tns:ArrayOf_xsd_string" xmlns:tns="http://centralrepository.openbravo.com/openbravo/services/WebService2"/>
+        <parameter qname="versionIdToUpdate" type="tns:ArrayOf_xsd_string" xmlns:tns="http://centralrepository.openbravo.com/openbravo/services/WebService2"/>
       </operation>
-      <operation name="getCustomerContact" qname="operNS:getCustomerContact" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="getCustomerContactReturn" returnType="rtns:Contact" xmlns:rtns="/services/WebService" soapAction="" >
-        <parameter qname="in0" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in1" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in2" type="tns:int" xmlns:tns="http://www.w3.org/2001/XMLSchema"/>
-        <parameter qname="in3" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in4" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </operation>
-      <operation name="updateContact" qname="operNS:updateContact" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="updateContactReturn" returnType="rtns:boolean" xmlns:rtns="http://schemas.xmlsoap.org/soap/encoding/" soapAction="" >
-        <parameter qname="in0" type="tns:Contact" xmlns:tns="/services/WebService"/>
-        <parameter qname="in1" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in2" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </operation>
-      <operation name="moduleSearch" qname="operNS:moduleSearch" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="moduleSearchReturn" returnType="rtns:ArrayOf_tns1_SimpleModule" xmlns:rtns="http://centralrepository.openbravo.com/openbravo/services/WebService" returnItemType="tns2:SimpleModule" xmlns:tns2="/services/WebService" soapAction="" >
-        <parameter qname="in0" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in1" type="tns:ArrayOf_xsd_string" xmlns:tns="http://centralrepository.openbravo.com/openbravo/services/WebService"/>
-      </operation>
-      <operation name="moduleDetail" qname="operNS:moduleDetail" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="moduleDetailReturn" returnType="rtns:Module" xmlns:rtns="/services/WebService" soapAction="" >
-        <parameter qname="in0" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </operation>
-      <operation name="moduleScanForUpdates" qname="operNS:moduleScanForUpdates" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="moduleScanForUpdatesReturn" returnType="rtns:ArrayOf_tns1_SimpleModule" xmlns:rtns="http://centralrepository.openbravo.com/openbravo/services/WebService" returnItemType="tns2:SimpleModule" xmlns:tns2="/services/WebService" soapAction="" >
-        <parameter qname="in0" type="tns:Map" xmlns:tns="http://xml.apache.org/xml-soap"/>
-      </operation>
-      <operation name="moduleRegister" qname="operNS:moduleRegister" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="moduleRegisterReturn" returnType="rtns:Module" xmlns:rtns="/services/WebService" soapAction="" >
-        <parameter qname="in0" type="tns:Module" xmlns:tns="/services/WebService"/>
-        <parameter qname="in1" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-        <parameter qname="in2" type="tns:string" xmlns:tns="http://schemas.xmlsoap.org/soap/encoding/"/>
-      </operation>
-      <operation name="checkConsistency" qname="operNS:checkConsistency" xmlns:operNS="http://services.ws.erpCommon.openbravo.org" returnQName="checkConsistencyReturn" returnType="rtns:ModuleInstallDetail" xmlns:rtns="/services/WebService" soapAction="" >
-        <parameter qname="in0" type="tns:Map" xmlns:tns="http://xml.apache.org/xml-soap"/>
-        <parameter qname="in1" type="tns:ArrayOf_xsd_string" xmlns:tns="http://centralrepository.openbravo.com/openbravo/services/WebService"/>
-        <parameter qname="in2" type="tns:ArrayOf_xsd_string" xmlns:tns="http://centralrepository.openbravo.com/openbravo/services/WebService"/>
-      </operation>
-      <parameter name="allowedMethods" value="checkConsistency updateCustomer getCustomerAddresses moduleDetail getCustomerContact updateContact getModule getCustomerLocation updateAddress getCustomers getCustomer moduleRegister moduleScanForUpdates moduleSearch"/>
+      <parameter name="allowedMethods" value="checkConsistency getModule moduleRegister moduleScanForUpdates isCommercial getURLforDownload moduleDetail moduleSearch"/>
 
       <typeMapping
-        xmlns:ns="/services/WebService"
-        qname="ns:Customer"
-        type="java:org.openbravo.services.webservice.Customer"
+        xmlns:ns="/services/WebService2"
+        qname="ns:ModuleInstallDetail"
+        type="java:org.openbravo.services.webservice.ModuleInstallDetail"
         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
         deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
       />
       <typeMapping
-        xmlns:ns="/services/WebService"
-        qname="ns:Contact"
-        type="java:org.openbravo.services.webservice.Contact"
+        xmlns:ns="/services/WebService2"
+        qname="ns:SimpleModule"
+        type="java:org.openbravo.services.webservice.SimpleModule"
         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
         deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
       />
-      <arrayMapping
-        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService"
-        qname="ns:ArrayOf_xsd_int"
-        type="java:int[]"
-        innerType="cmp-ns:int" xmlns:cmp-ns="http://www.w3.org/2001/XMLSchema"
-        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
-      />
       <typeMapping
-        xmlns:ns="/services/WebService"
-        qname="ns:Location"
-        type="java:org.openbravo.services.webservice.Location"
+        xmlns:ns="/services/WebService2"
+        qname="ns:Module"
+        type="java:org.openbravo.services.webservice.Module"
         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
         deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
       />
-      <arrayMapping
-        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService"
-        qname="ns:ArrayOf_xsd_string"
-        type="java:java.lang.String[]"
-        innerType="cmp-ns:string" xmlns:cmp-ns="http://www.w3.org/2001/XMLSchema"
-        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
-      />
       <typeMapping
-        xmlns:ns="/services/WebService"
+        xmlns:ns="/services/WebService2"
         qname="ns:ModuleDependency"
         type="java:org.openbravo.services.webservice.ModuleDependency"
         serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
@@ -145,77 +84,31 @@
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
       />
       <arrayMapping
-        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService"
-        qname="ns:ArrayOf_tns1_Contact"
-        type="java:org.openbravo.services.webservice.Contact[]"
-        innerType="cmp-ns:Contact" xmlns:cmp-ns="/services/WebService"
+        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService2"
+        qname="ns:ArrayOf_tns1_SimpleModule"
+        type="java:org.openbravo.services.webservice.SimpleModule[]"
+        innerType="cmp-ns:SimpleModule" xmlns:cmp-ns="/services/WebService2"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
       />
       <arrayMapping
-        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService"
-        qname="ns:ArrayOf_tns1_Customer"
-        type="java:org.openbravo.services.webservice.Customer[]"
-        innerType="cmp-ns:Customer" xmlns:cmp-ns="/services/WebService"
-        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
-      />
-      <typeMapping
-        xmlns:ns="/services/WebService"
-        qname="ns:SimpleModule"
-        type="java:org.openbravo.services.webservice.SimpleModule"
-        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
-        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
+        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService2"
+        qname="ns:ArrayOf_tns1_Module"
+        type="java:org.openbravo.services.webservice.Module[]"
+        innerType="cmp-ns:Module" xmlns:cmp-ns="/services/WebService2"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
       />
       <arrayMapping
-        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService"
-        qname="ns:ArrayOf_tns1_Module"
-        type="java:org.openbravo.services.webservice.Module[]"
-        innerType="cmp-ns:Module" xmlns:cmp-ns="/services/WebService"
-        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
-      />
-      <typeMapping
-        xmlns:ns="/services/WebService"
-        qname="ns:ModuleInstallDetail"
-        type="java:org.openbravo.services.webservice.ModuleInstallDetail"
-        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
-        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
+        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService2"
+        qname="ns:ArrayOf_tns1_ModuleDependency"
+        type="java:org.openbravo.services.webservice.ModuleDependency[]"
+        innerType="cmp-ns:ModuleDependency" xmlns:cmp-ns="/services/WebService2"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
       />
       <arrayMapping
-        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService"
-        qname="ns:ArrayOf_tns1_SimpleModule"
-        type="java:org.openbravo.services.webservice.SimpleModule[]"
-        innerType="cmp-ns:SimpleModule" xmlns:cmp-ns="/services/WebService"
-        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
-      />
-      <arrayMapping
-        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService"
-        qname="ns:ArrayOf_tns1_ModuleDependency"
-        type="java:org.openbravo.services.webservice.ModuleDependency[]"
-        innerType="cmp-ns:ModuleDependency" xmlns:cmp-ns="/services/WebService"
-        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
-      />
-      <typeMapping
-        xmlns:ns="/services/WebService"
-        qname="ns:Module"
-        type="java:org.openbravo.services.webservice.Module"
-        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
-        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
-        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
-      />
-      <arrayMapping
-        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService"
-        qname="ns:ArrayOf_tns1_Location"
-        type="java:org.openbravo.services.webservice.Location[]"
-        innerType="cmp-ns:Location" xmlns:cmp-ns="/services/WebService"
-        encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
-      />
-      <typeMapping
-        xmlns:ns="/services/WebService"
-        qname="ns:BusinessPartner"
-        type="java:org.openbravo.services.webservice.BusinessPartner"
-        serializer="org.apache.axis.encoding.ser.BeanSerializerFactory"
-        deserializer="org.apache.axis.encoding.ser.BeanDeserializerFactory"
+        xmlns:ns="http://centralrepository.openbravo.com/openbravo/services/WebService2"
+        qname="ns:ArrayOf_xsd_string"
+        type="java:java.lang.String[]"
+        innerType="cmp-ns:string" xmlns:cmp-ns="http://www.w3.org/2001/XMLSchema"
         encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
       />
   </service>
--- a/web/js/utils.js	Tue Sep 22 11:10:42 2009 +0200
+++ b/web/js/utils.js	Tue Sep 22 12:40:41 2009 +0200
@@ -3205,7 +3205,7 @@
 * @see #setChangedField
 */
 function logChanges(field) {
-  if(!isUserChanges) return;
+  // if(!isUserChanges) return;
   if (field==null || !field) return false;
   return setChangedField(field, field.form);
 }