Merge from pi, rev: 2eb99c25867b
authorStefan Hühner <stefan.huehner@openbravo.com>
Tue, 10 May 2011 16:23:06 +0200
changeset 12104 f2a9b4e64e2c
parent 12103 347e6802d41c (current diff)
parent 12080 2eb99c25867b (diff)
child 12105 3126e7a79d39
Merge from pi, rev: 2eb99c25867b
src/deploy.wsdd
src/org/openbravo/erpCommon/ws/externalSales/BPartner.java
src/org/openbravo/erpCommon/ws/externalSales/Category.java
src/org/openbravo/erpCommon/ws/externalSales/ExternalSales.java
src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesIOrder_data.xsql
src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesImpl.java
src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesOrder_data.xsql
src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesProduct_data.xsql
src/org/openbravo/erpCommon/ws/externalSales/ExternalSales_data.xsql
src/org/openbravo/erpCommon/ws/externalSales/Order.java
src/org/openbravo/erpCommon/ws/externalSales/OrderIdentifier.java
src/org/openbravo/erpCommon/ws/externalSales/OrderLine.java
src/org/openbravo/erpCommon/ws/externalSales/Payment.java
src/org/openbravo/erpCommon/ws/externalSales/Product.java
src/org/openbravo/erpCommon/ws/externalSales/ProductPlus.java
src/org/openbravo/erpCommon/ws/externalSales/Tax.java
src/org/openbravo/erpCommon/ws/services/BusinessPartner.java
src/org/openbravo/erpCommon/ws/services/Contact.java
src/org/openbravo/erpCommon/ws/services/Customer.java
src/org/openbravo/erpCommon/ws/services/Location.java
src/org/openbravo/erpCommon/ws/services/WebService.java
src/org/openbravo/erpCommon/ws/services/WebServiceImpl.java
src/org/openbravo/erpCommon/ws/services/WebServicesAddress_data.xsql
src/org/openbravo/erpCommon/ws/services/WebServicesContact_data.xsql
src/org/openbravo/erpCommon/ws/services/WebServicesCustomer_data.xsql
src/org/openbravo/erpCommon/ws/services/WebServices_data.xsql
src/org/openbravo/services/webservice/BusinessPartner.java
src/org/openbravo/services/webservice/Contact.java
src/org/openbravo/services/webservice/Customer.java
src/org/openbravo/services/webservice/Location.java
src/undeploy.wsdd
--- a/config/Format.xml.template	Tue May 10 15:35:00 2011 +0200
+++ b/config/Format.xml.template	Tue May 10 16:23:06 2011 +0200
@@ -23,41 +23,41 @@
 <!--<!DOCTYPE FormatClass SYSTEM "FormatClass.dtd">-->
 <Formats>
    <Number name="euroInform"
-       decimal="," grouping="." formatOutput="#,##0.00" formatInternal="#0.00" />
+       decimal="." grouping="," formatOutput="#,##0.00" formatInternal="#0.00" />
    <Number name="euroRelation"
        decimal="." grouping="," formatOutput="#,##0.00" formatInternal="#0.00" />
    <Number name="euroEdition"
        decimal="." grouping="," formatOutput="#0.00" formatInternal="#0.00" />
    <Number name="euroExcel"
-       decimal="," grouping="." formatOutput="#,##0.##" formatInternal="#0.00" />
+       decimal="." grouping="," formatOutput="#,##0.##" formatInternal="#0.00" />
    <Number name="priceInform"
-       decimal="," grouping="." formatOutput="#,##0.##" formatInternal="#0.00" />
+       decimal="." grouping="," formatOutput="#,##0.##" formatInternal="#0.00" />
    <Number name="priceRelation"
        decimal="." grouping="," formatOutput="#,##0.00" formatInternal="#0.00" />
    <Number name="priceEdition"
        decimal="." grouping="," formatOutput="#0.00" formatInternal="#0.00" />
    <Number name="integerInform"
-       decimal="," grouping="." formatOutput="#,##0" formatInternal="#0" />
+       decimal="." grouping="," formatOutput="#,##0" formatInternal="#0" />
    <Number name="integerRelation"
        decimal="." grouping="," formatOutput="#,##0" formatInternal="#0" />
    <Number name="integerEdition"
        decimal="." grouping="," formatOutput="#0" formatInternal="#0" />
    <Number name="integerExcel"
-       decimal="," grouping="." formatOutput="#,##0" formatInternal="#0" />
+       decimal="." grouping="," formatOutput="#,##0" formatInternal="#0" />
    <Number name="priceExcel"
-       decimal="," grouping="." formatOutput="#,##0.##" formatInternal="#0.00" />
+       decimal="." grouping="," formatOutput="#,##0.##" formatInternal="#0.00" />
    <Number name="qtyRelation"
        decimal="." grouping="," formatOutput="#,##0.###" formatInternal="#0.000" />
    <Number name="qtyEdition"
        decimal="." grouping="," formatOutput="#0.###" formatInternal="#0.000" />
    <Number name="qtyExcel"
-       decimal="," grouping="." formatOutput="#,##0.###" formatInternal="#0.000" />
+       decimal="." grouping="," formatOutput="#,##0.###" formatInternal="#0.000" />
    <Number name="generalQtyRelation"
        decimal="." grouping="," formatOutput="#,##0.######" formatInternal="#0.000000" />
    <Number name="generalQtyEdition"
        decimal="." grouping="," formatOutput="#0.######" formatInternal="#0.000000" />
    <Number name="generalQtyExcel"
-       decimal="," grouping="." formatOutput="#,##0.######" formatInternal="#0.000000" />
+       decimal="." grouping="," formatOutput="#,##0.######" formatInternal="#0.000000" />
    <Number name="amountInform"
-       decimal="," grouping="." formatOutput="#,##0.00" formatInternal="#0.00" />
+       decimal="." grouping="," formatOutput="#,##0.00" formatInternal="#0.00" />
 </Formats>
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java	Tue May 10 15:35:00 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_ExecutePayment.java	Tue May 10 16:23:06 2011 +0200
@@ -182,16 +182,16 @@
               .getBusinessPartner();
           BigDecimal creditUsed = bPartner.getCreditUsed();
           BigDecimal amountWithSign = psd.getInvoicePaymentSchedule().getInvoice()
-              .isSalesTransaction() ? pDetail.getAmount() : pDetail.getAmount().negate();
+              .isSalesTransaction() ? psd.getAmount() : psd.getAmount().negate();
           creditUsed = creditUsed.subtract(amountWithSign);
           bPartner.setCreditUsed(creditUsed);
           OBDal.getInstance().save(bPartner);
-          FIN_AddPayment.updatePaymentScheduleAmounts(psd.getInvoicePaymentSchedule(), pDetail
-              .getAmount(), pDetail.getWriteoffAmount());
+          FIN_AddPayment.updatePaymentScheduleAmounts(psd.getInvoicePaymentSchedule(), psd
+              .getAmount(), psd.getWriteoffAmount());
         }
         if (psd.getOrderPaymentSchedule() != null) {
-          FIN_AddPayment.updatePaymentScheduleAmounts(psd.getOrderPaymentSchedule(), pDetail
-              .getAmount(), pDetail.getWriteoffAmount());
+          FIN_AddPayment.updatePaymentScheduleAmounts(psd.getOrderPaymentSchedule(), psd
+              .getAmount(), psd.getWriteoffAmount());
         }
       }
     }
--- a/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Tue May 10 15:35:00 2011 +0200
+++ b/modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/process/FIN_PaymentProcess.java	Tue May 10 16:23:06 2011 +0200
@@ -243,8 +243,8 @@
             for (FIN_PaymentDetail paymentDetail : payment.getFINPaymentDetailList()) {
               for (FIN_PaymentScheduleDetail paymentScheduleDetail : paymentDetail
                   .getFINPaymentScheduleDetailList()) {
-                BigDecimal amount = paymentDetail.getAmount()
-                    .add(paymentDetail.getWriteoffAmount());
+                BigDecimal amount = paymentScheduleDetail.getAmount().add(
+                    paymentScheduleDetail.getWriteoffAmount());
                 if (paymentScheduleDetail.getInvoicePaymentSchedule() != null) {
                   // BP SO_CreditUsed
                   businessPartner = paymentScheduleDetail.getInvoicePaymentSchedule().getInvoice()
@@ -256,13 +256,13 @@
                     increaseCustomerCredit(businessPartner, amount);
                   }
                   FIN_AddPayment.updatePaymentScheduleAmounts(paymentScheduleDetail
-                      .getInvoicePaymentSchedule(), paymentDetail.getAmount(), paymentDetail
-                      .getWriteoffAmount());
+                      .getInvoicePaymentSchedule(), paymentScheduleDetail.getAmount(),
+                      paymentScheduleDetail.getWriteoffAmount());
                 }
                 if (paymentScheduleDetail.getOrderPaymentSchedule() != null) {
                   FIN_AddPayment.updatePaymentScheduleAmounts(paymentScheduleDetail
-                      .getOrderPaymentSchedule(), paymentDetail.getAmount(), paymentDetail
-                      .getWriteoffAmount());
+                      .getOrderPaymentSchedule(), paymentScheduleDetail.getAmount(),
+                      paymentScheduleDetail.getWriteoffAmount());
                 }
                 // when generating credit for a BP SO_CreditUsed is also updated
                 if (paymentScheduleDetail.getInvoicePaymentSchedule() == null
@@ -359,11 +359,12 @@
             removedPDS = new ArrayList<FIN_PaymentScheduleDetail>();
             for (FIN_PaymentScheduleDetail paymentScheduleDetail : paymentDetail
                 .getFINPaymentScheduleDetailList()) {
-              BigDecimal amount = paymentDetail.getAmount().add(paymentDetail.getWriteoffAmount());
+              BigDecimal amount = paymentScheduleDetail.getAmount().add(
+                  paymentScheduleDetail.getWriteoffAmount());
               if (paymentScheduleDetail.getInvoicePaymentSchedule() != null && restorePaidAmounts) {
                 FIN_AddPayment.updatePaymentScheduleAmounts(paymentScheduleDetail
-                    .getInvoicePaymentSchedule(), paymentDetail.getAmount().negate(), paymentDetail
-                    .getWriteoffAmount().negate());
+                    .getInvoicePaymentSchedule(), paymentScheduleDetail.getAmount().negate(),
+                    paymentScheduleDetail.getWriteoffAmount().negate());
                 // BP SO_CreditUsed
                 businessPartner = paymentScheduleDetail.getInvoicePaymentSchedule().getInvoice()
                     .getBusinessPartner();
@@ -375,8 +376,8 @@
               }
               if (paymentScheduleDetail.getOrderPaymentSchedule() != null && restorePaidAmounts) {
                 FIN_AddPayment.updatePaymentScheduleAmounts(paymentScheduleDetail
-                    .getOrderPaymentSchedule(), paymentDetail.getAmount().negate(), paymentDetail
-                    .getWriteoffAmount().negate());
+                    .getOrderPaymentSchedule(), paymentScheduleDetail.getAmount().negate(),
+                    paymentScheduleDetail.getWriteoffAmount().negate());
               }
               // when generating credit for a BP SO_CreditUsed is also updated
               if (paymentScheduleDetail.getInvoicePaymentSchedule() == null
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-grid.js.ftl	Tue May 10 15:35:00 2011 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/templates/ob-view-grid.js.ftl	Tue May 10 16:23:06 2011 +0200
@@ -103,6 +103,7 @@
     ],
     whereClause: '${data.whereClause?js_string}',
     orderByClause: '${data.orderByClause?js_string}',
+    sortField: '${data.sortField?js_string}',
     filterClause: '${data.filterClause?js_string}',
     
     foreignKeyFieldNames:[
--- a/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java	Tue May 10 15:35:00 2011 +0200
+++ b/modules/org.openbravo.client.application/src/org/openbravo/client/application/window/OBViewGridComponent.java	Tue May 10 16:23:06 2011 +0200
@@ -89,6 +89,27 @@
     if (tab.getHqlorderbyclause() != null) {
       return tab.getHqlorderbyclause();
     }
+
+    return "";
+  }
+
+  public String getSortField() {
+    if (getOrderByClause().length() > 0) {
+      return "";
+    }
+
+    long lowestSortno = Long.MAX_VALUE;
+    LocalField sortByField = null;
+    for (LocalField localField : getFields()) {
+      final Long recordSortno = localField.getField().getRecordSortNo();
+      if (localField.isInitialShow() && recordSortno != null && recordSortno < lowestSortno) {
+        sortByField = localField;
+      }
+    }
+    if (sortByField != null && sortByField.getProperty() != null) {
+      return sortByField.getProperty().getName();
+    }
+
     // use 2 examples of sequence number of line no
     if (entity.hasProperty(Tab.PROPERTY_SEQUENCENUMBER)) {
       return Tab.PROPERTY_SEQUENCENUMBER;
@@ -97,7 +118,12 @@
       return OrderLine.PROPERTY_LINENO;
     }
 
-    return JsonConstants.IDENTIFIER;
+    for (LocalField localField : getFields()) {
+      if (localField.getProperty() != null && localField.getProperty().isIdentifier()) {
+        return localField.getProperty().getName();
+      }
+    }
+    return "";
   }
 
   public String getFilterClause() {
@@ -232,9 +258,6 @@
         if (prop.isId()) {
           continue;
         }
-        if (!fld.isDisplayed()) {
-          continue;
-        }
         if (ApplicationUtils.isUIButton(fld)) {
           continue;
         }
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-quick-launch.js	Tue May 10 15:35:00 2011 +0200
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/ob-quick-launch.js	Tue May 10 16:23:06 2011 +0200
@@ -144,11 +144,7 @@
         
         // client filtering does not always work great...         
         pickListProperties: {
-          dataProperties: {
-            useClientFiltering: false
-          },
           textMatchStyle: 'substring',
-          fetchDelay: 50,
           bodyStyleName: 'OBPickListBody'
         },
         pickListHeaderHeight: 0,
@@ -173,7 +169,7 @@
           displayField: OB.Constants.IDENTIFIER,
           valueField: OB.Constants.ID
         }],
-        autoFetchData: false,
+        autoFetchData: true,
         titleOrientation: 'top',
         title: OB.I18N.getLabel(this.titleLabel),
         editorType: 'comboBox',
@@ -181,7 +177,8 @@
         // local filtering enabled, remove the Id filter
         // explicitly from the criteria list, see getPickListFilter
         filterLocally: true,
-        
+        fetchDelay: 50,
+
         optionDataSource: OB.Datasource.get(this.dataSourceId),
         
         emptyPickListMessage: OB.I18N.getLabel('OBUISC_ListGrid.emptyMessage'),
--- a/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java	Tue May 10 15:35:00 2011 +0200
+++ b/modules/org.openbravo.service.datasource/src/org/openbravo/service/datasource/ReadOnlyDataSourceService.java	Tue May 10 16:23:06 2011 +0200
@@ -30,9 +30,9 @@
 import org.openbravo.base.exception.OBException;
 import org.openbravo.base.provider.OBProvider;
 import org.openbravo.service.json.DataToJsonConverter;
+import org.openbravo.service.json.DefaultJsonDataService.QueryResultWriter;
 import org.openbravo.service.json.JsonConstants;
 import org.openbravo.service.json.JsonUtils;
-import org.openbravo.service.json.DefaultJsonDataService.QueryResultWriter;
 
 /**
  * The SimpleDataSourceService provides a simple way of returning data in the correct format for a
@@ -54,7 +54,7 @@
 
     final String startRowStr = parameters.get(JsonConstants.STARTROW_PARAMETER);
     final String endRowStr = parameters.get(JsonConstants.ENDROW_PARAMETER);
-    int startRow = -1;
+    int startRow = 0;
     boolean doCount = false;
     if (startRowStr != null) {
       startRow = Integer.parseInt(startRowStr);
--- a/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Tue May 10 15:35:00 2011 +0200
+++ b/modules/org.openbravo.userinterface.selector/web/org.openbravo.userinterface.selector/js/ob-selector-item.js	Tue May 10 16:23:06 2011 +0200
@@ -454,7 +454,7 @@
     }
             
     // do not prevent the count operation
-    requestProperties.params[isc.OBViewGrid.NO_COUNT_PARAMETER] = 'false';
+    requestProperties.params[isc.OBViewGrid.NO_COUNT_PARAMETER] = 'true';
 
     // on purpose not passing the third boolean param
     isc.addProperties(requestProperties.params, this.form.view.getContextInfo(false, true));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src-db/database/model/triggers/C_GLITEM_TRG.xml	Tue May 10 16:23:06 2011 +0200
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+  <database name="TRIGGER C_GLITEM_TRG">
+    <trigger name="C_GLITEM_TRG" table="C_GLITEM" fires="before" insert="true" update="false" delete="false" foreach="row">
+      <body><![CDATA[
+    /*************************************************************************
+    * The contents of this file are subject to the Openbravo  Public  License
+    * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
+    * Version 1.1  with a permitted attribution clause; you may not  use this
+    * file except in compliance with the License. You  may  obtain  a copy of
+    * the License at http://www.openbravo.com/legal/license.html
+    * Software distributed under the License  is  distributed  on  an "AS IS"
+    * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+    * License for the specific  language  governing  rights  and  limitations
+    * under the License.
+    * The Original Code is Openbravo ERP.
+    * The Initial Developer of the Original Code is Openbravo SLU
+    * All portions are Copyright (C) 2001-2009 Openbravo SLU
+    * All Rights Reserved.
+    * Contributor(s):  ______________________________________.
+    ************************************************************************/
+        
+BEGIN
+    
+    IF AD_isTriggerEnabled()='N' THEN RETURN;
+    END IF;
+
+    IF INSERTING THEN
+     :NEW.C_TAX_ID := NULL;
+    END IF;
+
+END C_GLITEM_TRG
+]]></body>
+    </trigger>
+  </database>
--- a/src/deploy.wsdd	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-    <service name="ExternalSales" provider="java:RPC">
-        <parameter name="className" value="org.openbravo.erpCommon.ws.externalSales.ExternalSalesImpl"/>
-        <parameter name="allowedMethods" value="*"/>
-        <beanMapping qname="myNS:Product"  xmlns:myNS="/services/ExternalSales" languageSpecificType="java:org.openbravo.erpCommon.ws.externalSales.Product"/>
-        <beanMapping qname="myNS:ProductPlus"  xmlns:myNS="/services/ExternalSales" languageSpecificType="java:org.openbravo.erpCommon.ws.externalSales.ProductPlus"/>
-        <beanMapping qname="myNS:Tax"  xmlns:myNS="/services/ExternalSales" languageSpecificType="java:org.openbravo.erpCommon.ws.externalSales.Tax"/>
-        <beanMapping qname="myNS:Category"  xmlns:myNS="/services/ExternalSales" languageSpecificType="java:org.openbravo.erpCommon.ws.externalSales.Category"/>
-        <beanMapping qname="myNS:BPartner"  xmlns:myNS="/services/ExternalSales" languageSpecificType="java:org.openbravo.erpCommon.ws.externalSales.BPartner"/>
-        <beanMapping qname="myNS:Order"  xmlns:myNS="/services/ExternalSales" languageSpecificType="java:org.openbravo.erpCommon.ws.externalSales.Order"/>
-        <beanMapping qname="myNS:OrderLine"  xmlns:myNS="/services/ExternalSales" languageSpecificType="java:org.openbravo.erpCommon.ws.externalSales.OrderLine"/>
-        <beanMapping qname="myNS:OrderIdentifier"  xmlns:myNS="/services/ExternalSales" languageSpecificType="java:org.openbravo.erpCommon.ws.externalSales.OrderIdentifier"/>
-        <beanMapping qname="myNS:Payment"  xmlns:myNS="/services/ExternalSales" languageSpecificType="java:org.openbravo.erpCommon.ws.externalSales.Payment"/>
-    </service>
-    <service name="WebService" provider="java:RPC">
-        <parameter name="className" value="org.openbravo.erpCommon.ws.services.WebServiceImpl"/>
-        <parameter name="allowedMethods" value="*"/>
-        <beanMapping qname="myNS:BusinessPartner"  xmlns:myNS="/services/WebService" languageSpecificType="java:org.openbravo.erpCommon.ws.services.BusinessPartner"/>
-        <beanMapping qname="myNS:Contact"  xmlns:myNS="/services/WebService" languageSpecificType="java:org.openbravo.erpCommon.ws.services.Contact"/>
-        <beanMapping qname="myNS:Customer"  xmlns:myNS="/services/WebService" languageSpecificType="java:org.openbravo.erpCommon.ws.services.Customer"/>
-        <beanMapping qname="myNS:Location"  xmlns:myNS="/services/WebService" languageSpecificType="java:org.openbravo.erpCommon.ws.services.Location"/>
-    </service>
-</deployment>
--- a/src/org/openbravo/erpCommon/utility/Utility.java	Tue May 10 15:35:00 2011 +0200
+++ b/src/org/openbravo/erpCommon/utility/Utility.java	Tue May 10 16:23:06 2011 +0200
@@ -1149,45 +1149,6 @@
   }
 
   /**
-   * Deprecated. Used in the old order by window.
-   * 
-   * @deprecated
-   * @param SQL
-   * @param fields
-   */
-  @Deprecated
-  public static String getOrderByFromSELECT(String[] SQL, Vector<String> fields) {
-    if (SQL == null || SQL.length == 0)
-      return "";
-    else if (fields == null || fields.size() == 0)
-      return "";
-    final StringBuffer script = new StringBuffer();
-    for (int i = 0; i < fields.size(); i++) {
-      String token = fields.elementAt(i);
-      token = token.trim();
-      boolean isnegative = false;
-      if (token.startsWith("-")) {
-        token = token.substring(1);
-        isnegative = true;
-      }
-      if (Integer.valueOf(token).intValue() > SQL.length)
-        log4j.error("Field not found in select - at position: " + token);
-      if (!script.toString().equals(""))
-        script.append(", ");
-      String strAux = SQL[Integer.valueOf(token).intValue() - 1];
-      strAux = strAux.toUpperCase().trim();
-      final int pos = strAux.indexOf(" AS ");
-      if (pos != -1)
-        strAux = strAux.substring(0, pos);
-      strAux = strAux.trim();
-      script.append(strAux);
-      if (isnegative)
-        script.append(" DESC");
-    }
-    return script.toString();
-  }
-
-  /**
    * Gets the window id for a tab.
    * 
    * @param conn
@@ -1202,17 +1163,6 @@
     return UtilityData.getWindowID(conn, strTabID);
   }
 
-  /*
-   * public static String getRegistryKey(String key) { RegistryKey aKey = null; RegStringValue
-   * regValue = null;
-   * 
-   * try{ aKey =com.ice.jni.registry.Registry.HKEY_LOCAL_MACHINE.openSubKey(
-   * "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment"); regValue =
-   * (RegStringValue)aKey.getValue("PATH"); } catch(NoSuchValueException e) { //Key value does not
-   * exist. } catch(RegistryException e) { //Any other registry API error. } return
-   * regValue.toString(); }
-   */
-
   /**
    * Saves the content into a fisical file.
    * 
@@ -1326,47 +1276,6 @@
   }
 
   /**
-   * Auxiliar method, used by fillSQLParameters and fillTableSQLParameters to get the values for
-   * each parameter.
-   * 
-   * Deprecated as only internal utility function for ComboTableData and TableSQLData code, should
-   * never be used directly by other code.
-   * 
-   * @param conn
-   *          Handler for the database connection.
-   * @param vars
-   *          Handler for the session info.
-   * @param data
-   *          FieldProvider with the columns values.
-   * @param name
-   *          Name of the parameter.
-   * @param window
-   *          Window id.
-   * @param actual_value
-   *          Actual value.
-   * @return String with the parsed parameter.
-   * @throws Exception
-   */
-  @Deprecated
-  public static String parseParameterValue(ConnectionProvider conn, VariablesSecureApp vars,
-      FieldProvider data, String name, String window, String actual_value) throws Exception {
-    String strAux = null;
-    if (name.equalsIgnoreCase("@ACTUAL_VALUE@"))
-      return actual_value;
-    if (data != null)
-      strAux = data.getField(name);
-    if (strAux == null) {
-      strAux = vars.getStringParameter("inp" + Sqlc.TransformaNombreColumna(name));
-      if (log4j.isDebugEnabled())
-        log4j.debug("parseParameterValues - getStringParameter(inp"
-            + Sqlc.TransformaNombreColumna(name) + "): " + strAux);
-      if (strAux == null || strAux.equals(""))
-        strAux = getContext(conn, vars, name, window);
-    }
-    return strAux;
-  }
-
-  /**
    * Auxiliary method, used by fillSQLParameters and fillTableSQLParameters to get the values for
    * each parameter.
    * 
@@ -2017,105 +1926,6 @@
   }
 
   @Deprecated
-  public static boolean hasFormAccess(ConnectionProvider conn, VariablesSecureApp vars,
-      String process) {
-    return hasFormAccess(conn, vars, process, "");
-  }
-
-  @Deprecated
-  public static boolean hasFormAccess(ConnectionProvider conn, VariablesSecureApp vars,
-      String process, String processName) {
-    try {
-      if (process.equals("") && processName.equals(""))
-        return true;
-      else if (!process.equals("")) {
-
-        if (!WindowAccessData.hasFormAccess(conn, vars.getRole(), process))
-          return false;
-      } else {
-        if (!WindowAccessData.hasFormAccessName(conn, vars.getRole(), processName))
-          return false;
-      }
-    } catch (final ServletException e) {
-      return false;
-    }
-    return true;
-  }
-
-  @Deprecated
-  public static boolean hasProcessAccess(ConnectionProvider conn, VariablesSecureApp vars,
-      String process) {
-    return hasProcessAccess(conn, vars, process, "");
-  }
-
-  @Deprecated
-  public static boolean hasProcessAccess(ConnectionProvider conn, VariablesSecureApp vars,
-      String process, String processName) {
-    try {
-      if (process.equals("") && processName.equals(""))
-        return true;
-      else if (!process.equals("")) {
-        if (!WindowAccessData.hasProcessAccess(conn, vars.getRole(), process))
-          return false;
-      } else {
-        if (!WindowAccessData.hasProcessAccessName(conn, vars.getRole(), processName))
-          return false;
-      }
-    } catch (final ServletException e) {
-      return false;
-    }
-    return true;
-  }
-
-  @Deprecated
-  public static boolean hasAccess(ConnectionProvider conn, VariablesSecureApp vars,
-      String TableLevel, String AD_Client_ID, String AD_Org_ID, String window, String tab) {
-    final String command = vars.getCommand();
-    try {
-      if (!canViewInsert(conn, vars, TableLevel, window))
-        return false;
-      else if (!WindowAccessData.hasWindowAccess(conn, vars.getRole(), window))
-        return false;
-      else if (WindowAccessData.hasNoTableAccess(conn, vars.getRole(), tab))
-        return false;
-      else if (command.toUpperCase().startsWith("SAVE")) {
-        if (!canUpdate(conn, vars, AD_Client_ID, AD_Org_ID, window))
-          return false;
-      } else if (command.toUpperCase().startsWith("DELETE")) {
-        if (!canUpdate(conn, vars, AD_Client_ID, AD_Org_ID, window))
-          return false;
-      }
-    } catch (final ServletException e) {
-      return false;
-    }
-    return true;
-  }
-
-  @Deprecated
-  public static boolean canViewInsert(ConnectionProvider conn, VariablesSecureApp vars,
-      String TableLevel, String window) {
-    final String User_Level = getContext(conn, vars, "#User_Level", window);
-
-    boolean retValue = true;
-
-    if (TableLevel.equals("4") && User_Level.indexOf("S") == -1)
-      retValue = false;
-    else if (TableLevel.equals("1") && User_Level.indexOf("O") == -1)
-      retValue = false;
-    else if (TableLevel.equals("3")
-        && (!(User_Level.indexOf("C") != -1 || User_Level.indexOf("O") != -1)))
-      retValue = false;
-    else if (TableLevel.equals("6")
-        && (!(User_Level.indexOf("S") != -1 || User_Level.indexOf("C") != -1)))
-      retValue = false;
-
-    if (retValue)
-      return retValue;
-
-    return retValue;
-  }
-
-  @Deprecated
   // in 2.50
   public static boolean hasAttachments(ConnectionProvider conn, String userClient, String userOrg,
       String tableId, String recordId) throws ServletException {
--- a/src/org/openbravo/erpCommon/utility/WebServiceAdmin.java	Tue May 10 15:35:00 2011 +0200
+++ b/src/org/openbravo/erpCommon/utility/WebServiceAdmin.java	Tue May 10 16:23:06 2011 +0200
@@ -44,15 +44,10 @@
       throw new BuildException("Not valid action: " + action + ". It must be deploy/undeploy.");
     }
 
-    // (un)deploy core webservices
-    File wssdFile = new File(baseDir + "/src/" + wsddFileName);
-    if (wssdFile.exists()) {
-      deployFile(wssdFile);
-    }
     // (un)deploy module webservices
     File modulesDir = new File(baseDir + "/modules");
     for (File module : modulesDir.listFiles()) {
-      wssdFile = new File(module.getAbsoluteFile() + "/src/" + wsddFileName);
+      File wssdFile = new File(module.getAbsoluteFile() + "/src/" + wsddFileName);
       if (wssdFile.exists()) {
         deployFile(wssdFile);
       }
--- a/src/org/openbravo/erpCommon/utility/WindowAccess_data.xsql	Tue May 10 15:35:00 2011 +0200
+++ b/src/org/openbravo/erpCommon/utility/WindowAccess_data.xsql	Tue May 10 16:23:06 2011 +0200
@@ -23,34 +23,6 @@
 <SqlClass name="WindowAccessData" package="org.openbravo.erpCommon.utility" accessModifier="public">
   <SqlClassComment></SqlClassComment>
   
-	<SqlMethod name="hasWindowAccess" type="preparedStatement" return="boolean">
-		<SqlMethodComment></SqlMethodComment>
-		<Sql>
-			select Count(*) AS TOTAL
-			FROM AD_Window_Access
-			WHERE AD_Role_ID = ?
-			AND AD_Window_ID = ?
-			AND IsActive = 'Y'
-		</Sql>
-		<Parameter name="adRoleId"/>
-		<Parameter name="adWindowId"/>
-	</SqlMethod>
-	
-	<SqlMethod name="hasNoTableAccess" type="preparedStatement" return="boolean">
-		<SqlMethodComment></SqlMethodComment>
-		<Sql>
-			select Count(*) AS TOTAL
-			FROM AD_Table_Access t, AD_Tab tb
-			WHERE t.AD_Table_ID = tb.AD_Table_ID
-			AND t.AD_Role_ID = ?
-			AND tb.AD_Tab_ID = ?
-			AND t.IsActive = 'Y'
-			AND t.IsExclude = 'Y'
-		</Sql>
-		<Parameter name="adRoleId"/>
-		<Parameter name="adTabId"/>
-	</SqlMethod>
-	
 	 <SqlMethod name="hasReadOnlyAccess" type="preparedStatement" return="boolean">
     <SqlMethodComment></SqlMethodComment>
     <Sql>
@@ -122,60 +94,6 @@
     <Parameter name="adTabId"/>
   </SqlMethod>
   
-	<SqlMethod name="hasProcessAccess" type="preparedStatement" return="boolean">
-		<SqlMethodComment></SqlMethodComment>
-		<Sql>
-			select Count(*) AS TOTAL
-			FROM AD_Process_Access
-			WHERE AD_Role_ID = ?
-			AND AD_Process_ID = ?
-			AND IsActive = 'Y'
-		</Sql>
-		<Parameter name="adRoleId"/>
-		<Parameter name="adProcessId"/>
-	</SqlMethod>
-	
-	<SqlMethod name="hasProcessAccessName" type="preparedStatement" return="boolean">
-		<SqlMethodComment></SqlMethodComment>
-		<Sql>
-			select Count(*) AS TOTAL
-			FROM AD_Process_Access a, AD_Process p
-			WHERE a.AD_Role_ID = ?
-			AND a.AD_Process_ID = p.AD_Process_ID
-			AND UPPER(p.Value) = UPPER(?)
-			AND a.IsActive = 'Y'
-		</Sql>
-		<Parameter name="adRoleId"/>
-		<Parameter name="name"/>
-	</SqlMethod>
-	
-	<SqlMethod name="hasFormAccess" type="preparedStatement" return="boolean">
-		<SqlMethodComment></SqlMethodComment>
-		<Sql>
-			select Count(*) AS TOTAL
-			FROM AD_Form_Access
-			WHERE AD_Role_ID = ?
-			AND AD_Form_ID = ?
-			AND IsActive = 'Y'
-		</Sql>
-		<Parameter name="adRoleId"/>
-		<Parameter name="adFormId"/>
-	</SqlMethod>
-	
-	<SqlMethod name="hasFormAccessName" type="preparedStatement" return="boolean">
-		<SqlMethodComment></SqlMethodComment>
-		<Sql>
-			select Count(*) AS TOTAL
-			FROM AD_Form_Access a, AD_Form f
-			WHERE a.AD_Role_ID = ?
-			AND a.AD_Form_ID = f.AD_Form_ID
-			AND UPPER(f.ClassName) = UPPER(?)
-			AND a.IsActive = 'Y'
-		</Sql>
-		<Parameter name="adRoleId"/>
-		<Parameter name="name"/>
-	</SqlMethod>
-
 	<SqlMethod name="hasWriteAccess" type="preparedStatement" return="boolean">
 	   <SqlMethodComment></SqlMethodComment>
 	   <Sql>
--- a/src/org/openbravo/erpCommon/ws/externalSales/BPartner.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,99 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.externalSales;
-
-public class BPartner {
-  private java.lang.String id;
-  private java.lang.String name;
-  private java.lang.String country;
-  private java.lang.String region;
-  private java.lang.String city;
-  private java.lang.String postal;
-  private java.lang.String address1;
-  private java.lang.String address2;
-
-  /** Creates a new instance of BPartner */
-  public BPartner() {
-  }
-
-  public java.lang.String getId() {
-    return id;
-  }
-
-  public void setId(java.lang.String id) {
-    this.id = id;
-  }
-
-  public java.lang.String getName() {
-    return name;
-  }
-
-  public void setName(java.lang.String name) {
-    this.name = name;
-  }
-
-  public java.lang.String getCountry() {
-    return country;
-  }
-
-  public void setCountry(java.lang.String country) {
-    this.country = country;
-  }
-
-  public java.lang.String getRegion() {
-    return region;
-  }
-
-  public void setRegion(java.lang.String region) {
-    this.region = region;
-  }
-
-  public java.lang.String getCity() {
-    return city;
-  }
-
-  public void setCity(java.lang.String city) {
-    this.city = city;
-  }
-
-  public java.lang.String getPostal() {
-    return postal;
-  }
-
-  public void setPostal(java.lang.String postal) {
-    this.postal = postal;
-  }
-
-  public java.lang.String getAddress1() {
-    return address1;
-  }
-
-  public void setAddress1(java.lang.String address1) {
-    this.address1 = address1;
-  }
-
-  public java.lang.String getAddress2() {
-    return address2;
-  }
-
-  public void setAddress2(java.lang.String address2) {
-    this.address2 = address2;
-  }
-}
--- a/src/org/openbravo/erpCommon/ws/externalSales/Category.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.externalSales;
-
-import java.io.Serializable;
-
-public class Category extends Object implements Serializable {
-  private static final long serialVersionUID = 1L;
-  private String id;
-  private String name;
-  private String description;
-
-  /** Creates a new instance of Category */
-  public Category() {
-  }
-
-  public String getId() {
-    return id;
-  }
-
-  public void setId(String id) {
-    this.id = id;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public void setDescription(String description) {
-    this.description = description;
-  }
-
-}
--- a/src/org/openbravo/erpCommon/ws/externalSales/ExternalSales.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.externalSales;
-
-public interface ExternalSales {
-
-  public Product[] getProductsCatalog(String entityId, String organizationId, String salesChannel,
-      String username, String password);
-
-  public ProductPlus[] getProductsPlusCatalog(String entityId, String organizationId,
-      String salesChannel, String username, String password);
-
-  public boolean uploadOrders(String entityId, String organizationId, String salesChannel,
-      Order[] newOrders, String username, String password);
-
-  public Order[] getOrders(String entityId, String organizationId, OrderIdentifier[] orderIds,
-      String username, String password);
-}
--- a/src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesIOrder_data.xsql	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,139 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-<SqlClass name="ExternalSalesIOrderData" package="org.openbravo.erpCommon.ws.externalSales">
-	<SqlMethod name="select" type="preparedStatement" return="multiple">
-		<SqlMethodComment></SqlMethodComment>
-		<Sql>
-			<![CDATA[
-				SELECT I_Order_ID, C_BPartner_ID, BPartnerValue, C_BPartner_Location_ID,
-				COALESCE (Address1,Address2,City) AS Addr, ContactName, Email,
-				AD_Client_ID, AD_Org_ID, Name, AD_OrgTrx_ID, isActive, created, createdBy, updated, updatedBy,
-				I_IsImported, I_ErrorMsg, processing, processed, SalesRep_ID, M_Warehouse_ID, M_Pricelist_ID,
-				C_Currency_ID, M_Shipper_ID, isSOTRX, billTo_ID, C_Location_ID, Address1, Address2, Postal, City,
-				C_Region_ID, RegionName, C_Country_ID, CountryCode, AD_User_ID, Phone, C_Project_ID, C_Activity_ID,
-				C_DocType_ID, DocTypeName, C_PaymentTerm_ID, PaymentTermValue, C_Order_ID, DocumentNo, Description,
-				M_Product_ID, ProductValue, UPC, SKU, C_Tax_ID, TaxIndicator, TaxAmt, C_OrderLine_ID, LineDescription,
-				C_UOM_ID, QtyOrdered, PriceActual, C_Campaign_ID, DateOrdered, DatePromised, Order_ReferenceNo,
-				BPartnerUPC, BillTo_UPC, C_BPartner_Location_UPC, Vendor_UPC, Perform_Post, Paymentamount1, Paymentrule1, Paymentamount2, Paymentrule2, '' AS Date_Time_Format
-				FROM I_Order
-				WHERE I_IsImported='N'
-				AND AD_Client_ID = ?
-			]]>
-		</Sql>
-		<Parameter name="ad_client_id"/>
-	</SqlMethod>
-   <SqlMethod name="set" type="constant" return="multiple">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql></Sql>
-  </SqlMethod>
-	<SqlMethod name="insert" type="preparedStatement" return="rowCount" static="false">
-		<SqlMethodComment></SqlMethodComment>
-		<Sql>
-			<![CDATA[
-				INSERT INTO I_Order (I_ORDER_ID, AD_CLIENT_ID, AD_ORG_ID, DOCUMENTNO, createdBy, created, 
-				C_Doctype_ID,dateordered, C_CURRENCY_ID, BPartnervalue, name, C_BPartner_Location_ID,BillTo_ID,
-				Address1,Address2,Postal,City,RegionName,CountryCode,
-				C_OrderLine_ID,M_Product_Id, qtyOrdered, priceActual, 
-				C_Tax_ID, paymenttermvalue, c_PaymentTerm_Id, salesrep_Id, m_Shipper_Id, m_Pricelist_Id, m_Warehouse_Id, 
-				Perform_Post, Paymentamount1, Paymentrule1, Paymentamount2, Paymentrule2) VALUES 
-				(?,?,?,?,'0',to_date(now()),
-				?,to_date(?,?),?,?,?,?,?,
-				to_char(?),to_char(?),to_char(?),to_char(?),to_char(?),to_char(?),
-				?,?,to_number(?),to_number(?),
-				?,?,?,?,?,?,?, 
-				to_char(?),to_number(?),to_char(?),to_number(?),to_char(?))
-			]]>
-		</Sql>
-		<Parameter name="iOrderId"/>
-		<Parameter name="adClientId"/>
-		<Parameter name="adOrgId"/>
-		<Parameter name="orderReferenceno"/>
-		<Parameter name="cDoctypeId"/>
-		<Parameter name="dateordered"/>
-		<Parameter name="dateTimeFormat"/>
-		<Parameter name="cCurrencyId"/>
-		<Parameter name="bpartnervalue"/>
-		<Parameter name="name"/>
-		<Parameter name="cBpartnerLocationId"/>
-		<Parameter name="billtoId"/>
-		<Parameter name="address1"/>
-		<Parameter name="address2"/>
-		<Parameter name="postal"/>
-		<Parameter name="city"/>
-		<Parameter name="regionname"/>
-		<Parameter name="countrycode"/>
-		<Parameter name="cOrderlineId"/>
-		<Parameter name="mProductId"/>
-		<Parameter name="qtyordered"/>
-		<Parameter name="priceactual"/>
-		<Parameter name="cTaxId"/>
-		<Parameter name="paymenttermvalue"/>
-		<Parameter name="cPaymenttermId"/>
-		<Parameter name="salesrepId"/>
-		<Parameter name="mShipperId"/>
-		<Parameter name="mPricelistId"/>
-		<Parameter name="mWarehouseId"/>
-		<Parameter name="performPost"/>
-		<Parameter name="paymentamount1"/>
-		<Parameter name="paymentrule1"/>
-		<Parameter name="paymentamount2"/>
-		<Parameter name="paymentrule2"/>
-	</SqlMethod>
-	<SqlMethod name="update" type="preparedStatement" return="rowCount" static="false">
-		<SqlMethodComment></SqlMethodComment>
-		<Sql>
-			<![CDATA[
-				UPDATE I_Order SET
-					BPartnerValue=?,
-					Name=?,
-					C_BPartner_ID=?,
-					C_Location_ID=?,
-					C_BPartner_Location_ID=?,
-					billTo_ID=?,
-					AD_User_ID=?,
-					Updated=TO_DATE(now()),
-					UpdatedBy=?,
-					C_Order_ID=?,
-					C_Tax_ID=?,
-					C_OrderLine_ID=?,
-					I_IsImported=?,
-					Processed=?,
-					Order_ReferenceNo=?
-				WHERE I_Order_ID = ?
-			]]>
-		</Sql>
-		<Parameter name="bpartnervalue"/>
-		<Parameter name="name"/>
-		<Parameter name="cBpartnerId"/>
-		<Parameter name="cLocationId"/>
-		<Parameter name="cBpartnerLocationId"/>
-		<Parameter name="billtoId"/>
-		<Parameter name="adUserId"/>
-		<Parameter name="updatedby"/>
-		<Parameter name="cOrderId"/>
-		<Parameter name="cTaxId"/>
-		<Parameter name="cOrderlineId"/>
-		<Parameter name="iIsimported"/>
-		<Parameter name="processed"/>
-		<Parameter name="orderReferenceno"/>
-		<Parameter name="iOrderId"/>
-	</SqlMethod>
-</SqlClass>
--- a/src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesImpl.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,514 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License.
- * The Original Code is Openbravo ERP.
- * The Initial Developer of the Original Code is Openbravo SLU
- * All portions are Copyright (C) 2001-2010 Openbravo SLU
- * All Rights Reserved.
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.externalSales;
-
-import java.math.BigDecimal;
-import java.text.SimpleDateFormat;
-import java.util.Vector;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServlet;
-
-import org.apache.axis.MessageContext;
-import org.apache.axis.transport.http.HTTPConstants;
-import org.apache.log4j.Logger;
-import org.openbravo.base.ConnectionProviderContextListener;
-import org.openbravo.base.secureApp.UserLock;
-import org.openbravo.database.ConnectionProvider;
-import org.openbravo.erpCommon.security.SessionLogin;
-import org.openbravo.erpCommon.utility.SequenceIdData;
-
-public class ExternalSalesImpl implements ExternalSales {
-  protected static ConnectionProvider pool;
-  // protected static String javaDateFormat;
-  static Logger log4j = Logger.getLogger(ExternalSales.class);
-
-  // date formats are hard coded because it is required by
-  // synchronization of POS.
-  private final String dateFormatStr = "yyyy-MM-dd HH:mm:ss";
-  private final String dateTimeFormatStr = "YYYY-MM-DD HH24:MI:SS";
-
-  /** Creates a new instance of ExternalSalesImpl */
-  public ExternalSalesImpl() {
-    if (log4j.isDebugEnabled())
-      log4j.debug("ExternalSales");
-    initPool();
-  }
-
-  /**
-   * Check access and block user if needed
-   */
-  private boolean access(String username, String password) {
-    try {
-      UserLock lockSettings = new UserLock(username);
-      lockSettings.delayResponse();
-      if (lockSettings.isLockedUser()) {
-        return false;
-      }
-      String strUserAuth = ExternalSalesOrderData.access(pool, username, password);
-      boolean hasAccess = strUserAuth != null && !strUserAuth.isEmpty();
-      createDBSession(username, strUserAuth);
-      if (strUserAuth == null) {
-        lockSettings.addFail();
-      }
-
-      return hasAccess;
-    } catch (Exception e) {
-      return false;
-    }
-  }
-
-  private void createDBSession(String strUser, String strUserAuth) {
-    try {
-      String usr = strUserAuth == null ? "0" : strUserAuth;
-
-      final SessionLogin sl = new SessionLogin("0", "0", usr);
-
-      if (strUserAuth == null) {
-        sl.setStatus("F");
-      } else {
-        sl.setStatus("WS");
-      }
-      sl.setUserName(strUser);
-      sl.save();
-    } catch (Exception e) {
-      log4j.error("Error creating DB session", e);
-    }
-  }
-
-  public Product[] getProductsCatalog(String ClientID, String organizationId, String salesChannel,
-      String username, String password) {
-
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled()) {
-        log4j.debug("Access denied for user: " + username + " - password: " + password);
-      }
-      return null;
-    }
-
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("getProductsCatalog" + " ClientID " + ClientID + " organizationId "
-          + organizationId + " salesChannel " + salesChannel);
-    }
-
-    try {
-
-      // Select
-      ExternalSalesProductData[] data = ExternalSalesProductData.select(pool, ClientID,
-          salesChannel, organizationId);
-
-      if (data != null && data.length > 0) {
-        int i = 0;
-        if (log4j.isDebugEnabled()) {
-          log4j.debug("data.length " + data.length);
-        }
-        Product[] products = new Product[data.length];
-
-        while (i < data.length) {
-          if (log4j.isDebugEnabled()) {
-            log4j.debug("getProductsCatalog data[i].id " + data[i].id + " data[i].name "
-                + data[i].name);
-          }
-          products[i] = new Product();
-          products[i].setId(data[i].id);
-          products[i].setName(data[i].name);
-          products[i].setNumber(data[i].number1);
-          products[i].setDescription(data[i].description);
-          products[i].setListPrice(new BigDecimal(data[i].listPrice));
-          products[i].setPurchasePrice(new BigDecimal(data[i].purchasePrice));
-          Tax tax = new org.openbravo.erpCommon.ws.externalSales.Tax();
-          tax.setId(data[i].taxId);
-          tax.setName(data[i].taxName);
-          tax.setPercentage(new BigDecimal(data[i].percentage));
-          products[i].setTax(tax);
-          products[i].setImageUrl(data[i].imageUrl);
-          products[i].setEan(data[i].ean);
-          Category category = new org.openbravo.erpCommon.ws.externalSales.Category();
-          category.setId(data[i].mProductCategoryId);
-          category.setName(data[i].mProductCategoryName);
-          category.setDescription(data[i].mProductCategoryDescription);
-          products[i].setCategory(category);
-          i++;
-        }
-        return products;
-      } else if (data != null && data.length == 0) { // In case that don't
-        // return data,
-        // return an empty
-        // array
-        if (log4j.isDebugEnabled()) {
-          log4j.debug("data.length " + data.length);
-        }
-        return new Product[0];
-      }
-    } catch (Exception e) {
-      log4j.error("Error : getProductsCatalog");
-      e.printStackTrace();
-    }
-
-    destroyPool();
-    return null;
-  }
-
-  public ProductPlus[] getProductsPlusCatalog(String ClientID, String organizationId,
-      String salesChannel, String username, String password) {
-
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled()) {
-        log4j.debug("Access denied for user: " + username + " - password: " + password);
-      }
-      return null;
-    }
-
-    if (log4j.isDebugEnabled()) {
-      log4j.debug("getProductsCatalog" + " ClientID " + ClientID + " organizationId "
-          + organizationId + " salesChannel " + salesChannel);
-    }
-
-    try {
-
-      // Select
-      ExternalSalesProductData[] data = ExternalSalesProductData.select(pool, ClientID,
-          salesChannel, organizationId);
-
-      if (data != null && data.length > 0) {
-        int i = 0;
-        if (log4j.isDebugEnabled()) {
-          log4j.debug("data.length " + data.length);
-        }
-        ProductPlus[] products = new ProductPlus[data.length];
-
-        while (i < data.length) {
-          if (log4j.isDebugEnabled()) {
-            log4j.debug("getProductsCatalog data[i].id " + data[i].id + " data[i].name "
-                + data[i].name);
-          }
-          products[i] = new ProductPlus();
-          products[i].setId(data[i].id);
-          products[i].setName(data[i].name);
-          products[i].setNumber(data[i].number1);
-          products[i].setDescription(data[i].description);
-          products[i].setListPrice(new BigDecimal(data[i].listPrice));
-          products[i].setPurchasePrice(new BigDecimal(data[i].purchasePrice));
-          Tax tax = new org.openbravo.erpCommon.ws.externalSales.Tax();
-          tax.setId(data[i].taxId);
-          tax.setName(data[i].taxName);
-          tax.setPercentage(new BigDecimal(data[i].percentage));
-          products[i].setTax(tax);
-          products[i].setImageUrl(data[i].imageUrl);
-          products[i].setEan(data[i].ean);
-          Category category = new org.openbravo.erpCommon.ws.externalSales.Category();
-          category.setId(data[i].mProductCategoryId);
-          category.setName(data[i].mProductCategoryName);
-          category.setDescription(data[i].mProductCategoryDescription);
-          products[i].setCategory(category);
-          products[i].setQtyonhand(new BigDecimal(data[i].qtyonhand));
-          i++;
-        }
-        return products;
-      } else if (data != null && data.length == 0) { // In case that don't
-        // return data,
-        // return an empty
-        // array
-        if (log4j.isDebugEnabled()) {
-          log4j.debug("data.length " + data.length);
-        }
-        return new ProductPlus[0];
-      }
-    } catch (Exception e) {
-      log4j.error("Error : getProductsCatalog");
-      e.printStackTrace();
-    }
-
-    destroyPool();
-    return null;
-  }
-
-  public boolean uploadOrders(String ClientID, String organizationId, String salesChannel,
-      Order[] newOrders, String username, String password) {
-    // boolean flag = false;
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("Access denied");
-      return false;
-    }
-
-    try {
-
-      if (log4j.isDebugEnabled())
-        log4j.debug("uploadOrders" + " ClientID " + ClientID + "organizationId " + organizationId
-            + " sales channel" + salesChannel + " order 1 " + newOrders[0].getOrderId());
-      initPool();
-
-      // Reading default parameters
-      ExternalSalesData[] externalPOS = ExternalSalesData.select(pool, ClientID, organizationId,
-          salesChannel);
-
-      int i = 0;
-      while (newOrders != null && i < newOrders.length) {
-
-        ExternalSalesIOrderData[] data = ExternalSalesIOrderData.set();
-        String defaultBPvalue = "";
-
-        if (externalPOS != null && externalPOS.length > 0) {
-          data[0].adClientId = externalPOS[0].adClientId;
-          data[0].adOrgId = externalPOS[0].adOrgId;
-          data[0].salesrepId = externalPOS[0].salesrepId;
-          data[0].mShipperId = externalPOS[0].mShipperId;
-          data[0].mPricelistId = externalPOS[0].mPricelistId;
-          data[0].cBpartnerId = externalPOS[0].cBpartnerId;
-          data[0].cDoctypeId = externalPOS[0].cDoctypeId;
-          data[0].cCurrencyId = externalPOS[0].cCurrencyId;
-          data[0].mWarehouseId = externalPOS[0].mWarehouseId;
-          data[0].cBpartnerLocationId = externalPOS[0].cBpartnerLocationId;
-          data[0].billtoId = externalPOS[0].billtoId;
-          data[0].performPost = externalPOS[0].performPost;
-          defaultBPvalue = externalPOS[0].bpValue;
-        }
-
-        if (newOrders[i].getOrderId() != null) {
-          data[0].orderReferenceno = newOrders[i].getOrderId().getDocumentNo();
-          SimpleDateFormat dateFormat = new SimpleDateFormat(dateFormatStr);
-          data[0].dateordered = "" + dateFormat.format(newOrders[i].getOrderId().getDateNew());
-          data[0].dateTimeFormat = dateTimeFormatStr;
-        }
-        if (newOrders[i].getBusinessPartner() != null) {
-          data[0].bpartnervalue = newOrders[i].getBusinessPartner().getId();
-          data[0].name = newOrders[i].getBusinessPartner().getName();
-          data[0].countrycode = newOrders[i].getBusinessPartner().getCountry();
-          data[0].regionname = newOrders[i].getBusinessPartner().getRegion();
-          data[0].city = newOrders[i].getBusinessPartner().getCity();
-          data[0].postal = newOrders[i].getBusinessPartner().getPostal();
-          data[0].address1 = newOrders[i].getBusinessPartner().getAddress1();
-          data[0].address2 = newOrders[i].getBusinessPartner().getAddress2();
-        }
-        if ((data[0].bpartnervalue == null || data[0].bpartnervalue.equals(""))
-            && (data[0].name == null || data[0].name.equals(""))) {
-          data[0].bpartnervalue = defaultBPvalue;
-        }
-
-        int k = 1;
-        if (newOrders[i].getPayment() != null) {
-          // At this time we only permit two different paymentrule.
-          // Second payment will sumaryze the rest of payments
-          // This could change in the future
-          if (newOrders[i].getPayment() != null && newOrders[i].getPayment().length >= 1) {
-            data[0].paymentamount1 = (newOrders[i].getPayment()[0].getAmount()).toPlainString();
-            data[0].paymentrule1 = newOrders[i].getPayment()[0].getPaymentType();
-          }
-          BigDecimal amount = BigDecimal.ZERO;
-          while (newOrders[i].getPayment() != null && k < newOrders[i].getPayment().length) {
-            amount = amount.add(newOrders[i].getPayment()[1].getAmount());
-            data[0].paymentrule2 = newOrders[i].getPayment()[1].getPaymentType();
-            k++;
-          }
-          data[0].paymentamount2 = amount.toPlainString();
-        }
-        int j = 0;
-        if (newOrders[i].getLines() != null) {
-          // Insert lines
-          while (newOrders[i].getLines() != null && j < newOrders[i].getLines().length) {
-            data[0].mProductId = newOrders[i].getLines()[j].getProductId();
-            data[0].qtyordered = (newOrders[i].getLines()[j].getUnits()).toPlainString();
-            data[0].priceactual = "" + newOrders[i].getLines()[j].getPrice();
-
-            data[0].cTaxId = newOrders[i].getLines()[j].getTaxId();
-            String sequence = SequenceIdData.getUUID();
-
-            data[0].iOrderId = sequence;
-            if (log4j.isDebugEnabled())
-              log4j.debug("sequence" + data[0].iOrderId + " data[0].paymentamount1"
-                  + data[0].paymentamount1 + " data[0].paymentrule1" + data[0].paymentrule1
-                  + " data[0].paymentamount2" + data[0].paymentamount2 + " data[0].paymentrule2"
-                  + data[0].paymentrule2);
-            data[0].insert(pool);
-            j++;
-          }
-        } else {
-
-          String sequence = SequenceIdData.getUUID();
-
-          data[0].iOrderId = sequence;
-          if (log4j.isDebugEnabled())
-            log4j.debug("sequence" + data[0].iOrderId + " data[0].paymentamount1"
-                + data[0].paymentamount1 + " data[0].paymentrule1" + data[0].paymentrule1
-                + " data[0].paymentamount2" + data[0].paymentamount2 + " data[0].paymentrule2"
-                + data[0].paymentrule2);
-          data[0].insert(pool);
-        }
-        i++;
-      }
-      return true;
-    } catch (Exception e) {
-      log4j.error("Error : uploadOrders");
-      e.printStackTrace();
-
-    }
-    destroyPool();
-    return false;
-  }
-
-  public Order[] getOrders(String ClientID, String organizationId, OrderIdentifier[] orderIds,
-      String username, String password) {
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("Access denied");
-      return null;
-    }
-
-    if (log4j.isDebugEnabled())
-      log4j.debug("getOrders");
-    SimpleDateFormat dateFormat = new SimpleDateFormat(dateFormatStr);
-
-    initPool();
-    Vector<Order> vOrders = new Vector<Order>();
-    Order[] orders = null;
-
-    int cont = 0;
-    while (orderIds != null && cont < orderIds.length) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("ClientID " + ClientID + " organizationId " + organizationId + " orderIds "
-            + orderIds[cont].getDocumentNo() + " - "
-            + dateFormat.format(orderIds[cont].getDateNew()).toString());
-
-      try {
-        // Select
-
-        ExternalSalesOrderData[] data = ExternalSalesOrderData.select(pool, ClientID, dateFormat
-            .format(orderIds[cont].getDateNew()).toString(), orderIds[cont].getDocumentNo());
-        if ((data == null) || (data.length == 0))
-          data = ExternalSalesOrderData.selectIOrder(pool, ClientID, dateFormat.format(
-              orderIds[cont].getDateNew()).toString(), orderIds[cont].getDocumentNo());
-
-        if (data != null && data.length > 0) {
-          if (log4j.isDebugEnabled())
-            log4j.debug("data.length " + data.length);
-          Order order = new org.openbravo.erpCommon.ws.externalSales.Order();
-
-          int i = 0;
-          while (i < data.length) {
-            if (log4j.isDebugEnabled())
-              log4j.debug("getOrders data[i].id " + data[i].id);
-            OrderIdentifier orderIdentifier = new org.openbravo.erpCommon.ws.externalSales.OrderIdentifier();
-            orderIdentifier.setDocumentNo(orderIds[cont].getDocumentNo());
-            orderIdentifier.setDateNew(orderIds[cont].getDateNew());
-            order.setOrderId(orderIdentifier);
-
-            ExternalSalesOrderData[] dataLines = null;
-            if ((data[i].id != null) && (!data[i].id.equals(""))) {
-              dataLines = ExternalSalesOrderData.selectLines(pool, ClientID, data[i].id);
-            } else {
-              if (log4j.isDebugEnabled())
-                log4j.debug("ClientID " + ClientID + " orderIds " + orderIds[cont].getDocumentNo()
-                    + " - " + dateFormat.format(orderIds[cont].getDateNew()).toString());
-              dataLines = ExternalSalesOrderData.selectLinesIOrder(pool, ClientID, dateFormat
-                  .format(orderIds[cont].getDateNew()).toString(), orderIds[cont].getDocumentNo());
-            }
-
-            OrderLine[] orderLines = null;
-            if (dataLines != null && dataLines.length > 0) {
-              if (log4j.isDebugEnabled())
-                log4j.debug("getOrders dataLines.length " + dataLines.length);
-              orderLines = new org.openbravo.erpCommon.ws.externalSales.OrderLine[dataLines.length];
-              int j = 0;
-              while (j < dataLines.length) {
-                OrderLine orderLine = new org.openbravo.erpCommon.ws.externalSales.OrderLine();
-                orderLine
-                    .setOrderLineId((!dataLines[j].orderLineId.equals("")) ? (dataLines[j].orderLineId)
-                        : "0");
-                orderLine.setProductId(dataLines[j].productId);
-                orderLine.setUnits(new BigDecimal(dataLines[j].units));
-                orderLine.setPrice(new BigDecimal(dataLines[j].price));
-                orderLine.setTaxId(dataLines[j].taxId);
-                orderLines[j] = orderLine;
-                j++;
-              }
-            }
-            order.setLines(orderLines);
-            order.setState((Integer.valueOf(data[i].status)).intValue());
-            BPartner bpartner = new org.openbravo.erpCommon.ws.externalSales.BPartner();
-            if (log4j.isDebugEnabled())
-              log4j.debug("data[i].bpartnervalue " + data[i].bpartnervalue
-                  + " data[i].cBpartnerName " + data[i].cBpartnerName);
-            bpartner.setId(data[i].bpartnervalue);
-            bpartner.setName(data[i].cBpartnerName);
-            order.setBusinessPartner(bpartner);
-
-            ExternalSalesOrderData[] dataPayments = null;
-            if ((data[i].id != null) && (!data[i].id.equals("")))
-              dataPayments = ExternalSalesOrderData.selectPayment(pool, ClientID, data[i].id);
-            else {
-              if (log4j.isDebugEnabled())
-                log4j.debug("ClientID " + ClientID + " orderIds " + orderIds[cont].getDocumentNo()
-                    + " - " + dateFormat.format(orderIds[cont].getDateNew()).toString());
-              dataPayments = ExternalSalesOrderData.selectPaymentIOrder(pool, ClientID, dateFormat
-                  .format(orderIds[cont].getDateNew()).toString(), orderIds[cont].getDocumentNo());
-            }
-
-            Payment[] payments = null;
-            if (dataPayments != null && dataPayments.length > 0) {
-              if (log4j.isDebugEnabled())
-                log4j.debug("getOrders dataPayments.length " + dataPayments.length);
-              payments = new org.openbravo.erpCommon.ws.externalSales.Payment[dataPayments.length];
-              int k = 0;
-              while (k < dataPayments.length) {
-                Payment payment = new org.openbravo.erpCommon.ws.externalSales.Payment();
-                payment.setAmount(new BigDecimal(dataPayments[k].amount));
-                payment.setPaymentType(dataPayments[k].paymentrule);
-                payments[k] = payment;
-                k++;
-              }
-            }
-            order.setPayment(payments);
-            i++;
-          }
-          vOrders.addElement(order);
-        }
-      } catch (Exception e) {
-        log4j.error("Error : getOrders");
-        e.printStackTrace();
-      }
-      cont++;
-    }
-    orders = new Order[vOrders.size()];
-    vOrders.copyInto(orders);
-    destroyPool();
-    return orders;
-  }
-
-  private void initPool() {
-    if (log4j.isDebugEnabled())
-      log4j.debug("init");
-    try {
-      HttpServlet srv = (HttpServlet) MessageContext.getCurrentContext().getProperty(
-          HTTPConstants.MC_HTTP_SERVLET);
-      ServletContext context = srv.getServletContext();
-      pool = ConnectionProviderContextListener.getPool(context);
-    } catch (Exception e) {
-      log4j.error("Error : initPool");
-      e.printStackTrace();
-    }
-  }
-
-  private void destroyPool() {
-    if (log4j.isDebugEnabled())
-      log4j.debug("destroy");
-  }
-
-}
--- a/src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesOrder_data.xsql	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,150 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2011 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-<SqlClass name="ExternalSalesOrderData" package="org.openbravo.erpCommon.ws.externalSales">
-  <SqlMethod name="select" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT C_ORDER.C_ORDER_ID AS ID, C_ORDER.DOCUMENTNO, C_ORDER.DATEORDERED AS DATE_NEW, 
-        C_ORDER_STATUS(C_ORDER.C_ORDER_ID) AS STATUS, 
-        C_BPARTNER.C_BPARTNER_ID, C_BPARTNER.NAME AS C_BPARTNER_NAME, C_BPARTNER.VALUE AS BPARTNERVALUE, 
-        C_ORDER.GRANDTOTAL AS AMOUNT, C_PAYMENTTERM.C_PAYMENTTERM_ID AS PAYMENT_TYPE,
-        '' AS ORDER_LINE_ID, '' AS PRODUCT_ID, '' AS UNITS, '' AS PRICE, '' AS TAX_ID,
-        '' AS DEBT_PAYMENT_ID_ID, '' AS PAYMENTRULE, '' AS ACC
-        FROM C_ORDER, C_BPARTNER, C_PAYMENTTERM
-        WHERE C_ORDER.AD_CLIENT_ID = ?
-        AND TO_CHAR(C_ORDER.DATEORDERED, 'DD-MM-YYYY') = TO_CHAR(to_date(?,'DD-MM-YYYY HH24:MI:SS'), 'DD-MM-YYYY')
-        AND C_ORDER.DOCUMENTNO = ?
-        AND C_ORDER.C_BPARTNER_ID = C_BPARTNER.C_BPARTNER_ID
-        AND C_ORDER.C_PAYMENTTERM_ID = C_PAYMENTTERM.C_PAYMENTTERM_ID 
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="date"/>
-    <Parameter name="doc"/>
-  </SqlMethod>
-  <SqlMethod name="selectLines" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT C_ORDERLINE_ID AS ORDER_LINE_ID, M_PRODUCT_ID AS PRODUCT_ID, QTYORDERED AS UNITS, PRICEACTUAL AS PRICE, C_TAX_ID AS TAX_ID
-        FROM C_ORDERLINE
-        WHERE AD_CLIENT_ID = ?
-        AND C_ORDER_ID = ?
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="order"/>
-  </SqlMethod>
-  <SqlMethod name="selectPayment" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT C_DEBT_PAYMENT_ID AS DEBT_PAYMENT_ID_ID, AMOUNT, PAYMENTRULE
-        FROM C_DEBT_PAYMENT
-        WHERE AD_CLIENT_ID = ?
-        AND C_ORDER_ID = ?
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="order"/>
-  </SqlMethod>
-
-
-
-
-  <SqlMethod name="selectIOrder" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT DISTINCT '' AS ID, I_ORDER.DOCUMENTNO, I_ORDER.DATEORDERED AS DATE_NEW, 
-        1 AS STATUS, I_ORDER.C_BPARTNER_ID, I_ORDER.NAME AS C_BPARTNER_NAME, I_ORDER.BPARTNERVALUE AS BPARTNERVALUE 
-        FROM I_ORDER
-        WHERE I_ORDER.AD_CLIENT_ID = ?
-        AND TO_CHAR(I_ORDER.DATEORDERED, 'DD-MM-YYYY') =  TO_CHAR(to_date(?,'DD-MM-YYYY HH24:MI:SS'), 'DD-MM-YYYY')
-        AND I_ORDER.DOCUMENTNO = ?
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="date"/>
-    <Parameter name="doc"/>
-  </SqlMethod>
-
-  <SqlMethod name="selectLinesIOrder" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT DISTINCT C_ORDERLINE_ID AS ORDER_LINE_ID, M_PRODUCT_ID AS PRODUCT_ID, QTYORDERED AS UNITS, PRICEACTUAL AS PRICE, C_TAX_ID AS TAX_ID
-        FROM I_ORDER
-        WHERE AD_CLIENT_ID = ?
-        AND TO_CHAR(I_ORDER.DATEORDERED, 'DD-MM-YYYY') =  TO_CHAR(to_date(?,'DD-MM-YYYY HH24:MI:SS'), 'DD-MM-YYYY')
-        AND DOCUMENTNO = ?
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="date"/>
-    <Parameter name="doc"/>
-  </SqlMethod>
-
-  <SqlMethod name="selectPaymentIOrder" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT DOCUMENTNO, DATEORDERED AS DATE_NEW, PAYMENTRULE1 AS PAYMENTRULE ,PAYMENTAMOUNT1 AS AMOUNT
-           FROM I_ORDER
-        WHERE AD_CLIENT_ID = ?
-        AND TO_CHAR(DATEORDERED, 'DD-MM-YYYY') =  TO_CHAR(to_date(?,'DD-MM-YYYY HH24:MI:SS'), 'DD-MM-YYYY')
-        AND DOCUMENTNO = ?
-           AND PAYMENTRULE1 IS NOT NULL
-        UNION 
-        SELECT I_ORDER.DOCUMENTNO, I_ORDER.DATEORDERED AS DATE_NEW,PAYMENTRULE2, PAYMENTAMOUNT2 AS AMOUNT
-           FROM I_ORDER
-        WHERE AD_CLIENT_ID = ?
-        AND TO_CHAR(DATEORDERED, 'DD-MM-YYYY') =  TO_CHAR(to_date(?,'DD-MM-YYYY HH24:MI:SS'), 'DD-MM-YYYY')
-        AND DOCUMENTNO = ?
-           AND PAYMENTRULE2 IS NOT NULL
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="date"/>
-    <Parameter name="doc"/>
-    <Parameter name="client"/>
-    <Parameter name="date"/>
-    <Parameter name="doc"/>
-  </SqlMethod>
-
-  <SqlMethod name="access" type="preparedStatement" return="String">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-         SELECT u.ad_user_id AS ACC
-				   FROM AD_USER       U, 
-					      AD_USER_ROLES R
-					 WHERE USERNAME = ? 
-             AND PASSWORD = ?
-					   AND  U.AD_USER_ID = R.AD_USER_ID
-      ]]>
-    </Sql>
-    <Parameter name="username"/>
-    <Parameter name="password"/>
-  </SqlMethod>
-
-</SqlClass>
--- a/src/org/openbravo/erpCommon/ws/externalSales/ExternalSalesProduct_data.xsql	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-<SqlClass name="ExternalSalesProductData" package="org.openbravo.erpCommon.ws.externalSales">
-  <SqlMethod name="select" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT M_PRODUCT.M_PRODUCT_ID AS ID, M_PRODUCT.NAME AS NAME,
-        M_PRODUCT.VALUE AS NUMBER1, M_PRODUCT.DESCRIPTION AS DESCRIPTION, 
-        M_PRODUCTPRICE.PRICESTD AS LIST_PRICE, COALESCE(M_Get_Purchase_Price(M_PRODUCT.M_PRODUCT_ID),0) AS PURCHASE_PRICE, 
-        C_TAX.C_TAX_ID AS TAX_ID, C_TAX.NAME AS TAX_NAME, C_TAX.RATE AS PERCENTAGE,
-        M_PRODUCT.IMAGEURL AS IMAGE_URL, M_PRODUCT.UPC AS EAN, 
-        M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID AS M_PRODUCT_CATEGORY_ID, M_PRODUCT_CATEGORY.NAME AS M_PRODUCT_CATEGORY_NAME, 
-        M_PRODUCT_CATEGORY.DESCRIPTION AS M_PRODUCT_CATEGORY_DESCRIPTION,
-				(SELECT SUM(S.QTYONHAND)
-						FROM M_STORAGE_DETAIL S, M_LOCATOR L
-						WHERE S.M_LOCATOR_ID = L.M_LOCATOR_ID
-						AND S.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID AND L.M_WAREHOUSE_ID = CEPOS.M_WAREHOUSE_ID) AS QTYONHAND        
-        FROM C_EXTERNALPOS CEPOS, M_PRODUCT, M_PRODUCT_CATEGORY, C_TAX, C_TAXCATEGORY, M_PRODUCTPRICE
-        WHERE CEPOS.AD_CLIENT_ID = ?
-        AND CEPOS.VALUE = ?
-        AND CEPOS.AD_ORG_ID = ?
-        AND CEPOS.ISACTIVE = 'Y'
-        AND M_PRODUCT.C_TAXCATEGORY_ID = C_TAXCATEGORY.C_TAXCATEGORY_ID
-        AND C_TAXCATEGORY.C_TAXCATEGORY_ID = C_TAX.C_TAXCATEGORY_ID
-        AND C_TAX.C_TAX_ID = C_GETTAX(M_PRODUCT.M_PRODUCT_ID, TO_DATE(NOW()), ?, CEPOS.M_WAREHOUSE_ID, C_GETBPLOCATIONID(CEPOS.C_BPARTNER_ID,'B'),C_GETBPLOCATIONID(CEPOS.C_BPARTNER_ID,'S'),NULL,'Y')
-        AND M_PRODUCT.M_PRODUCT_CATEGORY_ID = M_PRODUCT_CATEGORY.M_PRODUCT_CATEGORY_ID
-        AND M_PRODUCTPRICE.AD_CLIENT_ID= CEPOS.AD_CLIENT_ID 
-        AND M_PRODUCTPRICE.ISACTIVE = 'Y'
-        AND M_PRODUCTPRICE.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID
-        AND M_PRODUCTPRICE.M_PRICELIST_VERSION_ID = M_Get_Pricelist_Version(CEPOS.M_PRICELIST_ID, TO_DATE(now()))
-        AND ((COALESCE(CEPOS.INCLUDE_PRODUCT_CATEGORY,'Y') = 'N' 
-              AND EXISTS (SELECT 1 FROM C_EXTERNALPOS_CATEGORY CEPOS_CAT
-                          WHERE CEPOS_CAT.C_EXTERNALPOS_ID = CEPOS.C_EXTERNALPOS_ID
-                          AND CEPOS_CAT.M_PRODUCT_CATEGORY_ID = M_PRODUCT.M_PRODUCT_CATEGORY_ID)) OR 
-             (COALESCE(CEPOS.INCLUDE_PRODUCT_CATEGORY,'Y') = 'Y' 
-             AND NOT EXISTS (SELECT 1 FROM C_EXTERNALPOS_CATEGORY CEPOS_CAT
-                             WHERE CEPOS_CAT.C_EXTERNALPOS_ID = CEPOS.C_EXTERNALPOS_ID
-                             AND CEPOS_CAT.M_PRODUCT_CATEGORY_ID = M_PRODUCT.M_PRODUCT_CATEGORY_ID)))
-        AND ((COALESCE(CEPOS.INCLUDE_PRODUCT,'Y') = 'N' 
-              AND EXISTS (SELECT 1 FROM C_EXTERNALPOS_PRODUCT CEPOS_PROD
-                          WHERE CEPOS_PROD.C_EXTERNALPOS_ID = CEPOS.C_EXTERNALPOS_ID
-                          AND CEPOS_PROD.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID)) OR 
-             (COALESCE(CEPOS.INCLUDE_PRODUCT,'Y') = 'Y' 
-              AND NOT EXISTS (SELECT 1 FROM C_EXTERNALPOS_PRODUCT CEPOS_PROD
-                              WHERE CEPOS_PROD.C_EXTERNALPOS_ID = CEPOS.C_EXTERNALPOS_ID
-                              AND CEPOS_PROD.M_PRODUCT_ID = M_PRODUCT.M_PRODUCT_ID)))
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="salesChannel"/>
-    <Parameter name="organizationId"/>
-    <Parameter name="organizationId"/>
-  </SqlMethod>
-</SqlClass>
--- a/src/org/openbravo/erpCommon/ws/externalSales/ExternalSales_data.xsql	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-
-<SqlClass name="ExternalSalesData" package="org.openbravo.erpCommon.ws.externalSales">
-  <SqlMethod name="select" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-    <Sql>
-      <![CDATA[
-        SELECT C_EXTERNALPOS_ID, C_EXTERNALPOS.AD_CLIENT_ID, C_EXTERNALPOS.AD_ORG_ID, C_EXTERNALPOS.ISACTIVE, 
-        C_EXTERNALPOS.CREATED, C_EXTERNALPOS.CREATEDBY, C_EXTERNALPOS.UPDATED, C_EXTERNALPOS.UPDATEDBY, 
-        C_EXTERNALPOS.VALUE, C_EXTERNALPOS.NAME, C_EXTERNALPOS.DESCRIPTION,
-        C_EXTERNALPOS.M_WAREHOUSE_ID, C_EXTERNALPOS.C_DOCTYPE_ID, C_EXTERNALPOS.C_BPARTNER_ID, C_EXTERNALPOS.M_PRICELIST_ID, M_PRICELIST.C_CURRENCY_ID, 
-        C_EXTERNALPOS.SALESREP_ID, C_EXTERNALPOS.M_SHIPPER_ID, C_EXTERNALPOS.INCLUDE_PRODUCT, C_EXTERNALPOS.INCLUDE_PRODUCT_CATEGORY, 
-        C_EXTERNALPOS.PERFORM_POST, C_GETBPLOCATIONID(C_EXTERNALPOS.C_BPARTNER_ID,'B') AS C_BPARTNER_LOCATION_ID, 
-        C_GETBPLOCATIONID(C_EXTERNALPOS.C_BPARTNER_ID,'S') AS BILLTO_ID, C_BPARTNER.VALUE AS BP_VALUE
-        FROM C_EXTERNALPOS, C_BPARTNER, M_PRICELIST
-        WHERE C_EXTERNALPOS.AD_CLIENT_ID = ?
-        AND C_EXTERNALPOS.AD_ORG_ID = ?
-        AND C_EXTERNALPOS.VALUE = ?
-        AND C_BPARTNER.C_BPARTNER_ID = C_EXTERNALPOS.C_BPARTNER_ID
-        AND C_BPARTNER.AD_CLIENT_ID = C_EXTERNALPOS.AD_CLIENT_ID
-        AND M_PRICELIST.M_PRICELIST_ID = C_EXTERNALPOS.M_PRICELIST_ID
-      ]]>
-    </Sql>
-    <Parameter name="client"/>
-    <Parameter name="org"/>
-    <Parameter name="salesChannel"/>
-  </SqlMethod>
-</SqlClass>
--- a/src/org/openbravo/erpCommon/ws/externalSales/Order.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-package org.openbravo.erpCommon.ws.externalSales;
-
-public class Order {
-
-  private OrderIdentifier orderId;
-  private OrderLine[] lines;
-  private int state;
-  private BPartner businessPartner;
-  private Payment[] payments;
-
-  /** Creates a new instance of Order */
-  public Order() {
-  }
-
-  public OrderIdentifier getOrderId() {
-    return orderId;
-  }
-
-  public void setOrderId(OrderIdentifier orderId) {
-    this.orderId = orderId;
-  }
-
-  public OrderLine[] getLines() {
-    return lines;
-  }
-
-  public void setLines(OrderLine[] lines) {
-    this.lines = lines;
-  }
-
-  public int getState() {
-    return state;
-  }
-
-  public void setState(int state) {
-    this.state = state;
-  }
-
-  public BPartner getBusinessPartner() {
-    return businessPartner;
-  }
-
-  public void setBusinessPartner(BPartner businessPartner) {
-    this.businessPartner = businessPartner;
-  }
-
-  public Payment[] getPayment() {
-    return payments;
-  }
-
-  public void setPayment(Payment[] payments) {
-    this.payments = payments;
-  }
-
-}
--- a/src/org/openbravo/erpCommon/ws/externalSales/OrderIdentifier.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2006 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.externalSales;
-
-public class OrderIdentifier {
-
-  private String documentNo;
-  private java.util.Date dateNew;
-
-  /** Creates a new instance of Order */
-  public OrderIdentifier() {
-  }
-
-  public String getDocumentNo() {
-    return documentNo;
-  }
-
-  public void setDocumentNo(String documentNo) {
-    this.documentNo = documentNo;
-  }
-
-  public java.util.Date getDateNew() {
-    return dateNew;
-  }
-
-  public void setDateNew(java.util.Date dateNew) {
-    this.dateNew = dateNew;
-  }
-
-}
--- a/src/org/openbravo/erpCommon/ws/externalSales/OrderLine.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.externalSales;
-
-import java.math.BigDecimal;
-
-public class OrderLine {
-
-  private String orderLineId;
-  private String productId;
-  private BigDecimal units;
-  private BigDecimal price;
-  private String taxId;
-
-  /** Creates a new instance of OrderLine */
-  public OrderLine() {
-  }
-
-  public String getOrderLineId() {
-    return orderLineId;
-  }
-
-  public void setOrderLineId(String orderLineId) {
-    this.orderLineId = orderLineId;
-  }
-
-  public String getProductId() {
-    return productId;
-  }
-
-  public void setProductId(String productId) {
-    this.productId = productId;
-  }
-
-  public BigDecimal getUnits() {
-    return units;
-  }
-
-  public void setUnits(BigDecimal units) {
-    this.units = units;
-  }
-
-  public BigDecimal getPrice() {
-    return price;
-  }
-
-  public void setPrice(BigDecimal price) {
-    this.price = price;
-  }
-
-  public String getTaxId() {
-    return taxId;
-  }
-
-  public void setTaxId(String taxId) {
-    this.taxId = taxId;
-  }
-
-}
--- a/src/org/openbravo/erpCommon/ws/externalSales/Payment.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,49 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.externalSales;
-
-import java.math.BigDecimal;
-
-public class Payment {
-
-  private BigDecimal amount;
-  private String paymentType;
-
-  /** Creates a new instance of Payment */
-  public Payment() {
-  }
-
-  public BigDecimal getAmount() {
-    return amount;
-  }
-
-  public void setAmount(BigDecimal amount) {
-    this.amount = amount;
-  }
-
-  public String getPaymentType() {
-    return paymentType;
-  }
-
-  public void setPaymentType(String paymentType) {
-    this.paymentType = paymentType;
-  }
-
-}
--- a/src/org/openbravo/erpCommon/ws/externalSales/Product.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,117 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.externalSales;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-public class Product extends Object implements Serializable {
-  private static final long serialVersionUID = 1L;
-  private String id;
-  private String name;
-  private String number;
-  private String description;
-  private BigDecimal listPrice;
-  private BigDecimal purchasePrice;
-  private Tax tax;
-  private String imageUrl;
-  private String ean;
-  private Category category;
-
-  public String getId() {
-    return id;
-  }
-
-  public void setId(String id) {
-    this.id = id;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public String getNumber() {
-    return number;
-  }
-
-  public void setNumber(String number) {
-    this.number = number;
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public void setDescription(String description) {
-    this.description = description;
-  }
-
-  public BigDecimal getListPrice() {
-    return listPrice;
-  }
-
-  public void setListPrice(BigDecimal listPrice) {
-    this.listPrice = listPrice;
-  }
-
-  public BigDecimal getPurchasePrice() {
-    return purchasePrice;
-  }
-
-  public void setPurchasePrice(BigDecimal purchasePrice) {
-    this.purchasePrice = purchasePrice;
-  }
-
-  public Tax getTax() {
-    return tax;
-  }
-
-  public void setTax(Tax tax) {
-    this.tax = tax;
-  }
-
-  public String getImageUrl() {
-    return imageUrl;
-  }
-
-  public void setImageUrl(String imageUrl) {
-    this.imageUrl = imageUrl;
-  }
-
-  public String getEan() {
-    return ean;
-  }
-
-  public void setEan(String ean) {
-    this.ean = ean;
-  }
-
-  public Category getCategory() {
-    return category;
-  }
-
-  public void setCategory(Category category) {
-    this.category = category;
-  }
-}
--- a/src/org/openbravo/erpCommon/ws/externalSales/ProductPlus.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.externalSales;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-public class ProductPlus extends Product implements Serializable {
-
-  private static final long serialVersionUID = 12L;
-
-  private BigDecimal qtyonhand;
-
-  public BigDecimal getQtyonhand() {
-    return qtyonhand;
-  }
-
-  public void setQtyonhand(BigDecimal qtyonhand) {
-    this.qtyonhand = qtyonhand;
-  }
-}
--- a/src/org/openbravo/erpCommon/ws/externalSales/Tax.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2009 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.externalSales;
-
-import java.io.Serializable;
-import java.math.BigDecimal;
-
-public class Tax extends Object implements Serializable {
-  private static final long serialVersionUID = 1L;
-  private String id;
-  private String name;
-  private BigDecimal percentage;
-
-  /** Creates a new instance of Tax */
-  public Tax() {
-  }
-
-  public String getId() {
-    return id;
-  }
-
-  public void setId(String id) {
-    this.id = id;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setName(String name) {
-    this.name = name;
-  }
-
-  public BigDecimal getPercentage() {
-    return percentage;
-  }
-
-  public void setPercentage(BigDecimal percentage) {
-    this.percentage = percentage;
-  }
-
-}
--- a/src/org/openbravo/erpCommon/ws/services/BusinessPartner.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.services;
-
-public class BusinessPartner {
-  private String id;
-  private String clientId;
-  private String name;
-  private String searchKey;
-  private String description;
-  private Boolean complete;
-  private Boolean customer;
-  private Boolean vendor;
-  private Location[] locations;
-  private Contact[] contacts;
-
-  public BusinessPartner() {
-  }
-
-  public String getId() {
-    return id;
-  }
-
-  public void setId(String value) {
-    id = value;
-  }
-
-  public String getClientId() {
-    return clientId;
-  }
-
-  public void setClientId(String value) {
-    clientId = value;
-  }
-
-  public String getName() {
-    return name;
-  }
-
-  public void setDescription(String value) {
-    description = value;
-  }
-
-  public String getDescription() {
-    return description;
-  }
-
-  public void setName(String value) {
-    name = value;
-  }
-
-  public String getSearchKey() {
-    return searchKey;
-  }
-
-  public void setSearchKey(String value) {
-    searchKey = value;
-  }
-
-  public Location[] getLocations() {
-    return locations;
-  }
-
-  public void setLocations(Location[] value) {
-    locations = value;
-  }
-
-  public Contact[] getContacts() {
-    return contacts;
-  }
-
-  public void setContacts(Contact[] value) {
-    contacts = value;
-  }
-
-  public Boolean isComplete() {
-    return complete;
-  }
-
-  public void setComplete(Boolean value) {
-    complete = value;
-  }
-
-  public Boolean isCustomer() {
-    return customer;
-  }
-
-  public void setCustomer(Boolean value) {
-    customer = value;
-  }
-
-  public Boolean isVendor() {
-    return vendor;
-  }
-
-  public void setVendor(Boolean value) {
-    vendor = value;
-  }
-}
--- a/src/org/openbravo/erpCommon/ws/services/Contact.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.services;
-
-public class Contact {
-  private String id;
-  private String clientId;
-  private String businessPartnerId;
-  private String firstname;
-  private String lastname;
-  private String email;
-  private String phone;
-  private String phone2;
-  private String fax;
-
-  public Contact() {
-  }
-
-  public String getId() {
-    return id;
-  }
-
-  public void setId(String value) {
-    id = value;
-  }
-
-  public String getClientId() {
-    return clientId;
-  }
-
-  public void setClientId(String value) {
-    clientId = value;
-  }
-
-  public String getBusinessPartnerId() {
-    return businessPartnerId;
-  }
-
-  public void setBusinessPartnerId(String value) {
-    businessPartnerId = value;
-  }
-
-  public String getFirstName() {
-    return firstname;
-  }
-
-  public void setFirstName(String value) {
-    firstname = value;
-  }
-
-  public String getLastName() {
-    return lastname;
-  }
-
-  public void setLastName(String value) {
-    lastname = value;
-  }
-
-  public String getEmail() {
-    return email;
-  }
-
-  public void setEmail(String value) {
-    email = value;
-  }
-
-  public String getPhone() {
-    return phone;
-  }
-
-  public void setPhone(String value) {
-    phone = value;
-  }
-
-  public String getPhone2() {
-    return phone2;
-  }
-
-  public void setPhone2(String value) {
-    phone2 = value;
-  }
-
-  public String getFax() {
-    return fax;
-  }
-
-  public void setFax(String value) {
-    fax = value;
-  }
-}
--- a/src/org/openbravo/erpCommon/ws/services/Customer.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.services;
-
-public class Customer extends BusinessPartner {
-
-  public Customer() {
-    setCustomer(true);
-  }
-}
--- a/src/org/openbravo/erpCommon/ws/services/Location.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.services;
-
-public class Location {
-  private String id;
-  private String clientId;
-  private String businessPartnerId;
-  private String address1;
-  private String address2;
-  private String city;
-  private String postal;
-  private String region;
-  private String country;
-
-  public Location() {
-  }
-
-  public String getId() {
-    return id;
-  }
-
-  public void setId(String value) {
-    id = value;
-  }
-
-  public String getClientId() {
-    return clientId;
-  }
-
-  public void setClientId(String value) {
-    clientId = value;
-  }
-
-  public String getBusinessPartnerId() {
-    return businessPartnerId;
-  }
-
-  public void setBusinessPartnerId(String value) {
-    businessPartnerId = value;
-  }
-
-  public String getAddress1() {
-    return address1;
-  }
-
-  public void setAddress1(String value) {
-    address1 = value;
-  }
-
-  public String getAddress2() {
-    return address2;
-  }
-
-  public void setAddress2(String value) {
-    address2 = value;
-  }
-
-  public String getCity() {
-    return city;
-  }
-
-  public void setCity(String value) {
-    city = value;
-  }
-
-  public String getPostal() {
-    return postal;
-  }
-
-  public void setPostal(String value) {
-    postal = value;
-  }
-
-  public String getRegion() {
-    return region;
-  }
-
-  public void setRegion(String value) {
-    region = value;
-  }
-
-  public String getCountry() {
-    return country;
-  }
-
-  public void setCountry(String value) {
-    country = value;
-  }
-}
--- a/src/org/openbravo/erpCommon/ws/services/WebService.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.services;
-
-public interface WebService {
-  public Customer[] getCustomers(String clientId, String username, String password);
-
-  public Customer getCustomer(String clientId, String customerId, String username, String password);
-
-  public Customer getCustomer(String clientId, String name, String searchKey, String username,
-      String password);
-
-  public Boolean updateCustomer(BusinessPartner customer, String username, String password);
-
-  public int[] getCustomerAddresses(String clientId, String customerId, String username,
-      String password);
-
-  public Location getCustomerLocation(String clientId, String customerId, String locationId,
-      String username, String password);
-
-  public Boolean updateAddress(Location addr, String username, String password);
-
-  public Contact getCustomerContact(String clientId, String customerId, String contactId,
-      String username, String password);
-
-  public Boolean updateContact(Contact contact, String username, String password);
-}
--- a/src/org/openbravo/erpCommon/ws/services/WebServiceImpl.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,320 +0,0 @@
-/*
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2008-2010 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
- */
-
-package org.openbravo.erpCommon.ws.services;
-
-import javax.servlet.ServletContext;
-import javax.servlet.http.HttpServlet;
-
-import org.apache.axis.MessageContext;
-import org.apache.axis.transport.http.HTTPConstants;
-import org.apache.log4j.Logger;
-import org.openbravo.base.ConnectionProviderContextListener;
-import org.openbravo.base.secureApp.UserLock;
-import org.openbravo.database.ConnectionProvider;
-import org.openbravo.erpCommon.security.SessionLogin;
-
-public class WebServiceImpl implements WebService {
-  protected static ConnectionProvider pool;
-  static Logger log4j = Logger.getLogger(WebService.class);
-
-  public WebServiceImpl() {
-    initPool();
-  }
-
-  /**
-   * Check access and block user if needed
-   */
-  private boolean access(String username, String password) {
-    try {
-      UserLock lockSettings = new UserLock(username);
-      lockSettings.delayResponse();
-      if (lockSettings.isLockedUser()) {
-        return false;
-      }
-      String strUserAuth = WebServicesData.hasAccess(pool, username, password);
-      boolean hasAccess = strUserAuth != null && !strUserAuth.isEmpty();
-      createDBSession(username, strUserAuth);
-      if (strUserAuth == null) {
-        lockSettings.addFail();
-      }
-
-      return hasAccess;
-    } catch (Exception e) {
-      return false;
-    }
-  }
-
-  private void createDBSession(String strUser, String strUserAuth) {
-    try {
-      String usr = strUserAuth == null ? "0" : strUserAuth;
-
-      final SessionLogin sl = new SessionLogin("0", "0", usr);
-
-      if (strUserAuth == null) {
-        sl.setStatus("F");
-      } else {
-        sl.setStatus("WS");
-      }
-      sl.setUserName(strUser);
-      sl.save();
-    } catch (Exception e) {
-      log4j.error("Error creating DB session", e);
-    }
-  }
-
-  public Customer[] getCustomers(String clientId, String username, String password) {
-    Customer[] customers = null;
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("Access denied for user: " + username);
-      return null;
-    }
-    try {
-
-      WebServicesCustomerData[] data = WebServicesCustomerData.select(pool, clientId, username);
-
-      customers = new Customer[data.length];
-
-      for (int i = 0; i < data.length; i++) {
-        customers[i] = new Customer();
-        customers[i].setId(data[i].id);
-        customers[i].setClientId(data[i].clientId);
-        customers[i].setName(data[i].name);
-        customers[i].setDescription(data[i].description);
-        customers[i].setSearchKey(data[i].searchkey);
-        customers[i].setComplete(false);
-      }
-    } catch (Exception e) {
-      log4j.error(e.getMessage());
-    } finally {
-      destroyPool();
-    }
-    return customers;
-  }
-
-  public Customer getCustomer(String clientId, String customerId, String username, String password) {
-    Customer customer = null;
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("Access denied for user: " + username);
-      return null;
-    }
-    try {
-
-      WebServicesCustomerData[] data = WebServicesCustomerData.selectCustomerById(pool, clientId,
-          customerId, username);
-
-      if (data.length > 0) {
-        customer = new Customer();
-        customer.setId(data[0].id);
-        customer.setClientId(data[0].clientId);
-        customer.setName(data[0].name);
-        customer.setSearchKey(data[0].searchkey);
-        customer.setComplete(false);
-      }
-    } catch (Exception e) {
-      log4j.error(e.getMessage());
-    } finally {
-      destroyPool();
-    }
-    return customer;
-  }
-
-  public Customer getCustomer(String clientId, String name, String searchKey, String username,
-      String password) {
-    Customer customer = null;
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("Access denied for user: " + username);
-      return null;
-    }
-    try {
-
-      WebServicesCustomerData[] data = WebServicesCustomerData.selectCustomer(pool, clientId,
-          username, (name == null ? "" : name), (searchKey == null ? "" : searchKey));
-
-      if (data.length == 1) {
-        customer = new Customer();
-        customer.setId(data[0].id);
-        customer.setClientId(data[0].clientId);
-        customer.setName(data[0].name);
-        customer.setSearchKey(data[0].searchkey);
-        customer.setComplete(false);
-      }
-    } catch (Exception e) {
-      log4j.error(e.getMessage());
-    } finally {
-      destroyPool();
-    }
-    return customer;
-  }
-
-  public Boolean updateCustomer(BusinessPartner customer, String username, String password) {
-    int updated = 0;
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("Access denied for user: " + username);
-      return null;
-    }
-    try {
-      updated = WebServicesCustomerData.updateCustomer(pool, customer.getName(), customer
-          .getSearchKey(), String.valueOf(customer.getClientId()),
-          String.valueOf(customer.getId()), username);
-    } catch (Exception e) {
-      log4j.error(e.getMessage());
-    } finally {
-      destroyPool();
-    }
-    return (updated == 0 ? false : true);
-  }
-
-  public int[] getCustomerAddresses(String clientId, String customerId, String username,
-      String password) {
-    int[] locationList = null;
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("Access denied for user: " + username);
-      return null;
-    }
-    try {
-      WebServicesAddressData[] data = WebServicesAddressData.selectLocationList(pool, clientId,
-          customerId);
-      locationList = new int[data.length];
-      for (int i = 0; i < data.length; i++) {
-        locationList[i] = Integer.valueOf(data[i].cLocationId).intValue();
-      }
-    } catch (Exception e) {
-      log4j.error(e.getMessage());
-    } finally {
-      destroyPool();
-    }
-    return locationList;
-  }
-
-  public Location getCustomerLocation(String clientId, String customerId, String locationId,
-      String username, String password) {
-    Location customerLocation = null;
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("Access denied for user: " + username);
-      return null;
-    }
-    try {
-      WebServicesAddressData[] data = WebServicesAddressData.select(pool, clientId, customerId,
-          locationId);
-      if (data.length > 0) {
-        customerLocation = new Location();
-        customerLocation.setId(data[0].cLocationId);
-        customerLocation.setClientId(data[0].adClientId);
-        customerLocation.setBusinessPartnerId(data[0].cBpartnerId);
-        customerLocation.setAddress1(data[0].address1);
-        customerLocation.setAddress2(data[0].address2);
-        customerLocation.setCity(data[0].city);
-        customerLocation.setPostal(data[0].postal);
-        customerLocation.setRegion(data[0].region);
-        customerLocation.setCountry(data[0].country);
-      }
-    } catch (Exception e) {
-      log4j.error(e.getMessage());
-    } finally {
-      destroyPool();
-    }
-    return customerLocation;
-  }
-
-  public Boolean updateAddress(Location addr, String username, String password) {
-    int updated = 0;
-    try {
-      updated = WebServicesAddressData.updateAddress(pool, addr.getAddress1(), addr.getAddress2(),
-          addr.getCity(), addr.getPostal(), String.valueOf(addr.getClientId()), String.valueOf(addr
-              .getId()));
-    } catch (Exception e) {
-      log4j.error(e.getMessage());
-    } finally {
-      destroyPool();
-    }
-    return (updated == 0 ? false : true);
-  }
-
-  public Contact getCustomerContact(String clientId, String customerId, String contactId,
-      String username, String password) {
-    Contact customerContact = null;
-    if (!access(username, password)) {
-      if (log4j.isDebugEnabled())
-        log4j.debug("Access denied for user: " + username);
-      return null;
-    }
-    try {
-      WebServicesContactData[] data = WebServicesContactData.select(pool, clientId, customerId,
-          contactId);
-      if (data.length > 0) {
-        customerContact = new Contact();
-        customerContact.setId(data[0].adUserId);
-        customerContact.setClientId(data[0].adClientId);
-        customerContact.setBusinessPartnerId(data[0].cBpartnerId);
-        customerContact.setFirstName(data[0].firstname);
-        customerContact.setLastName(data[0].lastname);
-        customerContact.setPhone(data[0].phone);
-        customerContact.setPhone2(data[0].phone2);
-        customerContact.setEmail(data[0].email);
-        customerContact.setFax(data[0].fax);
-      }
-    } catch (Exception e) {
-      log4j.error(e.getMessage());
-    } finally {
-      destroyPool();
-    }
-    return customerContact;
-  }
-
-  public Boolean updateContact(Contact contact, String username, String password) {
-    int updated = 0;
-    try {
-      updated = WebServicesContactData.updateContact(pool, contact.getFirstName(), contact
-          .getLastName(), contact.getEmail(), contact.getPhone(), contact.getPhone2(), contact
-          .getFax(), String.valueOf(contact.getClientId()), String.valueOf(contact
-          .getBusinessPartnerId()), String.valueOf(contact.getId()));
-    } catch (Exception e) {
-      log4j.error(e.getMessage());
-    } finally {
-      destroyPool();
-    }
-    return (updated == 0 ? false : true);
-  }
-
-  private void initPool() {
-    if (log4j.isDebugEnabled())
-      log4j.debug("init");
-    try {
-      HttpServlet srv = (HttpServlet) MessageContext.getCurrentContext().getProperty(
-          HTTPConstants.MC_HTTP_SERVLET);
-      ServletContext context = srv.getServletContext();
-      pool = ConnectionProviderContextListener.getPool(context);
-    } catch (Exception e) {
-      log4j.error("Error : initPool");
-      log4j.error(e.getStackTrace());
-    }
-  }
-
-  private void destroyPool() {
-    if (log4j.isDebugEnabled())
-      log4j.debug("destroy");
-  }
-}
--- a/src/org/openbravo/erpCommon/ws/services/WebServicesAddress_data.xsql	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-
-<SqlClass name="WebServicesAddressData" package="org.openbravo.erpCommon.ws.services">
-    <SqlMethod name="select" type="preparedStatement" return="multiple">
-    	<SqlMethodComment></SqlMethodComment>
-	    <Sql>
-              <![CDATA[SELECT L.AD_CLIENT_ID, B.C_BPARTNER_ID, L.C_LOCATION_ID, L.ADDRESS1, L.ADDRESS2, L.CITY, L.POSTAL,
-                   R.NAME AS REGION,
-               C.COUNTRYCODE AS COUNTRY
-               FROM C_LOCATION L
-               LEFT JOIN C_BPARTNER_LOCATION B ON L.C_LOCATION_ID = B.C_LOCATION_ID AND L.AD_CLIENT_ID = B.AD_CLIENT_ID
-               LEFT OUTER JOIN C_REGION R ON L.C_REGION_ID = R.C_REGION_ID
-               LEFT JOIN C_COUNTRY C ON L.C_COUNTRY_ID = C.C_COUNTRY_ID
-               WHERE
-               L.AD_CLIENT_ID = ?
-               AND B.C_BPARTNER_ID = ?
-               AND L.C_LOCATION_ID = ?
-              ]]>
-         </Sql>
-    	<Parameter name="clientId"/>
-    	<Parameter name="customerId"/>
-    	<Parameter name="locationId"/>
-    </SqlMethod>
-  	<SqlMethod name="selectLocationList" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-	    <Sql>
-	      <![CDATA[
-	         SELECT C_LOCATION_ID
-	           FROM C_BPARTNER_LOCATION
-	          WHERE AD_CLIENT_ID = ?
-	            AND C_BPARTNER_ID = ?
-	      ]]>
-	    </Sql>
-    	<Parameter name="adClientId"/>
-    	<Parameter name="customerId"/>    		
-  	</SqlMethod>
-  	<SqlMethod name="updateAddress" type="preparedStatement" return="rowCount">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql><![CDATA[
-	        UPDATE C_LOCATION SET
-	               ADDRESS1 = ?, 
-	               ADDRESS2 = ?, 
-	               CITY = ?,
-	               POSTAL = ?
-	         WHERE AD_CLIENT_ID = ?
-	           AND C_LOCATION_ID = ?
-      ]]></Sql>
-      <Parameter name="address1"/>
-      <Parameter name="address2"/>
-      <Parameter name="city"/>
-      <Parameter name="postal"/>
-      <Parameter name="adClientId"/>
-      <Parameter name="cLocationId"/>
-   	</SqlMethod>
-</SqlClass>
\ No newline at end of file
--- a/src/org/openbravo/erpCommon/ws/services/WebServicesContact_data.xsql	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-
-<SqlClass name="WebServicesContactData" package="org.openbravo.erpCommon.ws.services">
-    <SqlMethod name="select" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-	    <Sql>
-	      <![CDATA[
-	        SELECT AD_USER_ID, AD_CLIENT_ID, C_BPARTNER_ID,
-			       FIRSTNAME, LASTNAME, EMAIL, PHONE, PHONE2, FAX
-			  FROM AD_USER 
-			 WHERE AD_CLIENT_ID = ?
-			   AND C_BPARTNER_ID = ?
-			   AND AD_USER_ID = ?	
-	      ]]>
-	    </Sql>
-    	<Parameter name="clientId"/>
-    	<Parameter name="customerId"/>
-    	<Parameter name="contactId"/>
-  	</SqlMethod>
-  	<SqlMethod name="updateContact" type="preparedStatement" return="rowCount">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql><![CDATA[
-	        UPDATE AD_USER SET 
-	               FIRSTNAME = ?,
-	               LASTNAME = ?,
-	               EMAIL = ?,
-	               PHONE = ?,
-	               PHONE2 = ?,
-	               FAX = ?            
-	         WHERE AD_CLIENT_ID = ?
-	           AND C_BPARTNER_ID = ?
-	           AND AD_USER_ID = ?
-      ]]></Sql>      
-      <Parameter name="firstName"/>
-      <Parameter name="lastName"/>
-      <Parameter name="email"/>
-      <Parameter name="phone"/>
-      <Parameter name="phone2"/>
-      <Parameter name="fax"/>
-      <Parameter name="clientId"/>
-      <Parameter name="customerId"/>
-      <Parameter name="contactId"/>
-   </SqlMethod>
-</SqlClass>
\ No newline at end of file
--- a/src/org/openbravo/erpCommon/ws/services/WebServicesCustomer_data.xsql	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-
-<SqlClass name="WebServicesCustomerData" package="org.openbravo.erpCommon.ws.services">
-    <SqlMethod name="select" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-	    <Sql>
-	      <![CDATA[
-	         SELECT BP.C_BPARTNER_ID AS ID, BP.AD_CLIENT_ID AS CLIENT_ID, 
-       				BP.VALUE AS SEARCHKEY, BP.NAME, BP.DESCRIPTION 
-  			   FROM C_BPARTNER BP
- 			  WHERE BP.AD_CLIENT_ID = ?
-   				AND BP.ISACTIVE = 'Y'
-   				AND BP.AD_CLIENT_ID IN (SELECT DISTINCT AR.AD_CLIENT_ID 
-                			              FROM AD_USER_ROLES AR, AD_USER U 
-                            			 WHERE U.NAME = ? 
-                              			   AND AR.AD_USER_ID = U.AD_USER_ID)
-	      ]]>
-	    </Sql>
-    	<Parameter name="adClientId"/>
-    	<Parameter name="adUser"/>
-  	</SqlMethod>
-  	<SqlMethod name="selectCustomerById" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-	    <Sql>
-	      <![CDATA[
-	         SELECT BP.C_BPARTNER_ID AS ID, BP.AD_CLIENT_ID AS CLIENT_ID, 
-	         		BP.VALUE AS SEARCHKEY, BP.NAME
-          	   FROM C_BPARTNER BP
-         	  WHERE BP.AD_CLIENT_ID = ?
-         	    AND BP.C_BPARTNER_ID = ?
-                AND BP.ISCUSTOMER = 'Y'
-                AND BP.AD_CLIENT_ID IN (SELECT DISTINCT AR.AD_CLIENT_ID 
-                			              FROM AD_USER_ROLES AR, AD_USER U 
-                            			 WHERE U.NAME = ? 
-                              			   AND AR.AD_USER_ID = U.AD_USER_ID)
-	      ]]>
-	    </Sql>
-    	<Parameter name="adClientId"/>
-    	<Parameter name="adCustomerId"/>
-    	<Parameter name="adUser"/>
-  	</SqlMethod>
-  	<SqlMethod name="selectCustomer" type="preparedStatement" return="multiple">
-    <SqlMethodComment></SqlMethodComment>
-	    <Sql>
-	      <![CDATA[
-	         SELECT BP.C_BPARTNER_ID AS ID, BP.AD_CLIENT_ID AS CLIENT_ID, 
-	         		BP.VALUE AS SEARCHKEY, BP.NAME
-          	   FROM C_BPARTNER BP
-         	  WHERE BP.AD_CLIENT_ID = ?         	    
-                AND BP.ISCUSTOMER = 'Y'
-                AND BP.AD_CLIENT_ID IN (SELECT DISTINCT AR.AD_CLIENT_ID 
-                			              FROM AD_USER_ROLES AR, AD_USER U 
-                            			 WHERE U.NAME = ? 
-                              			   AND AR.AD_USER_ID = U.AD_USER_ID)
-                AND 1 = 1
-	      ]]>
-	    </Sql>
-    	<Parameter name="adClientId" />
-    	<Parameter name="adUser" />
-    	<Parameter name="name" optional="true" after="AND 1 = 1"><![CDATA[ AND BP.NAME = ?]]></Parameter>
-    	<Parameter name="seachKey" optional="true" after="AND 1 = 1"><![CDATA[ AND BP.VALUE = ?]]></Parameter>	
-  	</SqlMethod>  	
-  	<SqlMethod name="updateCustomer" type="preparedStatement" return="rowCount">
-      <SqlMethodComment></SqlMethodComment>
-      <Sql><![CDATA[
-	        UPDATE C_BPARTNER SET 
- 				   NAME = ?,
- 				   VALUE = ?   
- 			 WHERE AD_CLIENT_ID = ?
-               AND C_BPARTNER_ID = ?
-               AND AD_CLIENT_ID IN (SELECT DISTINCT AR.AD_CLIENT_ID 
-                			          FROM AD_USER_ROLES AR, AD_USER U 
-                            		 WHERE U.NAME = ? 
-                              		   AND AR.AD_USER_ID = U.AD_USER_ID)
-      ]]></Sql>
-      <Parameter name="name"/>
-      <Parameter name="searchKey"/>
-      <Parameter name="clientId"/>
-      <Parameter name="customerId"/>
-      <Parameter name="adUser"/>
-   </SqlMethod>
-</SqlClass>
\ No newline at end of file
--- a/src/org/openbravo/erpCommon/ws/services/WebServices_data.xsql	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-
-
-<SqlClass name="WebServicesData" package="org.openbravo.erpCommon.ws.services">
-    <SqlMethod name="hasAccess" type="preparedStatement" return="String">
-    <SqlMethodComment></SqlMethodComment>
-	    <Sql>
-	      <![CDATA[
-	         SELECT AD_USER_ID AS AUTH
-		       FROM AD_USER  U						      
-			  WHERE U.USERNAME = ? 
-	            AND U.PASSWORD = ?				
-	      ]]>
-	    </Sql>
-    	<Parameter name="username"/>
-    	<Parameter name="password"/>
-  	</SqlMethod>  	
-</SqlClass>
\ No newline at end of file
--- a/src/org/openbravo/services/webservice/BusinessPartner.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,451 +0,0 @@
-/**
- * BusinessPartner.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
- */
-
-package org.openbravo.services.webservice;
-
-public class BusinessPartner  implements java.io.Serializable {
-    private int clientId;
-
-    private java.lang.Boolean complete;
-
-    private org.openbravo.services.webservice.Contact[] contacts;
-
-    private java.lang.Boolean customer;
-
-    private java.lang.String description;
-
-    private int id;
-
-    private org.openbravo.services.webservice.Location[] locations;
-
-    private java.lang.String name;
-
-    private java.lang.String searchKey;
-
-    private java.lang.Boolean vendor;
-
-    public BusinessPartner() {
-    }
-
-    public BusinessPartner(
-           int clientId,
-           java.lang.Boolean complete,
-           org.openbravo.services.webservice.Contact[] contacts,
-           java.lang.Boolean customer,
-           java.lang.String description,
-           int id,
-           org.openbravo.services.webservice.Location[] locations,
-           java.lang.String name,
-           java.lang.String searchKey,
-           java.lang.Boolean vendor) {
-           this.clientId = clientId;
-           this.complete = complete;
-           this.contacts = contacts;
-           this.customer = customer;
-           this.description = description;
-           this.id = id;
-           this.locations = locations;
-           this.name = name;
-           this.searchKey = searchKey;
-           this.vendor = vendor;
-    }
-
-
-    /**
-     * Gets the clientId value for this BusinessPartner.
-     * 
-     * @return clientId
-     */
-    public int getClientId() {
-        return clientId;
-    }
-
-
-    /**
-     * Sets the clientId value for this BusinessPartner.
-     * 
-     * @param clientId
-     */
-    public void setClientId(int clientId) {
-        this.clientId = clientId;
-    }
-
-
-    /**
-     * Gets the complete value for this BusinessPartner.
-     * 
-     * @return complete
-     */
-    public java.lang.Boolean getComplete() {
-        return complete;
-    }
-
-
-    /**
-     * Sets the complete value for this BusinessPartner.
-     * 
-     * @param complete
-     */
-    public void setComplete(java.lang.Boolean complete) {
-        this.complete = complete;
-    }
-
-
-    /**
-     * Gets the contacts value for this BusinessPartner.
-     * 
-     * @return contacts
-     */
-    public org.openbravo.services.webservice.Contact[] getContacts() {
-        return contacts;
-    }
-
-
-    /**
-     * Sets the contacts value for this BusinessPartner.
-     * 
-     * @param contacts
-     */
-    public void setContacts(org.openbravo.services.webservice.Contact[] contacts) {
-        this.contacts = contacts;
-    }
-
-
-    /**
-     * Gets the customer value for this BusinessPartner.
-     * 
-     * @return customer
-     */
-    public java.lang.Boolean getCustomer() {
-        return customer;
-    }
-
-
-    /**
-     * Sets the customer value for this BusinessPartner.
-     * 
-     * @param customer
-     */
-    public void setCustomer(java.lang.Boolean customer) {
-        this.customer = customer;
-    }
-
-
-    /**
-     * Gets the description value for this BusinessPartner.
-     * 
-     * @return description
-     */
-    public java.lang.String getDescription() {
-        return description;
-    }
-
-
-    /**
-     * Sets the description value for this BusinessPartner.
-     * 
-     * @param description
-     */
-    public void setDescription(java.lang.String description) {
-        this.description = description;
-    }
-
-
-    /**
-     * Gets the id value for this BusinessPartner.
-     * 
-     * @return id
-     */
-    public int getId() {
-        return id;
-    }
-
-
-    /**
-     * Sets the id value for this BusinessPartner.
-     * 
-     * @param id
-     */
-    public void setId(int id) {
-        this.id = id;
-    }
-
-
-    /**
-     * Gets the locations value for this BusinessPartner.
-     * 
-     * @return locations
-     */
-    public org.openbravo.services.webservice.Location[] getLocations() {
-        return locations;
-    }
-
-
-    /**
-     * Sets the locations value for this BusinessPartner.
-     * 
-     * @param locations
-     */
-    public void setLocations(org.openbravo.services.webservice.Location[] locations) {
-        this.locations = locations;
-    }
-
-
-    /**
-     * Gets the name value for this BusinessPartner.
-     * 
-     * @return name
-     */
-    public java.lang.String getName() {
-        return name;
-    }
-
-
-    /**
-     * Sets the name value for this BusinessPartner.
-     * 
-     * @param name
-     */
-    public void setName(java.lang.String name) {
-        this.name = name;
-    }
-
-
-    /**
-     * Gets the searchKey value for this BusinessPartner.
-     * 
-     * @return searchKey
-     */
-    public java.lang.String getSearchKey() {
-        return searchKey;
-    }
-
-
-    /**
-     * Sets the searchKey value for this BusinessPartner.
-     * 
-     * @param searchKey
-     */
-    public void setSearchKey(java.lang.String searchKey) {
-        this.searchKey = searchKey;
-    }
-
-
-    /**
-     * Gets the vendor value for this BusinessPartner.
-     * 
-     * @return vendor
-     */
-    public java.lang.Boolean getVendor() {
-        return vendor;
-    }
-
-
-    /**
-     * Sets the vendor value for this BusinessPartner.
-     * 
-     * @param vendor
-     */
-    public void setVendor(java.lang.Boolean vendor) {
-        this.vendor = vendor;
-    }
-
-    private java.lang.Object __equalsCalc = null;
-    public synchronized boolean equals(java.lang.Object obj) {
-        if (!(obj instanceof BusinessPartner)) return false;
-        BusinessPartner other = (BusinessPartner) obj;
-        if (obj == null) return false;
-        if (this == obj) return true;
-        if (__equalsCalc != null) {
-            return (__equalsCalc == obj);
-        }
-        __equalsCalc = obj;
-        boolean _equals;
-        _equals = true && 
-            this.clientId == other.getClientId() &&
-            ((this.complete==null && other.getComplete()==null) || 
-             (this.complete!=null &&
-              this.complete.equals(other.getComplete()))) &&
-            ((this.contacts==null && other.getContacts()==null) || 
-             (this.contacts!=null &&
-              java.util.Arrays.equals(this.contacts, other.getContacts()))) &&
-            ((this.customer==null && other.getCustomer()==null) || 
-             (this.customer!=null &&
-              this.customer.equals(other.getCustomer()))) &&
-            ((this.description==null && other.getDescription()==null) || 
-             (this.description!=null &&
-              this.description.equals(other.getDescription()))) &&
-            this.id == other.getId() &&
-            ((this.locations==null && other.getLocations()==null) || 
-             (this.locations!=null &&
-              java.util.Arrays.equals(this.locations, other.getLocations()))) &&
-            ((this.name==null && other.getName()==null) || 
-             (this.name!=null &&
-              this.name.equals(other.getName()))) &&
-            ((this.searchKey==null && other.getSearchKey()==null) || 
-             (this.searchKey!=null &&
-              this.searchKey.equals(other.getSearchKey()))) &&
-            ((this.vendor==null && other.getVendor()==null) || 
-             (this.vendor!=null &&
-              this.vendor.equals(other.getVendor())));
-        __equalsCalc = null;
-        return _equals;
-    }
-
-    private boolean __hashCodeCalc = false;
-    public synchronized int hashCode() {
-        if (__hashCodeCalc) {
-            return 0;
-        }
-        __hashCodeCalc = true;
-        int _hashCode = 1;
-        _hashCode += getClientId();
-        if (getComplete() != null) {
-            _hashCode += getComplete().hashCode();
-        }
-        if (getContacts() != null) {
-            for (int i=0;
-                 i<java.lang.reflect.Array.getLength(getContacts());
-                 i++) {
-                java.lang.Object obj = java.lang.reflect.Array.get(getContacts(), i);
-                if (obj != null &&
-                    !obj.getClass().isArray()) {
-                    _hashCode += obj.hashCode();
-                }
-            }
-        }
-        if (getCustomer() != null) {
-            _hashCode += getCustomer().hashCode();
-        }
-        if (getDescription() != null) {
-            _hashCode += getDescription().hashCode();
-        }
-        _hashCode += getId();
-        if (getLocations() != null) {
-            for (int i=0;
-                 i<java.lang.reflect.Array.getLength(getLocations());
-                 i++) {
-                java.lang.Object obj = java.lang.reflect.Array.get(getLocations(), i);
-                if (obj != null &&
-                    !obj.getClass().isArray()) {
-                    _hashCode += obj.hashCode();
-                }
-            }
-        }
-        if (getName() != null) {
-            _hashCode += getName().hashCode();
-        }
-        if (getSearchKey() != null) {
-            _hashCode += getSearchKey().hashCode();
-        }
-        if (getVendor() != null) {
-            _hashCode += getVendor().hashCode();
-        }
-        __hashCodeCalc = false;
-        return _hashCode;
-    }
-
-    // Type metadata
-    private static org.apache.axis.description.TypeDesc typeDesc =
-        new org.apache.axis.description.TypeDesc(BusinessPartner.class, true);
-
-    static {
-        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService", "BusinessPartner"));
-        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("clientId");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "clientId"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("complete");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "complete"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("contacts");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "contacts"));
-        elemField.setXmlType(new javax.xml.namespace.QName("/services/WebService", "Contact"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("customer");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "customer"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("description");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "description"));
-        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("id");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "id"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("locations");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "locations"));
-        elemField.setXmlType(new javax.xml.namespace.QName("/services/WebService", "Location"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("name");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "name"));
-        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("searchKey");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "searchKey"));
-        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("vendor");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "vendor"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "boolean"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-    }
-
-    /**
-     * Return type metadata object
-     */
-    public static org.apache.axis.description.TypeDesc getTypeDesc() {
-        return typeDesc;
-    }
-
-    /**
-     * Get Custom Serializer
-     */
-    public static org.apache.axis.encoding.Serializer getSerializer(
-           java.lang.String mechType, 
-           java.lang.Class _javaType,  
-           javax.xml.namespace.QName _xmlType) {
-        return 
-          new  org.apache.axis.encoding.ser.BeanSerializer(
-            _javaType, _xmlType, typeDesc);
-    }
-
-    /**
-     * Get Custom Deserializer
-     */
-    public static org.apache.axis.encoding.Deserializer getDeserializer(
-           java.lang.String mechType, 
-           java.lang.Class _javaType,  
-           javax.xml.namespace.QName _xmlType) {
-        return 
-          new  org.apache.axis.encoding.ser.BeanDeserializer(
-            _javaType, _xmlType, typeDesc);
-    }
-
-}
--- a/src/org/openbravo/services/webservice/Contact.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,395 +0,0 @@
-/**
- * Contact.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
- */
-
-package org.openbravo.services.webservice;
-
-public class Contact  implements java.io.Serializable {
-    private int businessPartnerId;
-
-    private int clientId;
-
-    private java.lang.String email;
-
-    private java.lang.String fax;
-
-    private java.lang.String firstName;
-
-    private int id;
-
-    private java.lang.String lastName;
-
-    private java.lang.String phone;
-
-    private java.lang.String phone2;
-
-    public Contact() {
-    }
-
-    public Contact(
-           int businessPartnerId,
-           int clientId,
-           java.lang.String email,
-           java.lang.String fax,
-           java.lang.String firstName,
-           int id,
-           java.lang.String lastName,
-           java.lang.String phone,
-           java.lang.String phone2) {
-           this.businessPartnerId = businessPartnerId;
-           this.clientId = clientId;
-           this.email = email;
-           this.fax = fax;
-           this.firstName = firstName;
-           this.id = id;
-           this.lastName = lastName;
-           this.phone = phone;
-           this.phone2 = phone2;
-    }
-
-
-    /**
-     * Gets the businessPartnerId value for this Contact.
-     * 
-     * @return businessPartnerId
-     */
-    public int getBusinessPartnerId() {
-        return businessPartnerId;
-    }
-
-
-    /**
-     * Sets the businessPartnerId value for this Contact.
-     * 
-     * @param businessPartnerId
-     */
-    public void setBusinessPartnerId(int businessPartnerId) {
-        this.businessPartnerId = businessPartnerId;
-    }
-
-
-    /**
-     * Gets the clientId value for this Contact.
-     * 
-     * @return clientId
-     */
-    public int getClientId() {
-        return clientId;
-    }
-
-
-    /**
-     * Sets the clientId value for this Contact.
-     * 
-     * @param clientId
-     */
-    public void setClientId(int clientId) {
-        this.clientId = clientId;
-    }
-
-
-    /**
-     * Gets the email value for this Contact.
-     * 
-     * @return email
-     */
-    public java.lang.String getEmail() {
-        return email;
-    }
-
-
-    /**
-     * Sets the email value for this Contact.
-     * 
-     * @param email
-     */
-    public void setEmail(java.lang.String email) {
-        this.email = email;
-    }
-
-
-    /**
-     * Gets the fax value for this Contact.
-     * 
-     * @return fax
-     */
-    public java.lang.String getFax() {
-        return fax;
-    }
-
-
-    /**
-     * Sets the fax value for this Contact.
-     * 
-     * @param fax
-     */
-    public void setFax(java.lang.String fax) {
-        this.fax = fax;
-    }
-
-
-    /**
-     * Gets the firstName value for this Contact.
-     * 
-     * @return firstName
-     */
-    public java.lang.String getFirstName() {
-        return firstName;
-    }
-
-
-    /**
-     * Sets the firstName value for this Contact.
-     * 
-     * @param firstName
-     */
-    public void setFirstName(java.lang.String firstName) {
-        this.firstName = firstName;
-    }
-
-
-    /**
-     * Gets the id value for this Contact.
-     * 
-     * @return id
-     */
-    public int getId() {
-        return id;
-    }
-
-
-    /**
-     * Sets the id value for this Contact.
-     * 
-     * @param id
-     */
-    public void setId(int id) {
-        this.id = id;
-    }
-
-
-    /**
-     * Gets the lastName value for this Contact.
-     * 
-     * @return lastName
-     */
-    public java.lang.String getLastName() {
-        return lastName;
-    }
-
-
-    /**
-     * Sets the lastName value for this Contact.
-     * 
-     * @param lastName
-     */
-    public void setLastName(java.lang.String lastName) {
-        this.lastName = lastName;
-    }
-
-
-    /**
-     * Gets the phone value for this Contact.
-     * 
-     * @return phone
-     */
-    public java.lang.String getPhone() {
-        return phone;
-    }
-
-
-    /**
-     * Sets the phone value for this Contact.
-     * 
-     * @param phone
-     */
-    public void setPhone(java.lang.String phone) {
-        this.phone = phone;
-    }
-
-
-    /**
-     * Gets the phone2 value for this Contact.
-     * 
-     * @return phone2
-     */
-    public java.lang.String getPhone2() {
-        return phone2;
-    }
-
-
-    /**
-     * Sets the phone2 value for this Contact.
-     * 
-     * @param phone2
-     */
-    public void setPhone2(java.lang.String phone2) {
-        this.phone2 = phone2;
-    }
-
-    private java.lang.Object __equalsCalc = null;
-    public synchronized boolean equals(java.lang.Object obj) {
-        if (!(obj instanceof Contact)) return false;
-        Contact other = (Contact) obj;
-        if (obj == null) return false;
-        if (this == obj) return true;
-        if (__equalsCalc != null) {
-            return (__equalsCalc == obj);
-        }
-        __equalsCalc = obj;
-        boolean _equals;
-        _equals = true && 
-            this.businessPartnerId == other.getBusinessPartnerId() &&
-            this.clientId == other.getClientId() &&
-            ((this.email==null && other.getEmail()==null) || 
-             (this.email!=null &&
-              this.email.equals(other.getEmail()))) &&
-            ((this.fax==null && other.getFax()==null) || 
-             (this.fax!=null &&
-              this.fax.equals(other.getFax()))) &&
-            ((this.firstName==null && other.getFirstName()==null) || 
-             (this.firstName!=null &&
-              this.firstName.equals(other.getFirstName()))) &&
-            this.id == other.getId() &&
-            ((this.lastName==null && other.getLastName()==null) || 
-             (this.lastName!=null &&
-              this.lastName.equals(other.getLastName()))) &&
-            ((this.phone==null && other.getPhone()==null) || 
-             (this.phone!=null &&
-              this.phone.equals(other.getPhone()))) &&
-            ((this.phone2==null && other.getPhone2()==null) || 
-             (this.phone2!=null &&
-              this.phone2.equals(other.getPhone2())));
-        __equalsCalc = null;
-        return _equals;
-    }
-
-    private boolean __hashCodeCalc = false;
-    public synchronized int hashCode() {
-        if (__hashCodeCalc) {
-            return 0;
-        }
-        __hashCodeCalc = true;
-        int _hashCode = 1;
-        _hashCode += getBusinessPartnerId();
-        _hashCode += getClientId();
-        if (getEmail() != null) {
-            _hashCode += getEmail().hashCode();
-        }
-        if (getFax() != null) {
-            _hashCode += getFax().hashCode();
-        }
-        if (getFirstName() != null) {
-            _hashCode += getFirstName().hashCode();
-        }
-        _hashCode += getId();
-        if (getLastName() != null) {
-            _hashCode += getLastName().hashCode();
-        }
-        if (getPhone() != null) {
-            _hashCode += getPhone().hashCode();
-        }
-        if (getPhone2() != null) {
-            _hashCode += getPhone2().hashCode();
-        }
-        __hashCodeCalc = false;
-        return _hashCode;
-    }
-
-    // Type metadata
-    private static org.apache.axis.description.TypeDesc typeDesc =
-        new org.apache.axis.description.TypeDesc(Contact.class, true);
-
-    static {
-        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService", "Contact"));
-        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("businessPartnerId");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "businessPartnerId"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("clientId");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "clientId"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("email");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "email"));
-        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("fax");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "fax"));
-        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("firstName");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "firstName"));
-        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("id");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "id"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("lastName");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "lastName"));
-        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("phone");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "phone"));
-        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("phone2");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "phone2"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-    }
-
-    /**
-     * Return type metadata object
-     */
-    public static org.apache.axis.description.TypeDesc getTypeDesc() {
-        return typeDesc;
-    }
-
-    /**
-     * Get Custom Serializer
-     */
-    public static org.apache.axis.encoding.Serializer getSerializer(
-           java.lang.String mechType, 
-           java.lang.Class _javaType,  
-           javax.xml.namespace.QName _xmlType) {
-        return 
-          new  org.apache.axis.encoding.ser.BeanSerializer(
-            _javaType, _xmlType, typeDesc);
-    }
-
-    /**
-     * Get Custom Deserializer
-     */
-    public static org.apache.axis.encoding.Deserializer getDeserializer(
-           java.lang.String mechType, 
-           java.lang.Class _javaType,  
-           javax.xml.namespace.QName _xmlType) {
-        return 
-          new  org.apache.axis.encoding.ser.BeanDeserializer(
-            _javaType, _xmlType, typeDesc);
-    }
-
-}
--- a/src/org/openbravo/services/webservice/Customer.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,104 +0,0 @@
-/**
- * Customer.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
- */
-
-package org.openbravo.services.webservice;
-
-public class Customer  extends org.openbravo.services.webservice.BusinessPartner  implements java.io.Serializable {
-    public Customer() {
-    }
-
-    public Customer(
-           int clientId,
-           java.lang.Boolean complete,
-           org.openbravo.services.webservice.Contact[] contacts,
-           java.lang.Boolean customer,
-           java.lang.String description,
-           int id,
-           org.openbravo.services.webservice.Location[] locations,
-           java.lang.String name,
-           java.lang.String searchKey,
-           java.lang.Boolean vendor) {
-        super(
-            clientId,
-            complete,
-            contacts,
-            customer,
-            description,
-            id,
-            locations,
-            name,
-            searchKey,
-            vendor);
-    }
-
-    private java.lang.Object __equalsCalc = null;
-    public synchronized boolean equals(java.lang.Object obj) {
-        if (!(obj instanceof Customer)) return false;
-        Customer other = (Customer) obj;
-        if (obj == null) return false;
-        if (this == obj) return true;
-        if (__equalsCalc != null) {
-            return (__equalsCalc == obj);
-        }
-        __equalsCalc = obj;
-        boolean _equals;
-        _equals = super.equals(obj);
-        __equalsCalc = null;
-        return _equals;
-    }
-
-    private boolean __hashCodeCalc = false;
-    public synchronized int hashCode() {
-        if (__hashCodeCalc) {
-            return 0;
-        }
-        __hashCodeCalc = true;
-        int _hashCode = super.hashCode();
-        __hashCodeCalc = false;
-        return _hashCode;
-    }
-
-    // Type metadata
-    private static org.apache.axis.description.TypeDesc typeDesc =
-        new org.apache.axis.description.TypeDesc(Customer.class, true);
-
-    static {
-        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService", "Customer"));
-    }
-
-    /**
-     * Return type metadata object
-     */
-    public static org.apache.axis.description.TypeDesc getTypeDesc() {
-        return typeDesc;
-    }
-
-    /**
-     * Get Custom Serializer
-     */
-    public static org.apache.axis.encoding.Serializer getSerializer(
-           java.lang.String mechType, 
-           java.lang.Class _javaType,  
-           javax.xml.namespace.QName _xmlType) {
-        return 
-          new  org.apache.axis.encoding.ser.BeanSerializer(
-            _javaType, _xmlType, typeDesc);
-    }
-
-    /**
-     * Get Custom Deserializer
-     */
-    public static org.apache.axis.encoding.Deserializer getDeserializer(
-           java.lang.String mechType, 
-           java.lang.Class _javaType,  
-           javax.xml.namespace.QName _xmlType) {
-        return 
-          new  org.apache.axis.encoding.ser.BeanDeserializer(
-            _javaType, _xmlType, typeDesc);
-    }
-
-}
--- a/src/org/openbravo/services/webservice/Location.java	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,395 +0,0 @@
-/**
- * Location.java
- *
- * This file was auto-generated from WSDL
- * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
- */
-
-package org.openbravo.services.webservice;
-
-public class Location  implements java.io.Serializable {
-    private java.lang.String address1;
-
-    private java.lang.String address2;
-
-    private int businessPartnerId;
-
-    private java.lang.String city;
-
-    private int clientId;
-
-    private java.lang.String country;
-
-    private int id;
-
-    private java.lang.String postal;
-
-    private java.lang.String region;
-
-    public Location() {
-    }
-
-    public Location(
-           java.lang.String address1,
-           java.lang.String address2,
-           int businessPartnerId,
-           java.lang.String city,
-           int clientId,
-           java.lang.String country,
-           int id,
-           java.lang.String postal,
-           java.lang.String region) {
-           this.address1 = address1;
-           this.address2 = address2;
-           this.businessPartnerId = businessPartnerId;
-           this.city = city;
-           this.clientId = clientId;
-           this.country = country;
-           this.id = id;
-           this.postal = postal;
-           this.region = region;
-    }
-
-
-    /**
-     * Gets the address1 value for this Location.
-     * 
-     * @return address1
-     */
-    public java.lang.String getAddress1() {
-        return address1;
-    }
-
-
-    /**
-     * Sets the address1 value for this Location.
-     * 
-     * @param address1
-     */
-    public void setAddress1(java.lang.String address1) {
-        this.address1 = address1;
-    }
-
-
-    /**
-     * Gets the address2 value for this Location.
-     * 
-     * @return address2
-     */
-    public java.lang.String getAddress2() {
-        return address2;
-    }
-
-
-    /**
-     * Sets the address2 value for this Location.
-     * 
-     * @param address2
-     */
-    public void setAddress2(java.lang.String address2) {
-        this.address2 = address2;
-    }
-
-
-    /**
-     * Gets the businessPartnerId value for this Location.
-     * 
-     * @return businessPartnerId
-     */
-    public int getBusinessPartnerId() {
-        return businessPartnerId;
-    }
-
-
-    /**
-     * Sets the businessPartnerId value for this Location.
-     * 
-     * @param businessPartnerId
-     */
-    public void setBusinessPartnerId(int businessPartnerId) {
-        this.businessPartnerId = businessPartnerId;
-    }
-
-
-    /**
-     * Gets the city value for this Location.
-     * 
-     * @return city
-     */
-    public java.lang.String getCity() {
-        return city;
-    }
-
-
-    /**
-     * Sets the city value for this Location.
-     * 
-     * @param city
-     */
-    public void setCity(java.lang.String city) {
-        this.city = city;
-    }
-
-
-    /**
-     * Gets the clientId value for this Location.
-     * 
-     * @return clientId
-     */
-    public int getClientId() {
-        return clientId;
-    }
-
-
-    /**
-     * Sets the clientId value for this Location.
-     * 
-     * @param clientId
-     */
-    public void setClientId(int clientId) {
-        this.clientId = clientId;
-    }
-
-
-    /**
-     * Gets the country value for this Location.
-     * 
-     * @return country
-     */
-    public java.lang.String getCountry() {
-        return country;
-    }
-
-
-    /**
-     * Sets the country value for this Location.
-     * 
-     * @param country
-     */
-    public void setCountry(java.lang.String country) {
-        this.country = country;
-    }
-
-
-    /**
-     * Gets the id value for this Location.
-     * 
-     * @return id
-     */
-    public int getId() {
-        return id;
-    }
-
-
-    /**
-     * Sets the id value for this Location.
-     * 
-     * @param id
-     */
-    public void setId(int id) {
-        this.id = id;
-    }
-
-
-    /**
-     * Gets the postal value for this Location.
-     * 
-     * @return postal
-     */
-    public java.lang.String getPostal() {
-        return postal;
-    }
-
-
-    /**
-     * Sets the postal value for this Location.
-     * 
-     * @param postal
-     */
-    public void setPostal(java.lang.String postal) {
-        this.postal = postal;
-    }
-
-
-    /**
-     * Gets the region value for this Location.
-     * 
-     * @return region
-     */
-    public java.lang.String getRegion() {
-        return region;
-    }
-
-
-    /**
-     * Sets the region value for this Location.
-     * 
-     * @param region
-     */
-    public void setRegion(java.lang.String region) {
-        this.region = region;
-    }
-
-    private java.lang.Object __equalsCalc = null;
-    public synchronized boolean equals(java.lang.Object obj) {
-        if (!(obj instanceof Location)) return false;
-        Location other = (Location) obj;
-        if (obj == null) return false;
-        if (this == obj) return true;
-        if (__equalsCalc != null) {
-            return (__equalsCalc == obj);
-        }
-        __equalsCalc = obj;
-        boolean _equals;
-        _equals = true && 
-            ((this.address1==null && other.getAddress1()==null) || 
-             (this.address1!=null &&
-              this.address1.equals(other.getAddress1()))) &&
-            ((this.address2==null && other.getAddress2()==null) || 
-             (this.address2!=null &&
-              this.address2.equals(other.getAddress2()))) &&
-            this.businessPartnerId == other.getBusinessPartnerId() &&
-            ((this.city==null && other.getCity()==null) || 
-             (this.city!=null &&
-              this.city.equals(other.getCity()))) &&
-            this.clientId == other.getClientId() &&
-            ((this.country==null && other.getCountry()==null) || 
-             (this.country!=null &&
-              this.country.equals(other.getCountry()))) &&
-            this.id == other.getId() &&
-            ((this.postal==null && other.getPostal()==null) || 
-             (this.postal!=null &&
-              this.postal.equals(other.getPostal()))) &&
-            ((this.region==null && other.getRegion()==null) || 
-             (this.region!=null &&
-              this.region.equals(other.getRegion())));
-        __equalsCalc = null;
-        return _equals;
-    }
-
-    private boolean __hashCodeCalc = false;
-    public synchronized int hashCode() {
-        if (__hashCodeCalc) {
-            return 0;
-        }
-        __hashCodeCalc = true;
-        int _hashCode = 1;
-        if (getAddress1() != null) {
-            _hashCode += getAddress1().hashCode();
-        }
-        if (getAddress2() != null) {
-            _hashCode += getAddress2().hashCode();
-        }
-        _hashCode += getBusinessPartnerId();
-        if (getCity() != null) {
-            _hashCode += getCity().hashCode();
-        }
-        _hashCode += getClientId();
-        if (getCountry() != null) {
-            _hashCode += getCountry().hashCode();
-        }
-        _hashCode += getId();
-        if (getPostal() != null) {
-            _hashCode += getPostal().hashCode();
-        }
-        if (getRegion() != null) {
-            _hashCode += getRegion().hashCode();
-        }
-        __hashCodeCalc = false;
-        return _hashCode;
-    }
-
-    // Type metadata
-    private static org.apache.axis.description.TypeDesc typeDesc =
-        new org.apache.axis.description.TypeDesc(Location.class, true);
-
-    static {
-        typeDesc.setXmlType(new javax.xml.namespace.QName("/services/WebService", "Location"));
-        org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("address1");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "address1"));
-        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("address2");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "address2"));
-        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("businessPartnerId");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "businessPartnerId"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("city");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "city"));
-        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("clientId");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "clientId"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("country");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "country"));
-        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("id");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "id"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
-        elemField.setNillable(false);
-        typeDesc.addFieldDesc(elemField);
-        elemField = new org.apache.axis.description.ElementDesc();
-        elemField.setFieldName("postal");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "postal"));
-        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("region");
-        elemField.setXmlName(new javax.xml.namespace.QName("", "region"));
-        elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
-        elemField.setNillable(true);
-        typeDesc.addFieldDesc(elemField);
-    }
-
-    /**
-     * Return type metadata object
-     */
-    public static org.apache.axis.description.TypeDesc getTypeDesc() {
-        return typeDesc;
-    }
-
-    /**
-     * Get Custom Serializer
-     */
-    public static org.apache.axis.encoding.Serializer getSerializer(
-           java.lang.String mechType, 
-           java.lang.Class _javaType,  
-           javax.xml.namespace.QName _xmlType) {
-        return 
-          new  org.apache.axis.encoding.ser.BeanSerializer(
-            _javaType, _xmlType, typeDesc);
-    }
-
-    /**
-     * Get Custom Deserializer
-     */
-    public static org.apache.axis.encoding.Deserializer getDeserializer(
-           java.lang.String mechType, 
-           java.lang.Class _javaType,  
-           javax.xml.namespace.QName _xmlType) {
-        return 
-          new  org.apache.axis.encoding.ser.BeanDeserializer(
-            _javaType, _xmlType, typeDesc);
-    }
-
-}
--- a/src/undeploy.wsdd	Tue May 10 15:35:00 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<undeployment xmlns="http://xml.apache.org/axis/wsdd/">
-<!--
- *************************************************************************
- * The contents of this file are subject to the Openbravo  Public  License
- * Version  1.1  (the  "License"),  being   the  Mozilla   Public  License
- * Version 1.1  with a permitted attribution clause; you may not  use this
- * file except in compliance with the License. You  may  obtain  a copy of
- * the License at http://www.openbravo.com/legal/license.html 
- * Software distributed under the License  is  distributed  on  an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
- * License for the specific  language  governing  rights  and  limitations
- * under the License. 
- * The Original Code is Openbravo ERP. 
- * The Initial Developer of the Original Code is Openbravo SLU 
- * All portions are Copyright (C) 2001-2008 Openbravo SLU 
- * All Rights Reserved. 
- * Contributor(s):  ______________________________________.
- ************************************************************************
--->
-  <service name="ExternalSales"/>
-  <service name="WebService"/>
-</undeployment>