Merge 36d93103f747

This commit is contained in:
Heng Sin Low 2012-12-17 22:39:03 +08:00
commit 6e2438c6e0
26 changed files with 78 additions and 225 deletions

View File

@ -251,6 +251,16 @@ INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Clien
ALTER TABLE WS_WebServiceTypeAccess ADD WS_WebServiceTypeAccess_UU NVARCHAR2(36) DEFAULT NULL ALTER TABLE WS_WebServiceTypeAccess ADD WS_WebServiceTypeAccess_UU NVARCHAR2(36) DEFAULT NULL
; ;
-- Dec 17, 2012 12:03:20 PM IST
-- IDEMPIERE-460 Adding support for composite service
INSERT INTO AD_Column (IsEncrypted,Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsAlwaysUpdateable) VALUES ('N',0,53163,205535,'D','N','N','N','N',36,'N',10,'N',1000001,'4a981564-a0d8-494e-b5a2-ae60bbb54404','Y','WS_WebServiceMethod_UU','WS_WebServiceMethod_UU',100,TO_DATE('2012-12-17 12:03:18','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-12-17 12:03:18','YYYY-MM-DD HH24:MI:SS'),100,0,'N')
;
-- Dec 17, 2012 12:03:20 PM IST
-- IDEMPIERE-460 Adding support for composite service
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=205535 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;

View File

@ -251,6 +251,15 @@ INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Clien
ALTER TABLE WS_WebServiceTypeAccess ADD COLUMN WS_WebServiceTypeAccess_UU VARCHAR(36) DEFAULT NULL ALTER TABLE WS_WebServiceTypeAccess ADD COLUMN WS_WebServiceTypeAccess_UU VARCHAR(36) DEFAULT NULL
; ;
-- Dec 17, 2012 12:03:20 PM IST
-- IDEMPIERE-460 Adding support for composite service
INSERT INTO AD_Column (IsEncrypted,Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,AD_Element_ID,AD_Column_UU,IsUpdateable,ColumnName,Name,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,IsAlwaysUpdateable) VALUES ('N',0,53163,205535,'D','N','N','N','N',36,'N',10,'N',1000001,'4a981564-a0d8-494e-b5a2-ae60bbb54404','Y','WS_WebServiceMethod_UU','WS_WebServiceMethod_UU',100,TO_TIMESTAMP('2012-12-17 12:03:18','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-12-17 12:03:18','YYYY-MM-DD HH24:MI:SS'),100,0,'N')
;
-- Dec 17, 2012 12:03:20 PM IST
-- IDEMPIERE-460 Adding support for composite service
INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=205535 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
;

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/Idempiere-XMLSBean-1.0.jar"/> <classpathentry exported="true" kind="lib" path="WEB-INF/lib/idempiere-xmlbeans-1.0.jar"/>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-osgi-extender-1.2.1.jar"/> <classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-osgi-extender-1.2.1.jar"/>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-aop-3.0.7.RELEASE.jar"/> <classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-aop-3.0.7.RELEASE.jar"/>
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/commons-logging-1.1.1.jar"/> <classpathentry exported="true" kind="lib" path="WEB-INF/lib/commons-logging-1.1.1.jar"/>
@ -20,7 +20,6 @@
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-web-3.0.7.RELEASE.jar"/> <classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-web-3.0.7.RELEASE.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="WEB-INF/src"/> <classpathentry kind="src" path="WEB-INF/src"/>
<classpathentry kind="output" path="WEB-INF/classes/"/> <classpathentry kind="output" path="WEB-INF/classes/"/>
</classpath> </classpath>

View File

@ -31,11 +31,11 @@ Bundle-ClassPath: .,
WEB-INF/lib/xmlbeans-2.5.0.jar, WEB-INF/lib/xmlbeans-2.5.0.jar,
WEB-INF/lib/aopalliance-1.0.jar, WEB-INF/lib/aopalliance-1.0.jar,
WEB-INF/lib/commons-logging-1.1.1.jar, WEB-INF/lib/commons-logging-1.1.1.jar,
WEB-INF/lib/Idempiere-XMLSBean-1.0.jar WEB-INF/lib/idempiere-xmlbeans-1.0.jar
Export-Package: com._3e.ADInterface, Export-Package: org.compiere.model,
org.compiere.model,
org.idempiere.adInterface.x10, org.idempiere.adInterface.x10,
org.idempiere.adInterface.x10.impl, org.idempiere.adInterface.x10.impl,
org.idempiere.adinterface,
org.idempiere.webservices, org.idempiere.webservices,
org.idempiere.webservices.fault org.idempiere.webservices.fault
Web-ContextPath: ADInterface Web-ContextPath: ADInterface

View File

@ -6,7 +6,7 @@
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"--> http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"-->
<jaxws:endpoint id="ModelADService" address="/ModelADService" implementor="com._3e.ADInterface.ModelADServiceImpl"> <jaxws:endpoint id="ModelADService" address="/ModelADService" implementor="org.idempiere.adinterface.ModelADServiceImpl">
<jaxws:dataBinding> <jaxws:dataBinding>
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" /> <bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" />
</jaxws:dataBinding> </jaxws:dataBinding>
@ -20,4 +20,4 @@
</jaxws:endpoint> </jaxws:endpoint>
</beans> </beans>
<!-- END SNIPPET: services -->

View File

@ -6,12 +6,12 @@ import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style; import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use; import javax.jws.soap.SOAPBinding.Use;
import org.idempiere.adInterface.x10.CompositeModelRequestDocument; import org.idempiere.adInterface.x10.CompositeRequestDocument;
import org.idempiere.adInterface.x10.CompositeResponsesDocument; import org.idempiere.adInterface.x10.CompositeResponsesDocument;
@WebService(targetNamespace="http://idempiere.org/ADInterface/1_0") @WebService(targetNamespace="http://idempiere.org/ADInterface/1_0")
@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED) @SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED)
public interface CompositeService { public interface CompositeService {
public CompositeResponsesDocument compositeCRUD(CompositeModelRequestDocument reqs); public CompositeResponsesDocument compositeOperation(CompositeRequestDocument reqs);
} }

View File

@ -21,8 +21,8 @@ import javax.jws.WebService;
import org.compiere.util.CLogger; import org.compiere.util.CLogger;
import org.compiere.util.Trx; import org.compiere.util.Trx;
import org.idempiere.adInterface.x10.ADLoginRequest; import org.idempiere.adInterface.x10.ADLoginRequest;
import org.idempiere.adInterface.x10.CompositeModelRequest; import org.idempiere.adInterface.x10.CompositeRequest;
import org.idempiere.adInterface.x10.CompositeModelRequestDocument; import org.idempiere.adInterface.x10.CompositeRequestDocument;
import org.idempiere.adInterface.x10.CompositeResponse; import org.idempiere.adInterface.x10.CompositeResponse;
import org.idempiere.adInterface.x10.CompositeResponses; import org.idempiere.adInterface.x10.CompositeResponses;
import org.idempiere.adInterface.x10.CompositeResponsesDocument; import org.idempiere.adInterface.x10.CompositeResponsesDocument;
@ -41,10 +41,10 @@ import org.idempiere.adInterface.x10.RunProcessResponseDocument;
import org.idempiere.adInterface.x10.StandardResponse; import org.idempiere.adInterface.x10.StandardResponse;
import org.idempiere.adInterface.x10.StandardResponseDocument; import org.idempiere.adInterface.x10.StandardResponseDocument;
import org.idempiere.adInterface.x10.WindowTabDataDocument; import org.idempiere.adInterface.x10.WindowTabDataDocument;
import org.idempiere.adinterface.CompiereService;
import org.idempiere.adinterface.ModelADServiceImpl;
import org.idempiere.webservices.AbstractService; import org.idempiere.webservices.AbstractService;
import com._3e.ADInterface.CompiereService;
import com._3e.ADInterface.ModelADServiceImpl;
/** /**
* Composite service interface for combining request and transaction management * Composite service interface for combining request and transaction management
@ -52,11 +52,11 @@ import com._3e.ADInterface.ModelADServiceImpl;
* @author Deepak Pansheriya * @author Deepak Pansheriya
* *
*/ */
@WebService(endpointInterface = "com.bizidium.ws.CompositeService", serviceName = "compositeInterface") @WebService(endpointInterface = "com.bizidium.ws.CompositeService", serviceName = "compositeInterface" ,targetNamespace="http://idempiere.org/ADInterface/1_0")
public class CompositeServiceImpl extends AbstractService implements CompositeService { public class CompositeServiceImpl extends AbstractService implements CompositeService {
private static CLogger log = CLogger.getCLogger(CompositeServiceImpl.class); private static CLogger log = CLogger.getCLogger(CompositeServiceImpl.class);
private static String webServiceName = new String("biziInterface"); private static String webServiceName = new String("CompositeInterface");
public CompositeServiceImpl() { public CompositeServiceImpl() {
@ -64,14 +64,14 @@ public class CompositeServiceImpl extends AbstractService implements CompositeSe
} }
public CompositeResponsesDocument compositeCRUD(CompositeModelRequestDocument reqs) { public CompositeResponsesDocument compositeOperation(CompositeRequestDocument reqs) {
CompiereService m_cs = getCompiereService(); CompiereService m_cs = getCompiereService();
CompositeResponsesDocument ret = CompositeResponsesDocument.Factory.newInstance(); CompositeResponsesDocument ret = CompositeResponsesDocument.Factory.newInstance();
CompositeResponses resps = ret.addNewCompositeResponses(); CompositeResponses resps = ret.addNewCompositeResponses();
CompositeModelRequest req = reqs.getCompositeModelRequest(); CompositeRequest req = reqs.getCompositeRequest();
String serviceType = req.getServiceType(); String serviceType = req.getServiceType();
ADLoginRequest reqlogin = req.getADLoginRequest(); ADLoginRequest reqlogin = req.getADLoginRequest();

View File

@ -1,4 +1,4 @@
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.util.Properties; import java.util.Properties;

View File

@ -1,4 +1,4 @@
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.SQLException; import java.sql.SQLException;

View File

@ -1,4 +1,4 @@
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -77,7 +77,7 @@ public class ADLookup {
return whereClause; return whereClause;
} }
private DataSet getResult( com._3e.ADInterface.ADInfo info, DataSet ds, int count, String mode ) { private DataSet getResult( org.idempiere.adinterface.ADInfo info, DataSet ds, int count, String mode ) {
if ("count".equals(mode) && count > 1) { if ("count".equals(mode) && count > 1) {
DataRow dr = ds.addNewDataRow(); DataRow dr = ds.addNewDataRow();
DataField df = dr.addNewField(); DataField df = dr.addNewField();

View File

@ -1,4 +1,4 @@
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;

View File

@ -1,4 +1,4 @@
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.util.Properties; import java.util.Properties;

View File

@ -1,4 +1,4 @@
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.SQLException; import java.sql.SQLException;

View File

@ -1,4 +1,4 @@
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;

View File

@ -11,7 +11,7 @@
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved. * All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
* Contributor(s): ______________________________________. * Contributor(s): ______________________________________.
*****************************************************************************/ *****************************************************************************/
package com._3e.ADInterface; package org.idempiere.adinterface;
/** /**
* Info Column Details * Info Column Details

View File

@ -27,7 +27,7 @@
* - GlobalQSS (http://www.globalqss.com) * * - GlobalQSS (http://www.globalqss.com) *
***********************************************************************/ ***********************************************************************/
package com._3e.ADInterface; package org.idempiere.adinterface;
import javax.jws.WebService; import javax.jws.WebService;
@ -44,7 +44,7 @@ import org.idempiere.adInterface.x10.RunProcessResponseDocument;
import org.idempiere.adInterface.x10.StandardResponseDocument; import org.idempiere.adInterface.x10.StandardResponseDocument;
import org.idempiere.adInterface.x10.WindowTabDataDocument; import org.idempiere.adInterface.x10.WindowTabDataDocument;
@WebService(targetNamespace="http://3e.pl/ADInterface") @WebService(targetNamespace="http://idempiere.org/ADInterface/1_0")
@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED) @SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED)
public interface ModelADService { public interface ModelADService {

View File

@ -27,7 +27,7 @@
* - GlobalQSS (http://www.globalqss.com) * * - GlobalQSS (http://www.globalqss.com) *
***********************************************************************/ ***********************************************************************/
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.sql.PreparedStatement; import java.sql.PreparedStatement;
import java.sql.ResultSet; import java.sql.ResultSet;
@ -110,7 +110,7 @@ import org.idempiere.webservices.fault.IdempiereServiceFault;
* @author kolec * @author kolec
* *
*/ */
@WebService(endpointInterface="com._3e.ADInterface.ModelADService", serviceName="ModelADService",targetNamespace="http://3e.pl/ADInterface") @WebService(endpointInterface="org.idempiere.adinterface.ModelADService", serviceName="ModelADService",targetNamespace="http://idempiere.org/ADInterface/1_0")
public class ModelADServiceImpl extends AbstractService implements ModelADService { public class ModelADServiceImpl extends AbstractService implements ModelADService {
private static CLogger log = CLogger.getCLogger(ModelADServiceImpl.class); private static CLogger log = CLogger.getCLogger(ModelADServiceImpl.class);
@ -241,7 +241,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
requestCtx.put("DocAction", docAction); requestCtx.put("DocAction", docAction);
// Fire Event // Fire Event
StandardResponseDocument retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIME_BEFORE_PARSE, po, null, trx, requestCtx, StandardResponseDocument retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIMING_BEFORE_PARSE, po, null, trx, requestCtx,
resp, ret); resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;
@ -256,7 +256,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
} }
// Fire Event // Fire Event
retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIME_BEFORE_SAVE, po, null, trx, requestCtx, resp, ret); retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIMING_BEFORE_SAVE, po, null, trx, requestCtx, resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;
@ -266,7 +266,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
"Cannot save after set docAction: " + CLogger.retrieveErrorString("no log message")); "Cannot save after set docAction: " + CLogger.retrieveErrorString("no log message"));
// Fire Event // Fire Event
retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIME_AFTER_SAVE, po, null, trx, requestCtx, resp, ret); retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIMING_AFTER_SAVE, po, null, trx, requestCtx, resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;
@ -713,7 +713,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
Map<String,Object> requestCtx = getRequestCtx(); Map<String,Object> requestCtx = getRequestCtx();
DataField[] fields = dr.getFieldArray(); DataField[] fields = dr.getFieldArray();
StandardResponseDocument retResp =invokeWSValidator(m_webservicetype, IWSValidator.TIME_BEFORE_PARSE, po, fields,trx,requestCtx, resp, ret); StandardResponseDocument retResp =invokeWSValidator(m_webservicetype, IWSValidator.TIMING_BEFORE_PARSE, po, fields,trx,requestCtx, resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;
@ -721,19 +721,19 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
if(retResp!=null) if(retResp!=null)
return retResp; return retResp;
retResp =invokeWSValidator(m_webservicetype, IWSValidator.TIME_AFTER_PARSE, po, fields,trx,requestCtx, resp, ret); retResp =invokeWSValidator(m_webservicetype, IWSValidator.TIMING_AFTER_PARSE, po, fields,trx,requestCtx, resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;
retResp =invokeWSValidator(m_webservicetype, IWSValidator.TIME_BEFORE_SAVE, po, fields,trx,requestCtx, resp, ret); retResp =invokeWSValidator(m_webservicetype, IWSValidator.TIMING_BEFORE_SAVE, po, fields,trx,requestCtx, resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;
if (!po.save()) if (!po.save())
return rollbackAndSetError(trx, resp, ret, true, "Cannot save record in " + tableName + ": " + CLogger.retrieveErrorString("no log message")); return rollbackAndSetError(trx, resp, ret, true, "Cannot save record in " + tableName + ": " + CLogger.retrieveErrorString("no log message"));
retResp =invokeWSValidator(m_webservicetype, IWSValidator.TIME_AFTER_SAVE, po, fields,trx,requestCtx, resp, ret); retResp =invokeWSValidator(m_webservicetype, IWSValidator.TIMING_AFTER_SAVE, po, fields,trx,requestCtx, resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;
@ -808,7 +808,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
MWebServiceType m_webservicetype = getWebServiceType(); MWebServiceType m_webservicetype = getWebServiceType();
Map<String, Object> requestCtx = getRequestCtx(); Map<String, Object> requestCtx = getRequestCtx();
StandardResponseDocument retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIME_BEFORE_PARSE, holderPo, fields, trx, StandardResponseDocument retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIMING_BEFORE_PARSE, holderPo, fields, trx,
requestCtx, resp, ret); requestCtx, resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;
@ -817,7 +817,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
if (retResp != null) if (retResp != null)
return retResp; return retResp;
retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIME_AFTER_PARSE, holderPo, fields, trx, requestCtx, resp, ret); retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIMING_AFTER_PARSE, holderPo, fields, trx, requestCtx, resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;
@ -917,7 +917,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
} }
} }
retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIME_BEFORE_SAVE, holderPo, fields, trx, requestCtx, resp, ret); retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIMING_BEFORE_SAVE, holderPo, fields, trx, requestCtx, resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;
@ -925,7 +925,7 @@ public class ModelADServiceImpl extends AbstractService implements ModelADServic
return rollbackAndSetError(trx, resp, ret, true, return rollbackAndSetError(trx, resp, ret, true,
"Cannot save record in " + tableName + ": " + CLogger.retrieveErrorString("no log message")); "Cannot save record in " + tableName + ": " + CLogger.retrieveErrorString("no log message"));
retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIME_AFTER_SAVE, holderPo, fields, trx, requestCtx, resp, ret); retResp = invokeWSValidator(m_webservicetype, IWSValidator.TIMING_AFTER_SAVE, holderPo, fields, trx, requestCtx, resp, ret);
if (retResp != null) if (retResp != null)
return retResp; return retResp;

View File

@ -1,4 +1,4 @@
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.CharArrayWriter; import java.io.CharArrayWriter;

View File

@ -1,4 +1,4 @@
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.io.BufferedWriter; import java.io.BufferedWriter;
import java.io.File; import java.io.File;

View File

@ -1,4 +1,4 @@
package com._3e.ADInterface; package org.idempiere.adinterface;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;

View File

@ -53,8 +53,8 @@ import org.idempiere.adInterface.x10.OutputField;
import org.idempiere.adInterface.x10.OutputFields; import org.idempiere.adInterface.x10.OutputFields;
import org.idempiere.adInterface.x10.StandardResponse; import org.idempiere.adInterface.x10.StandardResponse;
import org.idempiere.adInterface.x10.StandardResponseDocument; import org.idempiere.adInterface.x10.StandardResponseDocument;
import org.idempiere.adinterface.CompiereService;
import com._3e.ADInterface.CompiereService;
/** /**
@ -84,7 +84,7 @@ public class AbstractService {
&& m_cs.getM_AD_Warehouse_ID() == loginRequest.getWarehouseID() && loginRequest.getUser().equals(m_cs.getUser())) && m_cs.getM_AD_Warehouse_ID() == loginRequest.getWarehouseID() && loginRequest.getUser().equals(m_cs.getUser()))
return authenticate(webService, method, serviceType, m_cs); // already logged with same data return authenticate(webService, method, serviceType, m_cs); // already logged with same data
String ret =invokeLoginValidator(loginRequest, m_cs.getM_ctx(), null, IWSValidator.TIME_BEFORE_LOGIN); String ret =invokeLoginValidator(loginRequest, m_cs.getM_ctx(), null, IWSValidator.TIMING_BEFORE_LOGIN);
if(ret!=null && ret.length()>0) if(ret!=null && ret.length()>0)
return ret; return ret;
@ -158,7 +158,7 @@ public class AbstractService {
return "Error logging in - no roles or user/pwd invalid for user " + loginRequest.getUser(); return "Error logging in - no roles or user/pwd invalid for user " + loginRequest.getUser();
} }
ret =invokeLoginValidator(loginRequest, m_cs.getM_ctx(), null, IWSValidator.TIME_AFTER_LOGIN); ret =invokeLoginValidator(loginRequest, m_cs.getM_ctx(), null, IWSValidator.TIMING_AFTER_LOGIN);
if(ret!=null && ret.length()>0) if(ret!=null && ret.length()>0)
return ret; return ret;
@ -213,7 +213,7 @@ public class AbstractService {
req.setAttribute("MWebServiceType", m_webservicetype); req.setAttribute("MWebServiceType", m_webservicetype);
String ret=invokeLoginValidator(null, m_cs.getM_ctx(), m_webservicetype, IWSValidator.TIME_ON_AUTHENTICATION); String ret=invokeLoginValidator(null, m_cs.getM_ctx(), m_webservicetype, IWSValidator.TIMING_ON_AUTHORIZATION);
if(ret!=null && ret.length()>0) if(ret!=null && ret.length()>0)
return ret; return ret;

View File

@ -11,17 +11,17 @@ import org.idempiere.adInterface.x10.ADLoginRequest;
import org.idempiere.adInterface.x10.DataField; import org.idempiere.adInterface.x10.DataField;
public interface IWSValidator { public interface IWSValidator {
public static final int TIME_BEFORE_PARSE=1; public static final int TIMING_BEFORE_PARSE=1;
public static final int TIME_AFTER_PARSE=2; public static final int TIMING_AFTER_PARSE=2;
public static final int TIME_BEFORE_SAVE=3; public static final int TIMING_BEFORE_SAVE=3;
public static final int TIME_AFTER_SAVE=4; public static final int TIMING_AFTER_SAVE=4;
public static final int TIME_BEFORE_LOGIN=5; public static final int TIMING_BEFORE_LOGIN=5;
public static final int TIME_AFTER_LOGIN=6; public static final int TIMING_AFTER_LOGIN=6;
public static final int TIME_ON_AUTHENTICATION=7; public static final int TIMING_ON_AUTHORIZATION=7;
public static final int TIME_BEFORE_PROCESS=8; public static final int TIMING_BEFORE_PROCESS=8;
public static final int TIME_AFTER_PROCESS=9; public static final int TIMING_AFTER_PROCESS=9;
public void validate(PO po,MWebServiceType m_webserviceType,DataField[] fields,int time,String trxName,Map<String, Object> requestCtx) throws IdempiereServiceFault; public void validate(PO po,MWebServiceType m_webserviceType,DataField[] fields,int time,String trxName,Map<String, Object> requestCtx) throws IdempiereServiceFault;
public void login(ADLoginRequest loginRequest,Properties ctx,MWebServiceType m_webserviceType,int time) throws IdempiereServiceFault; public void login(ADLoginRequest loginRequest,Properties ctx,MWebServiceType m_webserviceType,int time) throws IdempiereServiceFault;

View File

@ -1,28 +0,0 @@
package org.idempiere.webservices;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class WebServiceActivator implements BundleActivator{
private static BundleContext bundleContext = null;
/* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
@Override
public void start(BundleContext context) throws Exception {
bundleContext = context;
}
/* (non-Javadoc)
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
@Override
public void stop(BundleContext context) throws Exception {
bundleContext = null;
}
public static BundleContext getBundleContext() {
return bundleContext;
}
}

View File

@ -4,143 +4,6 @@
xmlns:tns="http://idempiere.org/ADInterface/1_0" xmlns:tns="http://idempiere.org/ADInterface/1_0"
elementFormDefault="qualified"> elementFormDefault="qualified">
<xsd:element name="Window" type="tns:Window"/>
<xsd:complexType name="Window">
<xsd:sequence>
<xsd:element name="Description" type="xsd:string"/>
<xsd:element name="Help" type="xsd:string"/>
<xsd:element name="Tabs" type="tns:TabList" />
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string"/>
<xsd:attribute name="IsSoTrx" type="xsd:boolean"/>
<xsd:attribute name="WindowNo" type="xsd:int"/>
<xsd:attribute name="AD_Table_ID" type="xsd:int"/>
<xsd:attribute name="AD_Window_ID" type="xsd:int"/>
<xsd:attribute name="WindowType" type="xsd:int"/>
<xsd:attribute name="AD_Image_ID" type="xsd:int"/>
<xsd:attribute name="AD_Color_ID" type="xsd:int"/>
<xsd:attribute name="IsReadWrite" type="xsd:boolean"/>
<xsd:attribute name="WinWidth" type="xsd:int"/>
<xsd:attribute name="WinHeight" type="xsd:int"/>
<xsd:attribute name="IsError" type="xsd:boolean"/>
<xsd:attribute name="Error" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="Tab">
<xsd:sequence>
<xsd:element name="Description" type="xsd:string"/>
<xsd:element name="Help" type="xsd:string"/>
<xsd:element name="ReadOnlyLogic" type="xsd:string"/>
<xsd:element name="DisplayLogic" type="xsd:string"/>
<xsd:element name="Fields" type="tns:FieldList"/>
<xsd:element name="CommitWarning" type="xsd:string"/>
<xsd:element name="WhereClause" type="xsd:string"/>
<xsd:element name="OrderByClause" type="xsd:string"/>
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string"/>
<xsd:attribute name="IsSoTrx" type="xsd:boolean"/>
<xsd:attribute name="TabNo" type="xsd:int"/>
<xsd:attribute name="WindowNo" type="xsd:int"/>
<xsd:attribute name="AD_Table_ID" type="xsd:int"/>
<xsd:attribute name="AD_Window_ID" type="xsd:int"/>
<xsd:attribute name="AD_Tab_ID" type="xsd:int"/>
<xsd:attribute name="IsSingleRow" type="xsd:boolean"/>
<xsd:attribute name="IsReadOnly" type="xsd:boolean"/>
<xsd:attribute name="IsInsertRecord" type="xsd:boolean"/>
<xsd:attribute name="HasTree" type="xsd:boolean"/>
<xsd:attribute name="IsView" type="xsd:boolean"/>
<xsd:attribute name="AD_Column_ID" type="xsd:int"/>
<xsd:attribute name="TableName" type="xsd:string"/>
<xsd:attribute name="AccessLevel" type="xsd:string"/>
<xsd:attribute name="IsSecurityEnabled" type="xsd:boolean"/>
<xsd:attribute name="IsDeleteable" type="xsd:boolean"/>
<xsd:attribute name="IsHighVolume" type="xsd:boolean"/>
<xsd:attribute name="AD_Process_ID" type="xsd:int"/>
<xsd:attribute name="TabLevel" type="xsd:int"/>
<xsd:attribute name="AD_Image_ID" type="xsd:int"/>
<xsd:attribute name="Included_Tab_ID" type="xsd:int"/>
<xsd:attribute name="ReplicationType" type="xsd:string"/>
<xsd:attribute name="IsSortTab" type="xsd:boolean"/>
<xsd:attribute name="AD_ColumnSortOrder_ID" type="xsd:int"/>
<xsd:attribute name="AD_ColumnSortYesNo_ID" type="xsd:int"/>
<xsd:attribute name="onlyCurrentRows" type="xsd:boolean"/>
<xsd:attribute name="onlyCurrentDays" type="xsd:int"/>
</xsd:complexType>
<xsd:complexType name="TabList">
<xsd:sequence>
<xsd:element name="Tab" type="tns:Tab" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="FieldList">
<xsd:sequence>
<xsd:element name="Field" type="tns:Field" minOccurs="1" maxOccurs="unbounded" />
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="Field">
<xsd:sequence>
<xsd:element name="Tab" type="tns:Tab"/>
<xsd:element name="lookupInfo" type="tns:LookupInfo"/>
<xsd:element name="Description" type="xsd:string"/>
<xsd:element name="Help" type="xsd:string"/>
<xsd:element name="ColumnSQL" type="xsd:string"/>
<xsd:element name="DisplayLogic" type="xsd:string"/>
<xsd:element name="ReadOnlyLogic" type="xsd:string"/>
<xsd:element name="lookup" type="tns:LookupValues" minOccurs="0" maxOccurs="1"/>
</xsd:sequence>
<xsd:attribute name="Name" type="xsd:string"/>
<xsd:attribute name="WindowNo" type="xsd:int"/>
<xsd:attribute name="TabNo" type="xsd:int"/>
<xsd:attribute name="AD_Window_ID" type="xsd:int"/>
<xsd:attribute name="tabReadOnly" type="xsd:boolean"/>
<xsd:attribute name="isProcess" type="xsd:boolean"/>
<xsd:attribute name="ColumnName" type="xsd:string"/>
<xsd:attribute name="Header" type="xsd:string"/>
<xsd:attribute name="displayType" type="xsd:int"/>
<xsd:attribute name="AD_Column_ID" type="xsd:int"/>
<xsd:attribute name="DisplayLength" type="xsd:int"/>
<xsd:attribute name="IsSameLine" type="xsd:boolean"/>
<xsd:attribute name="IsDisplayed" type="xsd:boolean"/>
<xsd:attribute name="DefaultValue" type="xsd:string"/>
<xsd:attribute name="IsMandatory" type="xsd:boolean"/>
<xsd:attribute name="IsReadOnly" type="xsd:boolean"/>
<xsd:attribute name="IsUpdateable" type="xsd:boolean"/>
<xsd:attribute name="IsAlwaysUpdateable" type="xsd:boolean"/>
<xsd:attribute name="IsHeading" type="xsd:boolean"/>
<xsd:attribute name="IsFieldOnly" type="xsd:boolean"/>
<xsd:attribute name="IsEncryptedField" type="xsd:boolean"/>
<xsd:attribute name="IsEncryptedColumn" type="xsd:boolean"/>
<xsd:attribute name="IsSelectionColumn" type="xsd:boolean"/>
<xsd:attribute name="SortNo" type="xsd:int"/>
<xsd:attribute name="FieldLength" type="xsd:int"/>
<xsd:attribute name="VFormat" type="xsd:string"/>
<xsd:attribute name="ValueMin" type="xsd:string"/>
<xsd:attribute name="ValueMax" type="xsd:string"/>
<xsd:attribute name="FieldGroup" type="xsd:string"/>
<xsd:attribute name="IsKey" type="xsd:boolean"/>
<xsd:attribute name="IsParent" type="xsd:boolean"/>
<xsd:attribute name="Callout" type="xsd:string"/>
<xsd:attribute name="AD_Process_ID" type="xsd:int"/>
<xsd:attribute name="ObscureType" type="xsd:string"/>
<xsd:attribute name="ValidationCode" type="xsd:string"/>
<xsd:attribute name="AD_Reference_Value_ID" type="xsd:int"/>
<xsd:attribute name="isRange" type="xsd:boolean"/>
<xsd:attribute name="DefaultValue2" type="xsd:string"/>
</xsd:complexType>
<xsd:complexType name="LookupInfo">
<xsd:sequence>
<!-- <xsd:element name="Tab" type="tns:Tab"/>
<xsd:element name="lookupInfo" type="tns:LookupInfo"/>-->
<xsd:element name="ZoomWindow" type="xsd:int"/>
<xsd:element name="ZoomWindowPO" type="xsd:int"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="WindowTabData" type="tns:WindowTabData"/> <xsd:element name="WindowTabData" type="tns:WindowTabData"/>
<xsd:complexType name="WindowTabData"> <xsd:complexType name="WindowTabData">
@ -530,8 +393,8 @@
<xsd:attribute name="preCommit" type="xsd:boolean" default="false"></xsd:attribute> <xsd:attribute name="preCommit" type="xsd:boolean" default="false"></xsd:attribute>
<xsd:attribute name="postCommit" type="xsd:boolean" default="false"></xsd:attribute> <xsd:attribute name="postCommit" type="xsd:boolean" default="false"></xsd:attribute>
</xsd:complexType> </xsd:complexType>
<xsd:element name="CompositeModelRequest" type="tns:CompositeModelRequest"></xsd:element> <xsd:element name="CompositeRequest" type="tns:CompositeRequest"></xsd:element>
<xsd:complexType name="CompositeModelRequest"> <xsd:complexType name="CompositeRequest">
<xsd:sequence> <xsd:sequence>
<xsd:element name="ADLoginRequest" type="tns:ADLoginRequest"></xsd:element> <xsd:element name="ADLoginRequest" type="tns:ADLoginRequest"></xsd:element>
<xsd:element name="serviceType" type="xsd:string"/> <xsd:element name="serviceType" type="xsd:string"/>

View File

@ -23,7 +23,7 @@ bin.includes = META-INF/,\
WEB-INF/lib/commons-logging-1.1.1.jar,\ WEB-INF/lib/commons-logging-1.1.1.jar,\
WEB-INF/lib/spring-aop-3.0.7.RELEASE.jar,\ WEB-INF/lib/spring-aop-3.0.7.RELEASE.jar,\
WEB-INF/lib/spring-osgi-extender-1.2.1.jar,\ WEB-INF/lib/spring-osgi-extender-1.2.1.jar,\
WEB-INF/lib/Idempiere-XMLSBean-1.0.jar WEB-INF/lib/idempiere-xmlbeans-1.0.jar
src.includes = WEB-INF/classes/,\ src.includes = WEB-INF/classes/,\
WEB-INF/lib/,\ WEB-INF/lib/,\
WEB-INF/web.xml,\ WEB-INF/web.xml,\