IDEMPIERE-460 - Integratind and migrating 3e service to idempiere
This commit is contained in:
parent
4f3708c49c
commit
1e57d9ff53
|
@ -0,0 +1,24 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<classpath>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/composite_XMLSBean.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/xmlbeans-2.5.0.jar" sourcepath="E:/spring/xmlbeans-2.5.0-source.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/generated_xbeans.jar" sourcepath="XBeans/src"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/cxf-rt-frontend-jaxws-2.6.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/stax2-api-3.1.1.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/xmlschema-core-2.0.3.jar" sourcepath="E:/spring/xmlschema-core-2.0.3-sources.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/cxf-2.6.2.jar" sourcepath="E:/bizzidium/apache-cxf-2.6.2-src.zip"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/neethi-3.0.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/wsdl4j-1.6.2.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-expression-3.0.7.RELEASE.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-asm-3.0.7.RELEASE.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-core-3.0.7.RELEASE.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-beans-3.0.7.RELEASE.jar" sourcepath="E:/spring/spring-beans-3.0.7.RELEASE-sources.jar"/>
|
||||||
|
<classpathentry exported="true" kind="lib" path="WEB-INF/lib/spring-context-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.pde.core.requiredPlugins"/>
|
||||||
|
<classpathentry kind="src" path="src"/>
|
||||||
|
<classpathentry kind="src" path="WEB-INF/src"/>
|
||||||
|
<classpathentry kind="output" path="WEB-INF/classes/"/>
|
||||||
|
</classpath>
|
|
@ -0,0 +1,28 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>org.idempiere.webservices</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.pde.PluginNature</nature>
|
||||||
|
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
|
@ -0,0 +1,7 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||||
|
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||||
|
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||||
|
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,3 @@
|
||||||
|
eclipse.preferences.version=1
|
||||||
|
pluginProject.extensions=false
|
||||||
|
resolve.requirebundle=false
|
|
@ -0,0 +1,39 @@
|
||||||
|
Manifest-Version: 1.0
|
||||||
|
Bundle-ManifestVersion: 2
|
||||||
|
Bundle-Name: Webservices
|
||||||
|
Bundle-SymbolicName: org.idempiere.webservices;singleton:=true
|
||||||
|
Bundle-Version: 1.0.0.qualifier
|
||||||
|
Bundle-Activator: org.idempiere.webservices.Activator
|
||||||
|
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
||||||
|
Import-Package: javax.servlet;version="3.0.0",
|
||||||
|
javax.servlet.http;version="3.0.0",
|
||||||
|
org.apache.commons.codec;version="1.3.0",
|
||||||
|
org.apache.commons.codec.binary;version="1.3.0",
|
||||||
|
org.apache.commons.logging;version="1.1.1",
|
||||||
|
org.osgi.framework;version="1.3.0"
|
||||||
|
Require-Bundle: org.adempiere.base;bundle-version="1.0.0",
|
||||||
|
org.adempiere.report.jasper.library;bundle-version="1.0.0",
|
||||||
|
org.adempiere.ui;bundle-version="1.0.0",
|
||||||
|
org.apache.ecs;bundle-version="1.0.0"
|
||||||
|
Bundle-ClassPath: WEB-INF/lib/stax2-api-3.1.1.jar,
|
||||||
|
WEB-INF/lib/spring-web-3.0.7.RELEASE.jar,
|
||||||
|
.,
|
||||||
|
WEB-INF/lib/spring-context-3.0.7.RELEASE.jar,
|
||||||
|
WEB-INF/lib/spring-beans-3.0.7.RELEASE.jar,
|
||||||
|
WEB-INF/lib/spring-core-3.0.7.RELEASE.jar,
|
||||||
|
WEB-INF/lib/spring-asm-3.0.7.RELEASE.jar,
|
||||||
|
WEB-INF/lib/spring-expression-3.0.7.RELEASE.jar,
|
||||||
|
WEB-INF/lib/wsdl4j-1.6.2.jar,
|
||||||
|
WEB-INF/lib/cxf-2.6.2.jar,
|
||||||
|
WEB-INF/lib/neethi-3.0.2.jar,
|
||||||
|
WEB-INF/lib/xmlschema-core-2.0.3.jar,
|
||||||
|
WEB-INF/lib/spring-aop-3.0.7.RELEASE.jar,
|
||||||
|
WEB-INF/lib/cxf-rt-frontend-jaxws-2.6.1.jar,
|
||||||
|
WEB-INF/lib/generated_xbeans.jar,
|
||||||
|
WEB-INF/lib/xmlbeans-2.5.0.jar,
|
||||||
|
WEB-INF/lib/composite_XMLSBean.jar
|
||||||
|
Export-Package: com._3e.ADInterface,
|
||||||
|
com.adaxa.ws,
|
||||||
|
com.adaxa.ws.impl,
|
||||||
|
com.globalqss.ObPOSInterface
|
||||||
|
Web-ContextPath: ADInterface
|
|
@ -0,0 +1,31 @@
|
||||||
|
How to add a new WebService in 3E_WebServices
|
||||||
|
|
||||||
|
i.e.
|
||||||
|
we're going to add a webservice to complete documents
|
||||||
|
the new webservice will have the following parameters:
|
||||||
|
* ADLoginRequest - it's already defined in ADInterface/src/xsd/schema.xsd with the following parameters:
|
||||||
|
user, pass, lang, ClientID, RoleID, OrgID, WarehouseID, stage
|
||||||
|
* TableName String -> M_InOut
|
||||||
|
* Record_ID int -> 1000002
|
||||||
|
* DocStatus String -> CO
|
||||||
|
|
||||||
|
Note, if you need to define new datatypes you need to define them in ADInterface/src/xsd/schema.xsd
|
||||||
|
and generate the pl3xe.jar again with this command:
|
||||||
|
scomp -out ./lib/pl3xE.jar ADInterface/src/xsd/schema.xsd
|
||||||
|
scomp will generate the corresponding classes to manipulate the xml objects from the messages
|
||||||
|
|
||||||
|
|
||||||
|
The method will be called modelSetDocAction - the model in name indicates that the web service is going to be based on model classes, current web services are based in UI instead of model.
|
||||||
|
|
||||||
|
So, we add this line:
|
||||||
|
public StandardResponseDocument modelSetDocAction(String tableName, int recordID, String newDocStatus, ADLoginRequestDocument reqlogin) throws XFireFault;
|
||||||
|
at the interface 3E_WebServices/ADInterface/src/main/com/_3e/ADInterface/ADService.java
|
||||||
|
NOTE: In parameters, complex data must be at the end
|
||||||
|
|
||||||
|
Now, we need to implement the method, so we open the file
|
||||||
|
3E_WebServices/ADInterface/src/main/com/_3e/ADInterface/ADServiceImpl.java
|
||||||
|
|
||||||
|
And add the new method and define the corresponding logic within.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,93 @@
|
||||||
|
-- Example about how to call modelSetDocAction from oracle pl/sql function
|
||||||
|
-- Following sample from http://technology.amis.nl/blog/358/consuming-web-services-from-plsql-part-ii-a-pure-plsql-solution-using-utl_http-oracle-9i-or-10g
|
||||||
|
|
||||||
|
CREATE OR REPLACE FUNCTION ws_modelsetdocaction (
|
||||||
|
p_table IN ad_table.tablename%TYPE,
|
||||||
|
p_recordid IN m_inout.m_inout_id%TYPE,
|
||||||
|
p_newdocstatus IN m_inout.docstatus%TYPE,
|
||||||
|
p_user IN ad_user.NAME%TYPE,
|
||||||
|
p_password IN ad_user.PASSWORD%TYPE,
|
||||||
|
p_language IN ad_language.ad_language%TYPE,
|
||||||
|
p_client_id IN ad_client.ad_client_id%TYPE,
|
||||||
|
p_role_id IN ad_role.ad_role_id%TYPE,
|
||||||
|
p_org_id IN ad_org.ad_org_id%TYPE,
|
||||||
|
p_warehouse_id IN m_warehouse.m_warehouse_id%TYPE
|
||||||
|
)
|
||||||
|
RETURN VARCHAR2
|
||||||
|
AS
|
||||||
|
server VARCHAR2 (100) := '127.0.0.1:8081';
|
||||||
|
soap_request VARCHAR2 (30000);
|
||||||
|
soap_respond VARCHAR2 (30000);
|
||||||
|
http_req UTL_HTTP.req;
|
||||||
|
http_resp UTL_HTTP.resp;
|
||||||
|
resp XMLTYPE;
|
||||||
|
BEGIN
|
||||||
|
soap_request :=
|
||||||
|
'<?xml version="1.0"?>
|
||||||
|
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<SOAP-ENV:Body>
|
||||||
|
<modelSetDocAction xmlns="http://3e.pl/ADInterface">
|
||||||
|
<in0>' || p_table || '</in0>
|
||||||
|
<in1>' || p_recordid || '</in1>
|
||||||
|
<in2>' || p_newdocstatus || '</in2>
|
||||||
|
<ADLoginRequest>
|
||||||
|
<user>' || p_user || '</user>
|
||||||
|
<pass>' || p_password || '</pass>
|
||||||
|
<lang>' || p_language || '</lang>
|
||||||
|
<ClientID>' || p_client_id || '</ClientID>
|
||||||
|
<RoleID>' || p_role_id || '</RoleID>
|
||||||
|
<OrgID>' || p_org_id || '</OrgID>
|
||||||
|
<WarehouseID>' || p_warehouse_id || '</WarehouseID>
|
||||||
|
<stage/>
|
||||||
|
</ADLoginRequest>
|
||||||
|
</modelSetDocAction>
|
||||||
|
</SOAP-ENV:Body>
|
||||||
|
</SOAP-ENV:Envelope>';
|
||||||
|
UTL_HTTP.set_transfer_timeout (5);
|
||||||
|
http_req :=
|
||||||
|
UTL_HTTP.begin_request ( 'http://' || server || '/ADInterface/services/ADService',
|
||||||
|
'POST',
|
||||||
|
'HTTP/1.1'
|
||||||
|
);
|
||||||
|
UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml');
|
||||||
|
UTL_HTTP.set_header (http_req, 'Content-Length', LENGTH (soap_request));
|
||||||
|
UTL_HTTP.write_text (http_req, soap_request);
|
||||||
|
http_resp := UTL_HTTP.get_response (http_req);
|
||||||
|
UTL_HTTP.read_text (http_resp, soap_respond);
|
||||||
|
UTL_HTTP.end_response (http_resp);
|
||||||
|
RETURN soap_respond;
|
||||||
|
/*
|
||||||
|
-- Create an XMLType variable containing the Response XML
|
||||||
|
resp := XMLTYPE.createxml (soap_respond);
|
||||||
|
-- extract from the XMLType Resp the child-nodes of the <soap:Body> element
|
||||||
|
resp :=
|
||||||
|
resp.EXTRACT ('/soap:Envelope/soap:Body/child::node()',
|
||||||
|
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'
|
||||||
|
);
|
||||||
|
-- extract from the XMLType Resp the text() nodes from the n:getRateResponse/Result element
|
||||||
|
resp :=
|
||||||
|
resp.EXTRACT ('n:getRateResponse/Result/text()',
|
||||||
|
'xmlns:n="urn:xmethods-CurrencyExchange"'
|
||||||
|
);
|
||||||
|
RETURN resp.getclobval ();
|
||||||
|
*/
|
||||||
|
END;
|
||||||
|
/
|
||||||
|
|
||||||
|
|
||||||
|
-- Now you can make a call to the function with this example:
|
||||||
|
-- example to COmplete M_InOut with M_Inout_ID=1000002
|
||||||
|
/*
|
||||||
|
select ws_modelsetdocaction (
|
||||||
|
'M_InOut',
|
||||||
|
1000002,
|
||||||
|
'CO',
|
||||||
|
'SuperUser',
|
||||||
|
'System',
|
||||||
|
'es_CO',
|
||||||
|
11,
|
||||||
|
102,
|
||||||
|
11,
|
||||||
|
103)
|
||||||
|
from dual;
|
||||||
|
*/
|
|
@ -0,0 +1,42 @@
|
||||||
|
== structure of exchanged data records:
|
||||||
|
<DataSet>
|
||||||
|
<DataRow>
|
||||||
|
<field type="" column="" lval="" disp="" edit="" error="" errorVal="" >
|
||||||
|
<val></val>
|
||||||
|
<lookup>
|
||||||
|
<lv val="" key=""></lv>
|
||||||
|
|
||||||
|
...
|
||||||
|
<lv></lv>
|
||||||
|
</lookup>
|
||||||
|
</field>
|
||||||
|
...
|
||||||
|
<field></field>
|
||||||
|
</DataRow>
|
||||||
|
|
||||||
|
...
|
||||||
|
<DataRow></DataRow>
|
||||||
|
</DataSet>
|
||||||
|
|
||||||
|
== Example. Still not finished!
|
||||||
|
open questions:
|
||||||
|
Where does it specify Table name?
|
||||||
|
|
||||||
|
<DataSet>
|
||||||
|
<DataRow>
|
||||||
|
<field type="int" column="AD_Client_ID" lval="" disp="" edit="" error="" errorVal="" >
|
||||||
|
<val>100000</val>
|
||||||
|
<lookup>
|
||||||
|
<lv val="" key="Name" />
|
||||||
|
</lookup>
|
||||||
|
</field>
|
||||||
|
<field type="int" column="AD_Org_ID" lval="" disp="" edit="" error="" errorVal="" >
|
||||||
|
<val>100000</val>
|
||||||
|
<lookup>
|
||||||
|
<lv val="" key="Name" />
|
||||||
|
<lv val="AD_Client_ID" key="Name" />
|
||||||
|
</lookup>
|
||||||
|
</field>
|
||||||
|
|
||||||
|
</DataRow>
|
||||||
|
</DataSet>
|
|
@ -0,0 +1,2 @@
|
||||||
|
<Context antiJARLocking="true">
|
||||||
|
</Context>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
|
||||||
|
<!--beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<jaxws:endpoint id="ADService" address="/ADService" implementor="com._3e.ADInterface.ADServiceImpl">
|
||||||
|
<jaxws:dataBinding>
|
||||||
|
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" />
|
||||||
|
</jaxws:dataBinding>
|
||||||
|
</jaxws:endpoint>
|
||||||
|
|
||||||
|
<jaxws:endpoint id="ModelADService" address="/ModelADService" implementor="com._3e.ADInterface.ModelADServiceImpl">
|
||||||
|
<jaxws:dataBinding>
|
||||||
|
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" />
|
||||||
|
</jaxws:dataBinding>
|
||||||
|
</jaxws:endpoint>
|
||||||
|
|
||||||
|
<jaxws:endpoint id="WebstoreService" address="/WebstoreService" implementor="com.adaxa.ws.WebstoreServiceImpl">
|
||||||
|
<jaxws:dataBinding>
|
||||||
|
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" />
|
||||||
|
</jaxws:dataBinding>
|
||||||
|
</jaxws:endpoint>
|
||||||
|
|
||||||
|
</beans>
|
||||||
|
<!-- END SNIPPET: services -->
|
|
@ -0,0 +1,2 @@
|
||||||
|
<Context antiJARLocking="true">
|
||||||
|
</Context>
|
|
@ -0,0 +1,29 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd">
|
||||||
|
<!--beans xmlns="http://www.springframework.org/schema/beans"
|
||||||
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||||
|
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"-->
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<jaxws:endpoint id="ADService" address="/ADService" implementor="com._3e.ADInterface.ADServiceImpl">
|
||||||
|
<jaxws:dataBinding>
|
||||||
|
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" />
|
||||||
|
</jaxws:dataBinding>
|
||||||
|
</jaxws:endpoint>
|
||||||
|
|
||||||
|
<jaxws:endpoint id="ModelADService" address="/ModelADService" implementor="com._3e.ADInterface.ModelADServiceImpl">
|
||||||
|
<jaxws:dataBinding>
|
||||||
|
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" />
|
||||||
|
</jaxws:dataBinding>
|
||||||
|
</jaxws:endpoint>
|
||||||
|
|
||||||
|
<jaxws:endpoint id="WebstoreService" address="/WebstoreService" implementor="com.adaxa.ws.WebstoreServiceImpl">
|
||||||
|
<jaxws:dataBinding>
|
||||||
|
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" />
|
||||||
|
</jaxws:dataBinding>
|
||||||
|
</jaxws:endpoint>
|
||||||
|
|
||||||
|
</beans>
|
||||||
|
<!-- END SNIPPET: services -->
|
|
@ -0,0 +1,87 @@
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.model.DataStatusEvent;
|
||||||
|
import org.compiere.model.DataStatusListener;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
|
|
||||||
|
public class ADDataStatusListener implements DataStatusListener {
|
||||||
|
|
||||||
|
protected static CLogger log = CLogger.getCLogger( ADDataStatusListener.class);
|
||||||
|
public String m_status_data;
|
||||||
|
public boolean m_is_status_error;
|
||||||
|
public String m_error_message;
|
||||||
|
public String m_error_info;
|
||||||
|
public boolean m_is_error;
|
||||||
|
private Properties m_ctx;
|
||||||
|
|
||||||
|
public ADDataStatusListener( Properties _ctx )
|
||||||
|
{
|
||||||
|
m_ctx = _ctx;
|
||||||
|
m_is_status_error = false;
|
||||||
|
m_is_error = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void dataStatusChanged(DataStatusEvent e)
|
||||||
|
{
|
||||||
|
this.m_status_data = e.getInfo();
|
||||||
|
|
||||||
|
|
||||||
|
String dbInfo = e.getMessage();
|
||||||
|
//if (curTab != null && curTab.isQueryActive())
|
||||||
|
// dbInfo = "[ " + dbInfo + " ]";
|
||||||
|
//m_status_db = dbInfo;
|
||||||
|
|
||||||
|
log.info( "dataStatusChanged : "+e.getMessage() +" "+e.getInfo()+" "+e.getAD_Message()+" ");
|
||||||
|
//System.out.println( "dataStatusChanged : "+e.getMessage() +" "+e.getInfo()+" "+e.getAD_Message()+" ");
|
||||||
|
|
||||||
|
// Set Message / Info
|
||||||
|
if (e.getAD_Message() != null || e.getInfo() != null)
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
String msg = e.getMessage();
|
||||||
|
if (msg != null && msg.length() > 0)
|
||||||
|
sb.append(Msg.getMsg(m_ctx, e.getAD_Message()));
|
||||||
|
String info = e.getInfo();
|
||||||
|
if (info != null && info.length() > 0)
|
||||||
|
{
|
||||||
|
if (sb.length() > 0 && !sb.toString().trim().endsWith(":"))
|
||||||
|
sb.append(": ");
|
||||||
|
sb.append(info);
|
||||||
|
}
|
||||||
|
if (sb.length() > 0)
|
||||||
|
{
|
||||||
|
int pos = sb.indexOf("\n");
|
||||||
|
if (pos != -1) // replace CR/NL
|
||||||
|
sb.replace(pos, pos+1, " - ");
|
||||||
|
setStatusLine (sb.toString (), e.isError ());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Confirm Error
|
||||||
|
if (e.isError() && !e.isConfirmed())
|
||||||
|
{
|
||||||
|
m_is_error = true;
|
||||||
|
m_error_message = e.getAD_Message();
|
||||||
|
m_error_info = e.getInfo();
|
||||||
|
//setStatusError( Msg.getMsg(m_ctx, e.getAD_Message()), Msg.getMsg(m_ctx, e.getInfo()));
|
||||||
|
e.setConfirmed(true); // show just once - if GridTable.setCurrentRow is involved the status event is re-issued
|
||||||
|
} else
|
||||||
|
m_is_error = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStatusLine( String msg, boolean is_error )
|
||||||
|
{
|
||||||
|
this.m_status_data = msg ;
|
||||||
|
this.m_is_status_error = is_error;
|
||||||
|
//else
|
||||||
|
// this.m_status_data = " <span class='errormsg'>"+msg+"</span> ";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,16 @@
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
|
||||||
|
import pl.x3E.adInterface.DataRow;
|
||||||
|
|
||||||
|
public interface ADInfo {
|
||||||
|
public void setParameters( PreparedStatement pstmt, boolean forCount) throws SQLException;
|
||||||
|
//public String getSQLWhere();
|
||||||
|
public String getSQL();
|
||||||
|
public String getSQLCount();
|
||||||
|
|
||||||
|
public DataRow getColumns();
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,528 @@
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.compiere.model.GridField;
|
||||||
|
import org.compiere.model.Lookup;
|
||||||
|
import org.compiere.model.MLookup;
|
||||||
|
import org.compiere.model.MRole;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
import org.compiere.util.ValueNamePair;
|
||||||
|
import org.compiere.util.WebSessionCtx;
|
||||||
|
|
||||||
|
import pl.x3E.adInterface.DataField;
|
||||||
|
import pl.x3E.adInterface.DataRow;
|
||||||
|
import pl.x3E.adInterface.DataSet;
|
||||||
|
import pl.x3E.adInterface.LookupValue;
|
||||||
|
import pl.x3E.adInterface.LookupValues;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ADEMPIERE/COMPIERE
|
||||||
|
*
|
||||||
|
* zamiana:
|
||||||
|
* GridField na GridField
|
||||||
|
* GridField
|
||||||
|
*/
|
||||||
|
|
||||||
|
// TODO: Implement a better replacement for ROWNUM / LIMIT syntax
|
||||||
|
|
||||||
|
public class ADLookup {
|
||||||
|
|
||||||
|
|
||||||
|
static final int TYPE_PRODUCT = 001;
|
||||||
|
static final int TYPE_ORDER = 002;
|
||||||
|
static final int TYPE_BUISNESS_PARTNER = 002;
|
||||||
|
|
||||||
|
private String m_columnName;
|
||||||
|
private int m_type;
|
||||||
|
private String m_tableName;
|
||||||
|
private String m_keyColumnName;
|
||||||
|
private Boolean IsQueryJoin;
|
||||||
|
private boolean m_isSOTRX;
|
||||||
|
|
||||||
|
private final int MAX_PRODUCT_ROWS=500;
|
||||||
|
|
||||||
|
private WebSessionCtx wsc;
|
||||||
|
private Lookup m_lookup;
|
||||||
|
|
||||||
|
protected static CLogger log = CLogger.getCLogger(ADLookup.class);
|
||||||
|
|
||||||
|
|
||||||
|
public ADLookup( String columnName )
|
||||||
|
{
|
||||||
|
m_columnName = columnName;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public ArrayList GetLookupData()
|
||||||
|
{
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
private String getWhereClause( String keyColumn, DataRow params ) {
|
||||||
|
String whereClause = "IsSummary='N'";
|
||||||
|
String lookupColumn = keyColumn;
|
||||||
|
|
||||||
|
return whereClause;
|
||||||
|
}
|
||||||
|
|
||||||
|
private DataSet getResult( com._3e.ADInterface.ADInfo info, DataSet ds, int count, String mode ) {
|
||||||
|
if ("count".equals(mode) && count > 1) {
|
||||||
|
DataRow dr = ds.addNewDataRow();
|
||||||
|
DataField df = dr.addNewField();
|
||||||
|
df.setVal( ""+count );
|
||||||
|
df.setColumn( "__count" );
|
||||||
|
df.setType( "string" );
|
||||||
|
return ds;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
PreparedStatement pstmt = DB.prepareStatement( info.getSQL() );
|
||||||
|
info.setParameters( pstmt, false );
|
||||||
|
ResultSet rs = pstmt.executeQuery();
|
||||||
|
while (rs.next())
|
||||||
|
{
|
||||||
|
DataRow dr = ds.addNewDataRow();
|
||||||
|
DataField df = null;
|
||||||
|
//DataField df = dr.addNewField();
|
||||||
|
|
||||||
|
DataRow cols = info.getColumns();
|
||||||
|
|
||||||
|
for (int i=0; i< cols.sizeOfFieldArray(); i++ ) {
|
||||||
|
df = dr.addNewField();
|
||||||
|
DataField f = cols.getFieldArray(i);
|
||||||
|
//if ("string".equalsIgnoreCase(f.getType())) {
|
||||||
|
{
|
||||||
|
df.setVal(rs.getString( i + 1 ));
|
||||||
|
df.setColumn( f.getColumn() );
|
||||||
|
df.setType( f.getType() );
|
||||||
|
df.setLval( f.getLval() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
rs.close();
|
||||||
|
pstmt.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
System.out.println( e.getMessage() );
|
||||||
|
}
|
||||||
|
return ds;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void getLookupSearchValues( DataRow adr, DataSet ds, Properties ctx, int windowNo )
|
||||||
|
{
|
||||||
|
//String whereClause = getWhere(adr);
|
||||||
|
String whereClause = getWhereClause(m_columnName, adr);
|
||||||
|
String finalSQL="";
|
||||||
|
|
||||||
|
IsQueryJoin = false;
|
||||||
|
|
||||||
|
String mode = "normal";
|
||||||
|
for (int i=0; i< adr.sizeOfFieldArray(); i++) {
|
||||||
|
DataField f = adr.getFieldArray(i);
|
||||||
|
if ("mode".equalsIgnoreCase(f.getColumn())) mode = f.getVal();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ADInfo info = null;
|
||||||
|
|
||||||
|
// TODO: Implement info for generic lookups !!
|
||||||
|
|
||||||
|
if (m_columnName.equals("C_BPartner_ID"))
|
||||||
|
{
|
||||||
|
//finalSQL = getBuisnessPartnerSQL(whereClause, adr);
|
||||||
|
info = new InfoBPartner( adr, whereClause );
|
||||||
|
} else if (m_columnName.equals("M_Product_ID"))
|
||||||
|
{
|
||||||
|
info = new InfoProduct( adr, whereClause, ctx, windowNo );
|
||||||
|
//finalSQL = getProductSQL(whereClause);
|
||||||
|
}else if (m_columnName.equals("C_Order_ID")) {
|
||||||
|
//finalSQL = getOrderAccessSQL(whereClause);
|
||||||
|
}
|
||||||
|
if (finalSQL.equals("")) {
|
||||||
|
//finalSQL = getDirectAccessSQL(whereClause);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//Sprawdzam czy przy wykonaniu FinalSql zwr<EFBFBD>ci mi 0, 1 lub wiele wierszy
|
||||||
|
//Je<EFBFBD>eli zwr<EFBFBD>ci mi 0 wierszy to ko<EFBFBD>cz<EFBFBD>
|
||||||
|
//Je<EFBFBD>eli zwr<EFBFBD>ci mi 1 wiersz to ko<EFBFBD>cowy wynik b<EFBFBD>dzie kwerend<EFBFBD> normaln<EFBFBD> (w przypadku join<EFBFBD>w, np.: bp zostanie wykonana alternatywna kwerenda bez join<EFBFBD>w)
|
||||||
|
//Je<EFBFBD>eli zwr<EFBFBD>ci mi n wierszy to zwracam je
|
||||||
|
int id = 0;
|
||||||
|
log.info("Starting execution to base");
|
||||||
|
try
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
PreparedStatement pstmt = DB.prepareStatement( finalSQL );
|
||||||
|
info.setParameters( pstmt, true);
|
||||||
|
ResultSet rs = pstmt.executeQuery();
|
||||||
|
//Wykonuje zapytanie do bazy z "normalnym" sql i sprawdzam ile, mam wierszy wyniku
|
||||||
|
int ile = 0;
|
||||||
|
while (rs.next())
|
||||||
|
{
|
||||||
|
ile = ile+1;
|
||||||
|
}*/
|
||||||
|
int ile = 0;
|
||||||
|
finalSQL = info.getSQLCount();
|
||||||
|
PreparedStatement pstmt = DB.prepareStatement(finalSQL, null);
|
||||||
|
info.setParameters (pstmt, true);
|
||||||
|
ResultSet rs = pstmt.executeQuery();
|
||||||
|
if (rs.next())
|
||||||
|
ile = rs.getInt(1);
|
||||||
|
rs.close();
|
||||||
|
pstmt.close();
|
||||||
|
|
||||||
|
System.out.println("Znalaz<EFBFBD>em " + ile + " wierszy / rekord<72>w");
|
||||||
|
//Je<EFBFBD>eli jest 0 wierszy to ko<EFBFBD>czymy
|
||||||
|
//w kliencie spowoduje to wyswietlenie pustego okna lookUp
|
||||||
|
if (ile==0)
|
||||||
|
{
|
||||||
|
System.out.println("Nie znalaz<61>em rekord<72>w. W kliencie zostanie wy<77>wietlone okno LookUp'a bez rekord<72>w.");
|
||||||
|
}
|
||||||
|
//Je<EFBFBD>eli jest tylko jeden wiersz to odpowiednie tabele b<EFBFBD>d<EFBFBD> wywo<EFBFBD>ywane bez
|
||||||
|
//join<EFBFBD>w
|
||||||
|
if ((ile==1))
|
||||||
|
{
|
||||||
|
System.out.println("Znalaz<EFBFBD>em 1 rekord wi<77>c szukam dla bez join. W kliencie zostanie automatycznie uzupe<70>niona warto<74>c");
|
||||||
|
IsQueryJoin = false;
|
||||||
|
}
|
||||||
|
//Jesli wiecej niz jeden to uzywamy join<EFBFBD>w
|
||||||
|
//Spowoduje to wyswietlenie rekord<EFBFBD>w spe<EFBFBD>niajacych kryterium
|
||||||
|
//w oknie LookUp'a
|
||||||
|
if (ile>1)
|
||||||
|
{
|
||||||
|
System.out.println("Znalaz<EFBFBD>em wi<77>cej ni<6E> 1 rekord wi<77>c szukam dla whereClause i z joinami. W kliencie zostanie wy<77>wietlone LookUpWindow z przefiltrowanymi rekordami.");
|
||||||
|
IsQueryJoin = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
ds = getResult(info, ds, ile, mode);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, finalSQL, e);
|
||||||
|
id = -2;
|
||||||
|
}
|
||||||
|
// No (unique) result
|
||||||
|
if (id <= 0)
|
||||||
|
{
|
||||||
|
if (id == 0)
|
||||||
|
log.fine("Not Found - " + finalSQL);
|
||||||
|
else
|
||||||
|
log.fine("Not Unique - " + finalSQL);
|
||||||
|
//m_value = null; // force re-display
|
||||||
|
//actionButton(m_text.getText());
|
||||||
|
//return r;
|
||||||
|
}
|
||||||
|
log.fine("Unique ID=" + id);
|
||||||
|
|
||||||
|
} // actionText
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Generate Access SQL for Search.
|
||||||
|
* The SQL returns the ID of the value entered
|
||||||
|
* Also sets m_tableName and m_keyColumnName
|
||||||
|
* @param text uppercase text for LIKE comparison
|
||||||
|
* @return sql or ""
|
||||||
|
* Example
|
||||||
|
* SELECT C_Payment_ID FROM C_Payment WHERE UPPER(DocumentNo) LIKE x OR ...
|
||||||
|
*/
|
||||||
|
private String getDirectAccessSQL (String text)
|
||||||
|
{
|
||||||
|
//Tutaj trzeba doda<EFBFBD> dodatkowe pole dla odpowiednich typ<EFBFBD>w wyszukiwania w selectach
|
||||||
|
StringBuffer sql = new StringBuffer();
|
||||||
|
m_tableName = m_columnName.substring(0, m_columnName.length()-3); // without _ID
|
||||||
|
m_keyColumnName = m_columnName;
|
||||||
|
if (m_columnName.equals("C_Invoice_ID"))
|
||||||
|
{
|
||||||
|
sql.append("SELECT C_Invoice_ID, DocumentNo FROM C_Invoice WHERE UPPER(DocumentNo) LIKE ")
|
||||||
|
.append(DB.TO_STRING(text));
|
||||||
|
}
|
||||||
|
else if (m_columnName.equals("M_InOut_ID"))
|
||||||
|
{
|
||||||
|
sql.append("SELECT M_InOut_ID, '' FROM M_InOut WHERE UPPER(DocumentNo) LIKE ")
|
||||||
|
.append(DB.TO_STRING(text));
|
||||||
|
}
|
||||||
|
else if (m_columnName.equals("C_Payment_ID"))
|
||||||
|
{
|
||||||
|
sql.append("SELECT C_Payment_ID, DocumentNo FROM C_Payment WHERE UPPER(DocumentNo) LIKE ")
|
||||||
|
.append(DB.TO_STRING(text));
|
||||||
|
}
|
||||||
|
else if (m_columnName.equals("GL_JournalBatch_ID"))
|
||||||
|
{
|
||||||
|
sql.append("SELECT GL_JournalBatch_ID, '' FROM GL_JournalBatch WHERE UPPER(DocumentNo) LIKE ")
|
||||||
|
.append(DB.TO_STRING(text));
|
||||||
|
}
|
||||||
|
else if (m_columnName.equals("SalesRep_ID"))
|
||||||
|
{
|
||||||
|
sql.append("SELECT AD_User_ID, NAME FROM AD_User WHERE UPPER(Name) LIKE ")
|
||||||
|
.append(DB.TO_STRING(text));
|
||||||
|
m_tableName = "AD_User";
|
||||||
|
m_keyColumnName = "AD_User_ID";
|
||||||
|
}
|
||||||
|
|
||||||
|
// Predefined
|
||||||
|
if (sql.length() > 0)
|
||||||
|
{
|
||||||
|
String wc = getWhereClause();
|
||||||
|
if (wc != null && wc.length() > 0)
|
||||||
|
sql.append(" AND ").append(wc);
|
||||||
|
sql.append(" AND IsActive='Y'");
|
||||||
|
|
||||||
|
if (DB.isOracle())
|
||||||
|
sql.append(" AND ROWNUM < "+MAX_PRODUCT_ROWS+" ");
|
||||||
|
// ***
|
||||||
|
//log.finest("(predefined) " + sql.toString());
|
||||||
|
|
||||||
|
String sqlret = MRole.getDefault().addAccessSQL(sql.toString(),
|
||||||
|
m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
|
||||||
|
|
||||||
|
if (DB.isPostgreSQL())
|
||||||
|
sqlret = sqlret + " LIMIT "+MAX_PRODUCT_ROWS;
|
||||||
|
|
||||||
|
return sqlret;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check if it is a Table Reference
|
||||||
|
// TODO dorobic obsluge where z ad_ref_table !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||||
|
if (m_lookup != null && m_lookup instanceof MLookup)
|
||||||
|
{
|
||||||
|
int AD_Reference_ID = ((MLookup)m_lookup).getAD_Reference_Value_ID();
|
||||||
|
if (AD_Reference_ID != 0)
|
||||||
|
{
|
||||||
|
String query = "SELECT kc.ColumnName, dc.ColumnName, t.TableName "
|
||||||
|
+ "FROM AD_Ref_Table rt"
|
||||||
|
+ " INNER JOIN AD_Column kc ON (rt.AD_Key=kc.AD_Column_ID)"
|
||||||
|
+ " INNER JOIN AD_Column dc ON (rt.AD_Display=dc.AD_Column_ID)"
|
||||||
|
+ " INNER JOIN AD_Table t ON (rt.AD_Table_ID=t.AD_Table_ID) "
|
||||||
|
+ "WHERE rt.AD_Reference_ID=?";
|
||||||
|
String displayColumnName = null;
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement(query);
|
||||||
|
pstmt.setInt(1, AD_Reference_ID);
|
||||||
|
ResultSet rs = pstmt.executeQuery();
|
||||||
|
if (rs.next())
|
||||||
|
{
|
||||||
|
m_keyColumnName = rs.getString(1);
|
||||||
|
displayColumnName = rs.getString(2);
|
||||||
|
m_tableName = rs.getString(3);
|
||||||
|
}
|
||||||
|
rs.close();
|
||||||
|
pstmt.close();
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
//log.log(Level.SEVERE, "getDirectAccessSQL", e);
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (pstmt != null)
|
||||||
|
pstmt.close();
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
if (displayColumnName != null)
|
||||||
|
{
|
||||||
|
sql = new StringBuffer();
|
||||||
|
sql.append("SELECT ").append(m_keyColumnName).append(", "+displayColumnName) // kolec - bylo m_displayColumnName
|
||||||
|
.append(" FROM ").append(m_tableName)
|
||||||
|
.append(" WHERE UPPER(").append(displayColumnName)
|
||||||
|
.append(") LIKE ").append(DB.TO_STRING(text))
|
||||||
|
.append(" AND IsActive='Y'");
|
||||||
|
|
||||||
|
if (DB.isOracle())
|
||||||
|
sql.append(" AND ROWNUM < "+MAX_PRODUCT_ROWS+" ");
|
||||||
|
String wc = getWhereClause();
|
||||||
|
if (wc != null && wc.length() > 0)
|
||||||
|
sql.append(" AND ").append(wc);
|
||||||
|
// ***
|
||||||
|
//log.finest("(Table) " + sql.toString());
|
||||||
|
|
||||||
|
String sqlret = MRole.getDefault().addAccessSQL(sql.toString(),
|
||||||
|
m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
|
||||||
|
|
||||||
|
if (DB.isPostgreSQL())
|
||||||
|
sqlret = sqlret + " LIMIT "+MAX_PRODUCT_ROWS;
|
||||||
|
|
||||||
|
return sqlret;
|
||||||
|
}
|
||||||
|
} // Table Reference
|
||||||
|
} // MLookup
|
||||||
|
|
||||||
|
/** Check Well Known Columns of Table - assumes TableDir **/
|
||||||
|
String query = "SELECT t.TableName, c.ColumnName "
|
||||||
|
+ "FROM AD_Column c "
|
||||||
|
+ " INNER JOIN AD_Table t ON (c.AD_Table_ID=t.AD_Table_ID AND t.IsView='N') "
|
||||||
|
+ "WHERE (c.ColumnName IN ('DocumentNo', 'Value', 'Name') OR c.IsIdentifier='Y')"
|
||||||
|
+ " AND c.AD_Reference_ID IN (10,14)"
|
||||||
|
+ " AND EXISTS (SELECT * FROM AD_Column cc WHERE cc.AD_Table_ID=t.AD_Table_ID"
|
||||||
|
+ " AND cc.IsKey='Y' AND cc.ColumnName=?)";
|
||||||
|
m_keyColumnName = m_columnName;
|
||||||
|
sql = new StringBuffer();
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement(query);
|
||||||
|
pstmt.setString(1, m_keyColumnName);
|
||||||
|
ResultSet rs = pstmt.executeQuery();
|
||||||
|
while (rs.next())
|
||||||
|
{
|
||||||
|
if (sql.length() != 0)
|
||||||
|
sql.append(" OR ");
|
||||||
|
m_tableName = rs.getString(1);
|
||||||
|
sql.append("UPPER(").append(rs.getString(2)).append(") LIKE ").append(DB.TO_STRING(text));
|
||||||
|
}
|
||||||
|
rs.close();
|
||||||
|
pstmt.close();
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
catch (SQLException ex)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, "getDirectAccessSQL", ex);
|
||||||
|
}
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (pstmt != null)
|
||||||
|
pstmt.close();
|
||||||
|
}
|
||||||
|
catch (SQLException ex1)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
pstmt = null;
|
||||||
|
//
|
||||||
|
if (sql.length() == 0)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, "(TableDir) - no standard/identifier columns");
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
//
|
||||||
|
StringBuffer retValue = new StringBuffer ("SELECT ")
|
||||||
|
.append(m_columnName).append(" , NAME").append(" FROM ").append(m_tableName)
|
||||||
|
.append(" WHERE ").append(sql)
|
||||||
|
.append(" AND IsActive='Y' ");
|
||||||
|
|
||||||
|
if (DB.isOracle())
|
||||||
|
retValue.append(" AND ROWNUM < "+MAX_PRODUCT_ROWS+" ");
|
||||||
|
String wc = getWhereClause();
|
||||||
|
if (wc != null && wc.length() > 0)
|
||||||
|
retValue.append(" AND ").append(wc);
|
||||||
|
// ***
|
||||||
|
log.finest("(TableDir) " + sql.toString());
|
||||||
|
|
||||||
|
String sqlret = MRole.getDefault().addAccessSQL(retValue.toString(),
|
||||||
|
m_tableName, MRole.SQL_NOTQUALIFIED, MRole.SQL_RO);
|
||||||
|
|
||||||
|
if (DB.isPostgreSQL())
|
||||||
|
sqlret = sqlret + " LIMIT "+MAX_PRODUCT_ROWS;
|
||||||
|
|
||||||
|
return sqlret;
|
||||||
|
} // getDirectAccessSQL
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Where Clause
|
||||||
|
* @return where clause or ""
|
||||||
|
*/
|
||||||
|
private String getWhereClause()
|
||||||
|
{
|
||||||
|
String whereClause = "";
|
||||||
|
if (m_lookup == null)
|
||||||
|
return "";
|
||||||
|
if (m_lookup.getZoomQuery() != null)
|
||||||
|
whereClause = m_lookup.getZoomQuery().getWhereClause();
|
||||||
|
String validation = m_lookup.getValidation();
|
||||||
|
if (whereClause.length() == 0)
|
||||||
|
whereClause = validation;
|
||||||
|
else
|
||||||
|
if (validation.length()>0) // kolec
|
||||||
|
whereClause += " AND " + validation;
|
||||||
|
// log.finest("ZoomQuery=" + (m_lookup.getZoomQuery()==null ? "" : m_lookup.getZoomQuery().getWhereClause())
|
||||||
|
// + ", Validation=" + m_lookup.getValidation());
|
||||||
|
if (whereClause.indexOf('@') != -1)
|
||||||
|
{
|
||||||
|
String validated = Env.parseContext(wsc.ctx, m_lookup.getWindowNo(), whereClause, false);
|
||||||
|
if (validated.length() == 0)
|
||||||
|
log.severe("Cannot Parse=" + whereClause);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
log.fine("Parsed: " + validated);
|
||||||
|
return validated;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return whereClause;
|
||||||
|
} // getWhereClause
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void fillLookupValues( LookupValues lvs, KeyNamePair[] kp )
|
||||||
|
{
|
||||||
|
if (kp!=null && lvs != null)
|
||||||
|
for (int i=0; i<kp.length; i++)
|
||||||
|
{
|
||||||
|
LookupValue lv = lvs.addNewLv();
|
||||||
|
lv.setKey( kp[i].getID() );
|
||||||
|
lv.setVal( kp[i].getName() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fillLookupValues( LookupValues lvs, Lookup lookup, GridField field )
|
||||||
|
{
|
||||||
|
fillLookupValues( lvs, lookup, field.isMandatory(true), field.isReadOnly());
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void fillLookupValues( LookupValues lvs, Lookup lookup, boolean isMandatory, boolean isReadOnly )
|
||||||
|
{
|
||||||
|
|
||||||
|
if(lookup.getSize() == 0)
|
||||||
|
lookup.refresh();
|
||||||
|
Object[] list = lookup.getData(isMandatory, true, !isReadOnly, false).toArray();
|
||||||
|
|
||||||
|
for (int i=0; i<list.length; i++)
|
||||||
|
{
|
||||||
|
boolean isNumber = list[0] instanceof KeyNamePair;
|
||||||
|
|
||||||
|
LookupValue lv = lvs.addNewLv();
|
||||||
|
|
||||||
|
if (isNumber)
|
||||||
|
{
|
||||||
|
KeyNamePair p = (KeyNamePair)list[i];
|
||||||
|
lv.setKey( Integer.toString(p.getKey()) );
|
||||||
|
lv.setVal( p.getName() );
|
||||||
|
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
ValueNamePair p = (ValueNamePair)list[i];
|
||||||
|
lv.setKey( p.getValue() );
|
||||||
|
lv.setVal( p.getName() );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.jws.WebParam;
|
||||||
|
import javax.jws.WebService;
|
||||||
|
import javax.jws.soap.SOAPBinding;
|
||||||
|
import javax.jws.soap.SOAPBinding.ParameterStyle;
|
||||||
|
import javax.jws.soap.SOAPBinding.Style;
|
||||||
|
import javax.jws.soap.SOAPBinding.Use;
|
||||||
|
|
||||||
|
import pl.x3E.adInterface.ADLoginRequestDocument;
|
||||||
|
import pl.x3E.adInterface.ADLoginResponseDocument;
|
||||||
|
import pl.x3E.adInterface.ADMenuDocument;
|
||||||
|
import pl.x3E.adInterface.DocActionDocument;
|
||||||
|
import pl.x3E.adInterface.GetLookupSearchDataReqDocument;
|
||||||
|
import pl.x3E.adInterface.GetProcessParamsDocument;
|
||||||
|
import pl.x3E.adInterface.LocationDocument;
|
||||||
|
import pl.x3E.adInterface.ProcessParamsDocument;
|
||||||
|
import pl.x3E.adInterface.RunProcessDocument;
|
||||||
|
import pl.x3E.adInterface.RunProcessResponseDocument;
|
||||||
|
import pl.x3E.adInterface.StandardResponseDocument;
|
||||||
|
import pl.x3E.adInterface.WindowDocument;
|
||||||
|
import pl.x3E.adInterface.WindowTabDataDocument;
|
||||||
|
import pl.x3E.adInterface.WindowTabDataReqDocument;
|
||||||
|
|
||||||
|
@WebService(targetNamespace="http://3e.pl/ADInterface")
|
||||||
|
@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED)
|
||||||
|
public interface ADService {
|
||||||
|
|
||||||
|
public WindowDocument getADWindow(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="AD_Window_ID") int AD_Window_ID,@WebParam(name="AD_Menu_ID") int AD_Menu_ID);
|
||||||
|
//public WindowTabDataDocument getWindowTabData(int WindowNo, int AD_Window_ID, int AD_Menu_ID, int TabNo, int PrevTabNo, int PrevRecNo, boolean GetData) throws XFireFault;
|
||||||
|
//public WindowTabDataDocument getWindowTabData(int WindowNo, int AD_Window_ID, int AD_Menu_ID, int TabNo, int PrevTabNo, int PrevRecNo, boolean GetData, int RowStart, int RowCount) throws XFireFault;
|
||||||
|
public WindowTabDataDocument getWindowTabData(WindowTabDataReqDocument reqd);
|
||||||
|
|
||||||
|
public WindowTabDataDocument getDataRow(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="TabNo") int TabNo,@WebParam(name="RowNo") int RowNo );
|
||||||
|
public WindowTabDataDocument updateDataRow(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="TabNo") int TabNo,@WebParam(name="RowNo") int RowNo, WindowTabDataDocument data );
|
||||||
|
public WindowTabDataDocument saveDataRow(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="TabNo") int TabNo,@WebParam(name="RowNo") int RowNo, WindowTabDataDocument data );
|
||||||
|
public WindowTabDataDocument addNewDataRow(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="TabNo") int TabNo );
|
||||||
|
public WindowTabDataDocument deleteDataRow(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="TabNo") int TabNo,@WebParam(name="RowNo") int RowNo );
|
||||||
|
public WindowTabDataDocument ignoreDataRow(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="TabNo") int TabNo,@WebParam(name="RowNo") int RowNo );
|
||||||
|
public WindowTabDataDocument refreshDataRow(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="TabNo") int TabNo,@WebParam(name="RowNo") int RowNo );
|
||||||
|
|
||||||
|
public WindowTabDataDocument getLookupSearchData(GetLookupSearchDataReqDocument req);
|
||||||
|
public WindowTabDataDocument getLookupData(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="TabNo") int TabNo,@WebParam(name="RowNo") int RowNo,@WebParam(name="columnName") String columnName );
|
||||||
|
|
||||||
|
public ADMenuDocument getADMenu(@WebParam(name="AD_Role_ID")int AD_Role_ID);
|
||||||
|
|
||||||
|
public ADLoginResponseDocument login( ADLoginRequestDocument req );
|
||||||
|
|
||||||
|
public ProcessParamsDocument getProcessParams( GetProcessParamsDocument req );
|
||||||
|
public RunProcessResponseDocument runProcess( RunProcessDocument req );
|
||||||
|
|
||||||
|
public StandardResponseDocument saveLocation( LocationDocument req );
|
||||||
|
public LocationDocument getLocation( LocationDocument req );
|
||||||
|
|
||||||
|
public DocActionDocument getDocAction(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="TabNo") int TabNo,@WebParam(name="RowNo") int RowNo,@WebParam(name="ColName") String ColName );
|
||||||
|
public StandardResponseDocument setDocAction(@WebParam(name="WindowNo") int WindowNo,@WebParam(name="TabNo") int TabNo,@WebParam(name="RowNo") int RowNo,@WebParam(name="ColName") String ColName,@WebParam(name="docAction") String docAction );
|
||||||
|
|
||||||
|
public String getVersion();
|
||||||
|
|
||||||
|
public boolean isLoggedIn();
|
||||||
|
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,339 @@
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.model.MUser;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.DisplayType;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
import org.compiere.util.Language;
|
||||||
|
import org.compiere.util.Login;
|
||||||
|
|
||||||
|
public class CompiereService {
|
||||||
|
|
||||||
|
private static CLogger log = CLogger.getCLogger(CompiereService.class);
|
||||||
|
|
||||||
|
public final static String datePattern = "dd-MM-yyyy";
|
||||||
|
|
||||||
|
private Properties m_ctx;
|
||||||
|
private String m_trx_name;
|
||||||
|
|
||||||
|
private int m_AD_Client_ID;
|
||||||
|
private int m_AD_Org_ID;
|
||||||
|
private int m_AD_User_ID;
|
||||||
|
private int m_AD_Role_ID;
|
||||||
|
private int m_AD_Warehouse_ID;
|
||||||
|
private String m_Lang;
|
||||||
|
private String m_User;
|
||||||
|
|
||||||
|
private boolean LoggedIn = false;
|
||||||
|
|
||||||
|
|
||||||
|
/** Localized Date format */
|
||||||
|
public SimpleDateFormat dateFormat = null;
|
||||||
|
/** Localized Timestamp format */
|
||||||
|
public SimpleDateFormat dateTimeFormat = null;
|
||||||
|
|
||||||
|
/** Localized Amount format */
|
||||||
|
public DecimalFormat amountFormat = null;
|
||||||
|
/** Localized Integer format */
|
||||||
|
public DecimalFormat integerFormat = null;
|
||||||
|
/** Localized Number format */
|
||||||
|
public DecimalFormat numberFormat = null;
|
||||||
|
/** Localized Quantity format */
|
||||||
|
public DecimalFormat quantityFormat = null;
|
||||||
|
|
||||||
|
/** Localized Date format */
|
||||||
|
public SimpleDateFormat modelDateFormat = null;
|
||||||
|
/** Localized Timestamp format */
|
||||||
|
public SimpleDateFormat modelDateTimeFormat = null;
|
||||||
|
|
||||||
|
/** Localized Amount format */
|
||||||
|
public DecimalFormat modelAmountFormat = null;
|
||||||
|
/** Localized Integer format */
|
||||||
|
public DecimalFormat modelIntegerFormat = null;
|
||||||
|
/** Localized Number format */
|
||||||
|
public DecimalFormat modelNumberFormat = null;
|
||||||
|
/** Localized Quantity format */
|
||||||
|
public DecimalFormat modelQuantityFormat = null;
|
||||||
|
|
||||||
|
private Language m_lang;
|
||||||
|
|
||||||
|
public final String dateFormatOnlyForCtx = "yyyy-MM-dd";
|
||||||
|
|
||||||
|
public int getM_AD_Client_ID() {
|
||||||
|
return m_AD_Client_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setM_AD_Client_ID(int client_ID) {
|
||||||
|
m_AD_Client_ID = client_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getM_AD_Org_ID() {
|
||||||
|
return m_AD_Org_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setM_AD_Org_ID(int org_ID) {
|
||||||
|
m_AD_Org_ID = org_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Properties getM_ctx() {
|
||||||
|
return m_ctx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setM_ctx(Properties m_ctx) {
|
||||||
|
this.m_ctx = m_ctx;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getM_trx_name() {
|
||||||
|
return m_trx_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setM_trx_name(String m_trx_name) {
|
||||||
|
this.m_trx_name = m_trx_name;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public CompiereService()
|
||||||
|
{
|
||||||
|
m_trx_name= null; //Trx.createTrxName();
|
||||||
|
m_ctx = new Properties();
|
||||||
|
LoggedIn = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void connect()
|
||||||
|
{
|
||||||
|
CompiereUtil.initWeb();
|
||||||
|
|
||||||
|
Env.setCtx(m_ctx);
|
||||||
|
Env.setContext( m_ctx, "#AD_Language", "en_US" );
|
||||||
|
m_lang = Language.getLanguage("en_US");
|
||||||
|
|
||||||
|
// These variables are needed for ADClient.exe
|
||||||
|
Language m_lang2 = Language.getLanguage("pl_PL");
|
||||||
|
|
||||||
|
//dateFormat = DisplayType.getDateFormat(DisplayType.Date, m_lang2);
|
||||||
|
//dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, m_lang2);
|
||||||
|
|
||||||
|
dateFormat = new SimpleDateFormat( datePattern );
|
||||||
|
dateTimeFormat = new SimpleDateFormat( datePattern );
|
||||||
|
|
||||||
|
//dateTimeFormat = DisplayType.getDateFormat(DisplayType.DateTime, m_lang2);
|
||||||
|
//
|
||||||
|
amountFormat = DisplayType.getNumberFormat(DisplayType.Amount, m_lang2);
|
||||||
|
integerFormat = DisplayType.getNumberFormat(DisplayType.Integer, m_lang2);
|
||||||
|
numberFormat = DisplayType.getNumberFormat(DisplayType.Number, m_lang2);
|
||||||
|
quantityFormat = DisplayType.getNumberFormat(DisplayType.Quantity, m_lang2);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public Language getM_lang() {
|
||||||
|
return m_lang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setM_lang(Language m_lang) {
|
||||||
|
this.m_lang = m_lang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isLoggedIn() {
|
||||||
|
return LoggedIn;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
public static Properties testLogin (boolean isClient)
|
||||||
|
{
|
||||||
|
//logger.entering("Env", "initTest");
|
||||||
|
Compiere.startupEnvironment(true);
|
||||||
|
// Test Context
|
||||||
|
Properties ctx = Env.getCtx();
|
||||||
|
org.compiere.util.Login login = new org.compiere.util.Login(ctx);
|
||||||
|
KeyNamePair[] roles = login.getRoles("SuperUser", "System1969");
|
||||||
|
// load role
|
||||||
|
if (roles != null && roles.length > 0)
|
||||||
|
{
|
||||||
|
int x = -1;
|
||||||
|
for (int i=0; i<roles.length; i++)
|
||||||
|
{
|
||||||
|
if (roles[i].getName().equalsIgnoreCase("Opony Admin"))
|
||||||
|
x= i;
|
||||||
|
log.info( roles[i].getName());
|
||||||
|
}
|
||||||
|
KeyNamePair[] clients = login.getClients (roles[x]);
|
||||||
|
// load client
|
||||||
|
if (clients != null && clients.length > 0)
|
||||||
|
{
|
||||||
|
KeyNamePair[] orgs = login.getOrgs(clients[0]);
|
||||||
|
// load org
|
||||||
|
if (orgs != null && orgs.length > 0)
|
||||||
|
{
|
||||||
|
KeyNamePair[] whs = login.getWarehouses(orgs[0]);
|
||||||
|
//
|
||||||
|
login.loadPreferences(orgs[0], null, null, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//
|
||||||
|
Env.setContext(ctx, "#Date", "2006-01-26");
|
||||||
|
// logger.exiting("Env", "initTest");
|
||||||
|
return ctx;
|
||||||
|
} // testInit
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check Login information and set context.
|
||||||
|
* @returns true if login info are OK
|
||||||
|
* @param ctx context
|
||||||
|
* @param AD_User_ID user
|
||||||
|
* @param AD_Role_ID role
|
||||||
|
* @param AD_Client_ID client
|
||||||
|
* @param AD_Org_ID org
|
||||||
|
* @param M_Warehouse_ID warehouse
|
||||||
|
*/
|
||||||
|
private String checkLogin (Properties ctx, int AD_User_ID, int AD_Role_ID, int AD_Client_ID, int AD_Org_ID, int M_Warehouse_ID)
|
||||||
|
{
|
||||||
|
// Get Login Info
|
||||||
|
String loginInfo = null;
|
||||||
|
// Verify existance of User/Client/Org/Role and User's acces to Client & Org
|
||||||
|
String sql = "SELECT u.Name || '@' || c.Name || '.' || o.Name || ' [' || INITCAP(USER) || ']' AS Text "
|
||||||
|
+ "FROM AD_User u, AD_Client c, AD_Org o, AD_User_Roles ur "
|
||||||
|
+ "WHERE u.AD_User_ID=?" // #1
|
||||||
|
+ " AND c.AD_Client_ID=?" // #2
|
||||||
|
+ " AND o.AD_Org_ID=?" // #3
|
||||||
|
+ " AND ur.AD_Role_ID=?" // #4
|
||||||
|
+ " AND ur.AD_User_ID=u.AD_User_ID"
|
||||||
|
+ " AND (o.AD_Client_ID = 0 OR o.AD_Client_ID=c.AD_Client_ID)"
|
||||||
|
+ " AND c.AD_Client_ID IN (SELECT AD_Client_ID FROM AD_Role_OrgAccess ca WHERE ca.AD_Role_ID=ur.AD_Role_ID)"
|
||||||
|
+ " AND o.AD_Org_ID IN (SELECT AD_Org_ID FROM AD_Role_OrgAccess ca WHERE ca.AD_Role_ID=ur.AD_Role_ID)";
|
||||||
|
try
|
||||||
|
{
|
||||||
|
PreparedStatement pstmt = DB.prepareStatement(sql, null);
|
||||||
|
pstmt.setInt(1, AD_User_ID);
|
||||||
|
pstmt.setInt(2, AD_Client_ID);
|
||||||
|
pstmt.setInt(3, AD_Org_ID);
|
||||||
|
pstmt.setInt(4, AD_Role_ID);
|
||||||
|
ResultSet rs = pstmt.executeQuery();
|
||||||
|
if (rs.next())
|
||||||
|
loginInfo = rs.getString(1);
|
||||||
|
rs.close();
|
||||||
|
pstmt.close();
|
||||||
|
}
|
||||||
|
catch (SQLException e)
|
||||||
|
{
|
||||||
|
// log.log(Level.SEVERE, "checkLogin", e);
|
||||||
|
}
|
||||||
|
|
||||||
|
// not verified
|
||||||
|
if (loginInfo == null)
|
||||||
|
return null;
|
||||||
|
|
||||||
|
// Set Preferences
|
||||||
|
KeyNamePair org = new KeyNamePair(AD_Org_ID, String.valueOf(AD_Org_ID));
|
||||||
|
KeyNamePair wh = null;
|
||||||
|
if (M_Warehouse_ID > 0)
|
||||||
|
wh = new KeyNamePair(M_Warehouse_ID, String.valueOf(M_Warehouse_ID));
|
||||||
|
//
|
||||||
|
Timestamp date = null;
|
||||||
|
String printer = null;
|
||||||
|
Login login = new Login(ctx);
|
||||||
|
login.loadPreferences(org, wh, date, printer);
|
||||||
|
// Don't Show Acct/Trl Tabs on HTML UI
|
||||||
|
Env.setContext(ctx, "#ShowAcct", "N");
|
||||||
|
Env.setContext(ctx, "#ShowTrl", "N");
|
||||||
|
//
|
||||||
|
return loginInfo;
|
||||||
|
} // checkLogin
|
||||||
|
|
||||||
|
public boolean login( int AD_User_ID, int AD_Role_ID, int AD_Client_ID, int AD_Org_ID, int AD_Warehouse_ID, String Lang ) {
|
||||||
|
LoggedIn = false;
|
||||||
|
String loginInfo = checkLogin (getM_ctx(), AD_User_ID, AD_Role_ID, AD_Client_ID, AD_Org_ID, AD_Warehouse_ID );
|
||||||
|
if (loginInfo == null)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
m_AD_Client_ID = AD_Client_ID;
|
||||||
|
m_AD_Org_ID = AD_Org_ID;
|
||||||
|
m_AD_User_ID = AD_User_ID;
|
||||||
|
m_AD_Role_ID = AD_Role_ID;
|
||||||
|
m_AD_Warehouse_ID = AD_Warehouse_ID;
|
||||||
|
m_Lang = Lang;
|
||||||
|
m_User = MUser.getNameOfUser(m_AD_User_ID);
|
||||||
|
|
||||||
|
Env.setCtx(m_ctx);
|
||||||
|
Env.setContext( m_ctx, "#AD_Language", Lang);
|
||||||
|
m_lang = Language.getLanguage(Lang);
|
||||||
|
Env.verifyLanguage( getM_ctx(), m_lang );
|
||||||
|
|
||||||
|
modelDateFormat = new SimpleDateFormat( datePattern );
|
||||||
|
modelDateTimeFormat = new SimpleDateFormat( datePattern );
|
||||||
|
|
||||||
|
modelAmountFormat = DisplayType.getNumberFormat(DisplayType.Amount, m_lang);
|
||||||
|
modelIntegerFormat = DisplayType.getNumberFormat(DisplayType.Integer, m_lang);
|
||||||
|
modelNumberFormat = DisplayType.getNumberFormat(DisplayType.Number, m_lang);
|
||||||
|
modelQuantityFormat = DisplayType.getNumberFormat(DisplayType.Quantity, m_lang);
|
||||||
|
|
||||||
|
// Set Date
|
||||||
|
Timestamp ts = new Timestamp(System.currentTimeMillis());
|
||||||
|
|
||||||
|
SimpleDateFormat dateFormat4Timestamp = new SimpleDateFormat( dateFormatOnlyForCtx );
|
||||||
|
Env.setContext( getM_ctx(), "#Date", dateFormat4Timestamp.format(ts)+" 00:00:00" ); // JDBC format
|
||||||
|
log.info(" #Date = "+ Env.getContextAsDate( getM_ctx(), "#Date"));
|
||||||
|
|
||||||
|
Env.setContext( getM_ctx(), "#M_Warehouse_ID", AD_Warehouse_ID );
|
||||||
|
Env.setContext(m_ctx, Env.LANGUAGE, m_lang.getAD_Language());
|
||||||
|
//Env.setContext( getM_ctx(), "#AD_Language", Lang );
|
||||||
|
|
||||||
|
LoggedIn = true;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setM_AD_User_ID(int m_AD_User_ID) {
|
||||||
|
this.m_AD_User_ID = m_AD_User_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getM_AD_User_ID() {
|
||||||
|
return m_AD_User_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setM_AD_Role_ID(int m_AD_Role_ID) {
|
||||||
|
this.m_AD_Role_ID = m_AD_Role_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getM_AD_Role_ID() {
|
||||||
|
return m_AD_Role_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setM_Lang(String m_Lang) {
|
||||||
|
this.m_Lang = m_Lang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getM_Lang() {
|
||||||
|
return m_Lang;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setM_AD_Warehouse_ID(int m_AD_Warehouse_ID) {
|
||||||
|
this.m_AD_Warehouse_ID = m_AD_Warehouse_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int getM_AD_Warehouse_ID() {
|
||||||
|
return m_AD_Warehouse_ID;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUser(String m_User) {
|
||||||
|
this.m_User = m_User;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUser() {
|
||||||
|
return m_User;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,62 @@
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.compiere.Adempiere;
|
||||||
|
import org.compiere.model.MClient;
|
||||||
|
import org.compiere.model.MSystem;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
|
||||||
|
|
||||||
|
public class CompiereUtil {
|
||||||
|
|
||||||
|
private static CLogger log = CLogger.getCLogger(CompiereUtil.class);
|
||||||
|
private static boolean s_initOK = false;
|
||||||
|
|
||||||
|
|
||||||
|
public static boolean initWeb()
|
||||||
|
{
|
||||||
|
if (s_initOK)
|
||||||
|
{
|
||||||
|
//log.info(context.getServletContextName());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
// TODO:
|
||||||
|
// Load Environment Variables (serverApps/src/web/WEB-INF/web.xml)
|
||||||
|
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//CLogMgt.setLevel(Level.OFF);
|
||||||
|
|
||||||
|
/* ADEMPIERE/COMPIERE */
|
||||||
|
//s_initOK = Compiere.startup(false);
|
||||||
|
s_initOK = Adempiere.startup(false);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, "startup", ex);
|
||||||
|
}
|
||||||
|
if (!s_initOK)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
// Logging now initiated
|
||||||
|
//log.info(info.toString());
|
||||||
|
|
||||||
|
//
|
||||||
|
Properties ctx = new Properties();
|
||||||
|
MClient client = MClient.get(ctx, 0);
|
||||||
|
MSystem system = MSystem.get(ctx);
|
||||||
|
|
||||||
|
// Env.setContext( ctx, "#AD_Language", "pl_PL" );
|
||||||
|
//client.sendEMail(client.getRequestEMail(),
|
||||||
|
// "Server started: " + system.getName()
|
||||||
|
// ,"ServerInfo: " + context.getServerInfo()
|
||||||
|
//);
|
||||||
|
|
||||||
|
return s_initOK;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,312 @@
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
import org.compiere.model.MRole;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
|
import pl.x3E.adInterface.DataField;
|
||||||
|
import pl.x3E.adInterface.DataRow;
|
||||||
|
|
||||||
|
|
||||||
|
public class InfoBPartner implements ADInfo {
|
||||||
|
|
||||||
|
private static String s_partnerFROM = "C_BPartner"
|
||||||
|
+ " LEFT OUTER JOIN C_BPartner_Location l ON (C_BPartner.C_BPartner_ID=l.C_BPartner_ID AND l.IsActive='Y')"
|
||||||
|
+ " LEFT OUTER JOIN AD_User c ON (C_BPartner.C_BPartner_ID=c.C_BPartner_ID AND (c.C_BPartner_Location_ID IS NULL OR c.C_BPartner_Location_ID=l.C_BPartner_Location_ID) AND c.IsActive='Y')"
|
||||||
|
+ " LEFT OUTER JOIN C_Location a ON (l.C_Location_ID=a.C_Location_ID)";
|
||||||
|
|
||||||
|
private DataRow params;
|
||||||
|
private boolean m_isSOTrx = true;
|
||||||
|
private String m_tableName = "C_BPartner";
|
||||||
|
|
||||||
|
public InfoBPartner(DataRow dr, String whereClause) {
|
||||||
|
params = dr;
|
||||||
|
m_isSOTrx = true; // TODO
|
||||||
|
|
||||||
|
StringBuffer where = new StringBuffer();
|
||||||
|
where.append("C_BPartner.IsSummary='N' AND C_BPartner.IsActive='Y'");
|
||||||
|
if (whereClause != null && whereClause.length() > 0)
|
||||||
|
where.append(" AND ").append(whereClause);
|
||||||
|
|
||||||
|
prepareTable(s_partnerFROM, where.toString(), "C_BPartner.Value");
|
||||||
|
|
||||||
|
setupParamsFromDataRow();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupParamsFromDataRow() {
|
||||||
|
for (int i=0; i< params.sizeOfFieldArray(); i++) {
|
||||||
|
DataField f = params.getFieldArray(i);
|
||||||
|
System.out.println(f.getColumn() +" - '"+f.getVal()+"'");
|
||||||
|
if ("value".equalsIgnoreCase(f.getColumn())) fieldValue = f.getVal();
|
||||||
|
if ("name".equalsIgnoreCase(f.getColumn())) fieldName = f.getVal();
|
||||||
|
if ("contact".equalsIgnoreCase(f.getColumn())) fieldContact = f.getVal();
|
||||||
|
if ("checkCustomer".equalsIgnoreCase(f.getColumn())) checkCustomer = "Y".equalsIgnoreCase(f.getVal());
|
||||||
|
if ("checkAND".equalsIgnoreCase(f.getColumn())) checkAND = "Y".equalsIgnoreCase(f.getVal());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
String fieldValue = "";
|
||||||
|
String fieldName = "";
|
||||||
|
String fieldContact = "";
|
||||||
|
String fieldEMail = "";
|
||||||
|
String fieldPhone = "";
|
||||||
|
|
||||||
|
String fieldPostal = "";
|
||||||
|
boolean checkAND = false;
|
||||||
|
boolean checkCustomer = false;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected CLogger log = CLogger.getCLogger(getClass());
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public String getSQLWhere()
|
||||||
|
{
|
||||||
|
ArrayList<String> list = new ArrayList<String>();
|
||||||
|
// => Value
|
||||||
|
String value = fieldValue.toUpperCase();
|
||||||
|
if (!(value.equals("") || value.equals("%")))
|
||||||
|
list.add ("UPPER(C_BPartner.Value) LIKE ?");
|
||||||
|
// => Name
|
||||||
|
String name = fieldName.toUpperCase();
|
||||||
|
if (!(name.equals("") || name.equals("%")))
|
||||||
|
list.add ("UPPER(C_BPartner.Name) LIKE ?");
|
||||||
|
// => Contact
|
||||||
|
String contact = fieldContact.toUpperCase();
|
||||||
|
if (!(contact.equals("") || contact.equals("%")))
|
||||||
|
list.add ("UPPER(c.Name) LIKE ?");
|
||||||
|
// => EMail
|
||||||
|
String email = fieldEMail.toUpperCase();
|
||||||
|
if (!(email.equals("") || email.equals("%")))
|
||||||
|
list.add ("UPPER(c.EMail) LIKE ?");
|
||||||
|
// => Phone
|
||||||
|
String phone = fieldPhone.toUpperCase();
|
||||||
|
if (!(phone.equals("") || phone.equals("%")))
|
||||||
|
list.add ("UPPER(c.Phone) LIKE ?");
|
||||||
|
// => Postal
|
||||||
|
String postal = fieldPostal.toUpperCase();
|
||||||
|
if (!(postal.equals("") || postal.equals("%")))
|
||||||
|
list.add ("UPPER(a.Postal) LIKE ?");
|
||||||
|
|
||||||
|
StringBuffer sql = new StringBuffer();
|
||||||
|
int size = list.size();
|
||||||
|
// Just one
|
||||||
|
if (size == 1)
|
||||||
|
sql.append(" AND ").append(list.get(0));
|
||||||
|
else if (size > 1)
|
||||||
|
{
|
||||||
|
boolean AND = checkAND;
|
||||||
|
sql.append(" AND ");
|
||||||
|
if (!AND)
|
||||||
|
sql.append("(");
|
||||||
|
for (int i = 0; i < size; i++)
|
||||||
|
{
|
||||||
|
if (i > 0)
|
||||||
|
sql.append(AND ? " AND " : " OR ");
|
||||||
|
sql.append(list.get(i));
|
||||||
|
}
|
||||||
|
if (!AND)
|
||||||
|
sql.append(")");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Static SQL
|
||||||
|
if (checkCustomer)
|
||||||
|
{
|
||||||
|
sql.append(" AND ");
|
||||||
|
if (m_isSOTrx)
|
||||||
|
sql.append ("C_BPartner.IsCustomer='Y'");
|
||||||
|
else
|
||||||
|
sql.append ("C_BPartner.IsVendor='Y'");
|
||||||
|
}
|
||||||
|
System.out.println( sql.toString() );
|
||||||
|
return sql.toString();
|
||||||
|
} // getSQLWhere
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||||
|
{
|
||||||
|
int index = 1;
|
||||||
|
// => Value
|
||||||
|
String value = fieldValue.toUpperCase();
|
||||||
|
if (!(value.equals("") || value.equals("%")))
|
||||||
|
{
|
||||||
|
if (!value.endsWith("%"))
|
||||||
|
value += "%";
|
||||||
|
pstmt.setString(index++, value);
|
||||||
|
log.fine("Value: " + value);
|
||||||
|
}
|
||||||
|
// => Name
|
||||||
|
String name = fieldName.toUpperCase();
|
||||||
|
if (!(name.equals("") || name.equals("%")))
|
||||||
|
{
|
||||||
|
if (!name.endsWith("%"))
|
||||||
|
name += "%";
|
||||||
|
pstmt.setString(index++, name);
|
||||||
|
log.fine("Name: " + name);
|
||||||
|
}
|
||||||
|
// => Contact
|
||||||
|
String contact = fieldContact.toUpperCase();
|
||||||
|
if (!(contact.equals("") || contact.equals("%")))
|
||||||
|
{
|
||||||
|
if (!contact.endsWith("%"))
|
||||||
|
contact += "%";
|
||||||
|
pstmt.setString(index++, contact);
|
||||||
|
log.fine("Contact: " + contact);
|
||||||
|
}
|
||||||
|
// => EMail
|
||||||
|
String email = fieldEMail.toUpperCase();
|
||||||
|
if (!(email.equals("") || email.equals("%")))
|
||||||
|
{
|
||||||
|
if (!email.endsWith("%"))
|
||||||
|
email += "%";
|
||||||
|
pstmt.setString(index++, email);
|
||||||
|
log.fine("EMail: " + email);
|
||||||
|
}
|
||||||
|
// => Phone
|
||||||
|
String phone = fieldPhone.toUpperCase();
|
||||||
|
if (!(phone.equals("") || phone.equals("%")))
|
||||||
|
{
|
||||||
|
if (!phone.endsWith("%"))
|
||||||
|
phone += "%";
|
||||||
|
pstmt.setString(index++, phone);
|
||||||
|
log.fine("Phone: " + phone);
|
||||||
|
}
|
||||||
|
// => Postal
|
||||||
|
String postal = fieldPostal.toUpperCase();
|
||||||
|
if (!(postal.equals("") || postal.equals("%")))
|
||||||
|
{
|
||||||
|
if (!postal.endsWith("%"))
|
||||||
|
postal += "%";
|
||||||
|
pstmt.setString(index++, postal);
|
||||||
|
log.fine("Postal: " + postal);
|
||||||
|
}
|
||||||
|
} // setParameters
|
||||||
|
|
||||||
|
String m_sqlMain = "";
|
||||||
|
String m_sqlCount = "";
|
||||||
|
String m_sqlOrder = "";
|
||||||
|
|
||||||
|
|
||||||
|
protected void prepareTable ( String from, String staticWhere, String orderBy)
|
||||||
|
{
|
||||||
|
|
||||||
|
StringBuffer sql = new StringBuffer ("SELECT ");
|
||||||
|
// add columns & sql
|
||||||
|
sql.append( " C_BPartner.C_BPartner_ID, C_BPartner.Value, C_BPartner.Name, c.Name AS Contact, " );
|
||||||
|
sql.append( " C_BPartner.SO_CreditLimit-C_BPartner.SO_CreditUsed AS SO_CreditAvailable, ");
|
||||||
|
sql.append( " C_BPartner.SO_CreditUsed, c.Phone, a.Postal, a.City, C_BPartner.TotalOpenBalance, C_BPartner.ActualLifetimeValue ");
|
||||||
|
|
||||||
|
sql.append( " FROM ").append(from);
|
||||||
|
//
|
||||||
|
sql.append(" WHERE ").append(staticWhere);
|
||||||
|
m_sqlMain = sql.toString();
|
||||||
|
m_sqlCount = "SELECT COUNT(*) FROM " + from + " WHERE " + staticWhere;
|
||||||
|
//
|
||||||
|
m_sqlOrder = "";
|
||||||
|
if (orderBy != null && orderBy.length() > 0)
|
||||||
|
m_sqlOrder = " ORDER BY " + orderBy;
|
||||||
|
|
||||||
|
//if (m_keyColumnIndex == -1)
|
||||||
|
// log.log(Level.SEVERE, "No KeyColumn - " + sql);
|
||||||
|
|
||||||
|
} // prepareTable
|
||||||
|
|
||||||
|
|
||||||
|
public DataRow getColumns() {
|
||||||
|
DataRow col = DataRow.Factory.newInstance();
|
||||||
|
DataField f = null;
|
||||||
|
|
||||||
|
f = col.addNewField(); //0
|
||||||
|
f.setType("int");
|
||||||
|
f.setColumn("key" );
|
||||||
|
f.setLval("20,0");
|
||||||
|
|
||||||
|
f = col.addNewField(); //1
|
||||||
|
f.setType("string");
|
||||||
|
f.setColumn("value" );
|
||||||
|
f.setLval("20,100");
|
||||||
|
|
||||||
|
f = col.addNewField(); //2
|
||||||
|
f.setType("string");
|
||||||
|
f.setColumn("name" );
|
||||||
|
f.setLval("20, 140");
|
||||||
|
|
||||||
|
f = col.addNewField(); //3
|
||||||
|
f.setType("string");
|
||||||
|
f.setColumn("contact" );
|
||||||
|
f.setLval("20, 70");
|
||||||
|
|
||||||
|
f = col.addNewField(); //4
|
||||||
|
f.setType("string");
|
||||||
|
f.setColumn("SO_CreditAvailable" );
|
||||||
|
f.setLval("20, 50");
|
||||||
|
|
||||||
|
f = col.addNewField(); //5
|
||||||
|
f.setType("string");
|
||||||
|
f.setColumn("SO_CreditUsed" );
|
||||||
|
f.setLval("20, 40");
|
||||||
|
|
||||||
|
f = col.addNewField(); //6
|
||||||
|
f.setType("string");
|
||||||
|
f.setColumn("Phone" );
|
||||||
|
f.setLval("20,50");
|
||||||
|
|
||||||
|
f = col.addNewField(); //7
|
||||||
|
f.setType("string");
|
||||||
|
f.setColumn("Postal" );
|
||||||
|
f.setLval("20, 40");
|
||||||
|
|
||||||
|
f = col.addNewField(); //8
|
||||||
|
f.setType("string");
|
||||||
|
f.setColumn("City" );
|
||||||
|
f.setLval("20, 50");
|
||||||
|
|
||||||
|
f = col.addNewField(); //9
|
||||||
|
f.setType("string");
|
||||||
|
f.setColumn("TotalOpenBalance" );
|
||||||
|
f.setLval("10,50");
|
||||||
|
|
||||||
|
f = col.addNewField(); //10
|
||||||
|
f.setType("string");
|
||||||
|
f.setColumn("ActualLifetimeValue" );
|
||||||
|
f.setLval("10,50");
|
||||||
|
|
||||||
|
return col;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getSQL() {
|
||||||
|
String dynWhere = getSQLWhere();
|
||||||
|
StringBuffer sql = new StringBuffer (m_sqlMain);
|
||||||
|
if (dynWhere.length() > 0)
|
||||||
|
sql.append(dynWhere); // includes first AND
|
||||||
|
sql.append(m_sqlOrder);
|
||||||
|
String dataSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables
|
||||||
|
dataSql = MRole.getDefault().addAccessSQL(dataSql, m_tableName,
|
||||||
|
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||||
|
|
||||||
|
return dataSql;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSQLCount() {
|
||||||
|
String dynWhere = getSQLWhere();
|
||||||
|
StringBuffer sql = new StringBuffer (m_sqlCount);
|
||||||
|
if (dynWhere.length() > 0)
|
||||||
|
sql.append(dynWhere); // includes first AND
|
||||||
|
String countSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables
|
||||||
|
countSql = MRole.getDefault().addAccessSQL(countSql, m_tableName,
|
||||||
|
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||||
|
//log.finer(countSql);
|
||||||
|
|
||||||
|
return countSql;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,473 @@
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.compiere.minigrid.IDColumn;
|
||||||
|
import org.compiere.model.MRole;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Msg;
|
||||||
|
|
||||||
|
import pl.x3E.adInterface.DataField;
|
||||||
|
import pl.x3E.adInterface.DataRow;
|
||||||
|
|
||||||
|
|
||||||
|
public class InfoProduct implements ADInfo {
|
||||||
|
|
||||||
|
private static final String s_productFrom =
|
||||||
|
"M_Product p"
|
||||||
|
+ " LEFT OUTER JOIN M_ProductPrice pr ON (p.M_Product_ID=pr.M_Product_ID AND pr.IsActive='Y')"
|
||||||
|
+ " LEFT OUTER JOIN M_AttributeSet pa ON (p.M_AttributeSet_ID=pa.M_AttributeSet_ID)";
|
||||||
|
|
||||||
|
private DataRow params;
|
||||||
|
private boolean m_isSOTrx = true;
|
||||||
|
private String m_tableName = "M_Product";
|
||||||
|
|
||||||
|
Properties m_ctx;
|
||||||
|
int p_WindowNo;
|
||||||
|
|
||||||
|
public InfoProduct(DataRow dr, String whereClause, Properties ctx, int WindowNo) {
|
||||||
|
params = dr;
|
||||||
|
m_ctx = ctx;
|
||||||
|
p_WindowNo = WindowNo;
|
||||||
|
|
||||||
|
this.getProductLayout();
|
||||||
|
|
||||||
|
this.M_PriceList_ID = Env.getContextAsInt( m_ctx, "#M_PriceList_ID");
|
||||||
|
|
||||||
|
M_PriceList_Version_ID = findPLV (M_PriceList_ID);
|
||||||
|
/* // Set Value or Name
|
||||||
|
if (value.startsWith("@") && value.endsWith("@"))
|
||||||
|
fieldName.setText(value.substring(1,value.length()-1));
|
||||||
|
else
|
||||||
|
fieldValue.setText(value);
|
||||||
|
// Set Warehouse
|
||||||
|
if (M_Warehouse_ID == 0)
|
||||||
|
M_Warehouse_ID = Env.getContextAsInt(Env.getCtx(), "#M_Warehouse_ID");
|
||||||
|
|
||||||
|
//fillPicks(M_PriceList_ID);
|
||||||
|
int M_PriceList_Version_ID = 0; //findPLV (M_PriceList_ID);
|
||||||
|
// Set Value or Name
|
||||||
|
*/
|
||||||
|
// Set Warehouse // TODO
|
||||||
|
if (M_Warehouse_ID == 0)
|
||||||
|
M_Warehouse_ID = Env.getContextAsInt( m_ctx, "#M_Warehouse_ID");
|
||||||
|
|
||||||
|
//if (M_Warehouse_ID != 0)
|
||||||
|
// setWarehouse (M_Warehouse_ID);
|
||||||
|
// Set PriceList Version
|
||||||
|
//if (M_PriceList_Version_ID != 0)
|
||||||
|
// setPriceListVersion (M_PriceList_Version_ID);
|
||||||
|
|
||||||
|
// Create Grid
|
||||||
|
StringBuffer where = new StringBuffer();
|
||||||
|
where.append("p.IsActive='Y'");
|
||||||
|
if (M_Warehouse_ID != 0)
|
||||||
|
where.append(" AND p.IsSummary='N'");
|
||||||
|
// dynamic Where Clause
|
||||||
|
//if (p_whereClause != null && p_whereClause.length() > 0)
|
||||||
|
// where.append(" AND ") // replace fully qalified name with alias
|
||||||
|
// .append(Util.replace(p_whereClause, "M_Product.", "p."));
|
||||||
|
//
|
||||||
|
|
||||||
|
prepareTable(s_productFrom, where.toString(), "QtyAvailable DESC, Margin DESC" );
|
||||||
|
|
||||||
|
setupParamsFromDataRow();
|
||||||
|
}
|
||||||
|
|
||||||
|
void setupParamsFromDataRow() {
|
||||||
|
for (int i=0; i< params.sizeOfFieldArray(); i++) {
|
||||||
|
DataField f = params.getFieldArray(i);
|
||||||
|
System.out.println(f.getColumn() +" - '"+f.getVal()+"'");
|
||||||
|
if ("value".equalsIgnoreCase(f.getColumn())) fieldValue = f.getVal();
|
||||||
|
if ("name".equalsIgnoreCase(f.getColumn())) fieldName = f.getVal();
|
||||||
|
if ("name".equalsIgnoreCase(f.getColumn())) fieldName = f.getVal();
|
||||||
|
if ("upc".equalsIgnoreCase(f.getColumn())) fieldUPC = f.getVal();
|
||||||
|
if ("upc".equalsIgnoreCase(f.getColumn())) fieldUPC = f.getVal();
|
||||||
|
if ("sku".equalsIgnoreCase(f.getColumn())) fieldSKU = f.getVal();
|
||||||
|
if ("M_PriceList_Version_ID".equalsIgnoreCase(f.getColumn())) M_PriceList_Version_ID = Integer.parseInt(f.getVal());
|
||||||
|
if ("M_Warehouse_ID".equalsIgnoreCase(f.getColumn())) M_Warehouse_ID = Integer.parseInt(f.getVal());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected CLogger log = CLogger.getCLogger(getClass());
|
||||||
|
|
||||||
|
String m_pAttributeWhere = null;
|
||||||
|
String fieldValue ="";
|
||||||
|
String fieldName ="";
|
||||||
|
String fieldUPC ="";
|
||||||
|
String fieldSKU ="";
|
||||||
|
//int M_PriceList_Version_ID = 1000037; //104;
|
||||||
|
//int M_Warehouse_ID = 1000001; //103;
|
||||||
|
//int M_PriceList_ID = 1000022; //101
|
||||||
|
int M_PriceList_Version_ID = 104;
|
||||||
|
int M_Warehouse_ID = 103;
|
||||||
|
int M_PriceList_ID = 101;
|
||||||
|
|
||||||
|
String getSQLWhere() {
|
||||||
|
StringBuffer where = new StringBuffer();
|
||||||
|
|
||||||
|
// Optional PLV
|
||||||
|
//int M_PriceList_Version_ID = 0;
|
||||||
|
if (M_PriceList_Version_ID != 0)
|
||||||
|
where.append(" AND pr.M_PriceList_Version_ID=?");
|
||||||
|
|
||||||
|
// Product Attribute Search
|
||||||
|
if (m_pAttributeWhere != null)
|
||||||
|
{
|
||||||
|
where.append(m_pAttributeWhere);
|
||||||
|
return where.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
// => Value
|
||||||
|
String value = fieldValue.toUpperCase();
|
||||||
|
if (!(value.equals("") || value.equals("%"))) {
|
||||||
|
where.append(" AND UPPER(p.Value) LIKE ?");
|
||||||
|
}
|
||||||
|
|
||||||
|
// => Name
|
||||||
|
String name = fieldName.toUpperCase();
|
||||||
|
if (!(name.equals("") || name.equals("%")))
|
||||||
|
where.append(" AND UPPER(p.Name) LIKE ?");
|
||||||
|
|
||||||
|
// => UPC
|
||||||
|
String upc = fieldUPC.toUpperCase();
|
||||||
|
if (!(upc.equals("") || upc.equals("%")))
|
||||||
|
where.append(" AND UPPER(p.UPC) LIKE ?");
|
||||||
|
|
||||||
|
// => SKU
|
||||||
|
String sku = fieldSKU.toUpperCase();
|
||||||
|
if (!(sku.equals("") || sku.equals("%")))
|
||||||
|
where.append(" AND UPPER(p.SKU) LIKE ?");
|
||||||
|
|
||||||
|
return where.toString();
|
||||||
|
} // getSQLWhere
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set Parameters for Query
|
||||||
|
* (as defined in getSQLWhere)
|
||||||
|
*
|
||||||
|
* @param pstmt pstmt
|
||||||
|
* @param forCount for counting records
|
||||||
|
* @throws SQLException
|
||||||
|
*/
|
||||||
|
public void setParameters(PreparedStatement pstmt, boolean forCount) throws SQLException
|
||||||
|
{
|
||||||
|
int index = 1;
|
||||||
|
|
||||||
|
//M_Warehouse_ID = 103;
|
||||||
|
//this.M_PriceList_Version_ID = 104;
|
||||||
|
//this.M_PriceList_ID = 101;
|
||||||
|
|
||||||
|
//fieldValue = "%tree%";
|
||||||
|
|
||||||
|
// => Warehouse
|
||||||
|
//int M_Warehouse_ID = 0;
|
||||||
|
if (!forCount) // parameters in select
|
||||||
|
{
|
||||||
|
for (int i = 0; i < s_productLayout.length; i++)
|
||||||
|
{
|
||||||
|
if (s_productLayout[i].getColSQL().indexOf("?") != -1)
|
||||||
|
pstmt.setInt(index++, M_Warehouse_ID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
log.fine("M_Warehouse_ID=" + M_Warehouse_ID + " (" + (index-1) + "*)");
|
||||||
|
|
||||||
|
// => PriceList
|
||||||
|
//int M_PriceList_Version_ID = 0;
|
||||||
|
|
||||||
|
if (M_PriceList_Version_ID != 0)
|
||||||
|
{
|
||||||
|
pstmt.setInt(index++, M_PriceList_Version_ID);
|
||||||
|
log.fine("M_PriceList_Version_ID=" + M_PriceList_Version_ID);
|
||||||
|
}
|
||||||
|
// Rest of Parameter in Query for Attribute Search
|
||||||
|
if (m_pAttributeWhere != null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// => Value
|
||||||
|
String value = fieldValue.toUpperCase();
|
||||||
|
if (!(value.equals("") || value.equals("%")))
|
||||||
|
{
|
||||||
|
if (!value.endsWith("%"))
|
||||||
|
value += "%";
|
||||||
|
pstmt.setString(index++, value);
|
||||||
|
log.fine("Value: " + value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// => Name
|
||||||
|
String name = fieldName.toUpperCase();
|
||||||
|
if (!(name.equals("") || name.equals("%")))
|
||||||
|
{
|
||||||
|
if (!name.endsWith("%"))
|
||||||
|
name += "%";
|
||||||
|
pstmt.setString(index++, name);
|
||||||
|
log.fine("Name: " + name);
|
||||||
|
}
|
||||||
|
|
||||||
|
// => UPC
|
||||||
|
String upc = fieldUPC.toUpperCase();
|
||||||
|
if (!(upc.equals("") || upc.equals("%")))
|
||||||
|
{
|
||||||
|
if (!upc.endsWith("%"))
|
||||||
|
upc += "%";
|
||||||
|
pstmt.setString(index++, upc);
|
||||||
|
log.fine("UPC: " + upc);
|
||||||
|
}
|
||||||
|
|
||||||
|
// => SKU
|
||||||
|
String sku = fieldSKU.toUpperCase();
|
||||||
|
if (!(sku.equals("") || sku.equals("%")))
|
||||||
|
{
|
||||||
|
if (!sku.endsWith("%"))
|
||||||
|
sku += "%";
|
||||||
|
pstmt.setString(index++, sku);
|
||||||
|
log.fine("SKU: " + sku);
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setParameters
|
||||||
|
|
||||||
|
|
||||||
|
String m_sqlMain = "";
|
||||||
|
String m_sqlCount = "";
|
||||||
|
String m_sqlOrder = "";
|
||||||
|
|
||||||
|
int m_keyColumnIndex = -1;
|
||||||
|
|
||||||
|
protected void prepareTable ( String from, String staticWhere, String orderBy)
|
||||||
|
{
|
||||||
|
|
||||||
|
StringBuffer sql = new StringBuffer ("SELECT ");
|
||||||
|
|
||||||
|
for (int i = 0; i < s_productLayout.length; i++)
|
||||||
|
{
|
||||||
|
if (i > 0)
|
||||||
|
sql.append(", ");
|
||||||
|
sql.append(s_productLayout[i].getColSQL());
|
||||||
|
// adding ID column
|
||||||
|
if (s_productLayout[i].isIDcol())
|
||||||
|
sql.append(",").append(s_productLayout[i].getIDcolSQL());
|
||||||
|
// add to model
|
||||||
|
//p_table.addColumn(s_productLayout[i].getColHeader());
|
||||||
|
//if (s_productLayout[i].isColorColumn())
|
||||||
|
//p_table.setColorColumn(i);
|
||||||
|
if (s_productLayout[i].getColClass() == IDColumn.class)
|
||||||
|
m_keyColumnIndex = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
sql.append( " FROM ").append(from);
|
||||||
|
//
|
||||||
|
sql.append(" WHERE ").append(staticWhere);
|
||||||
|
m_sqlMain = sql.toString();
|
||||||
|
m_sqlCount = "SELECT COUNT(*) FROM " + from + " WHERE " + staticWhere;
|
||||||
|
//
|
||||||
|
m_sqlOrder = "";
|
||||||
|
if (orderBy != null && orderBy.length() > 0)
|
||||||
|
m_sqlOrder = " ORDER BY " + orderBy;
|
||||||
|
|
||||||
|
//if (m_keyColumnIndex == -1)
|
||||||
|
// log.log(Level.SEVERE, "No KeyColumn - " + sql);
|
||||||
|
|
||||||
|
} // prepareTable
|
||||||
|
|
||||||
|
|
||||||
|
Info_Column[] s_productLayout = null;
|
||||||
|
|
||||||
|
private Info_Column[] getProductLayout() {
|
||||||
|
ArrayList<Info_Column> list = new ArrayList<Info_Column>();
|
||||||
|
list.add(new Info_Column(" ", "p.M_Product_ID", IDColumn.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "Discontinued").substring(0, 1), "p.Discontinued", Boolean.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "Value"), "p.Value", String.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "Name"), "p.Name", String.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyAvailable"), "bomQtyAvailable(p.M_Product_ID,?,0) AS QtyAvailable", Double.class, true, true, null));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "PriceList"), "bomPriceList(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceList", BigDecimal.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "PriceStd"), "bomPriceStd(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceStd", BigDecimal.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyOnHand"), "bomQtyOnHand(p.M_Product_ID,?,0) AS QtyOnHand", Double.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyReserved"), "bomQtyReserved(p.M_Product_ID,?,0) AS QtyReserved", Double.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyOrdered"), "bomQtyOrdered(p.M_Product_ID,?,0) AS QtyOrdered", Double.class));
|
||||||
|
/*if (isUnconfirmed())
|
||||||
|
{
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyUnconfirmed"), "(SELECT SUM(c.TargetQty) FROM M_InOutLineConfirm c INNER JOIN M_InOutLine il ON (c.M_InOutLine_ID=il.M_InOutLine_ID) INNER JOIN M_InOut i ON (il.M_InOut_ID=i.M_InOut_ID) WHERE c.Processed='N' AND i.M_Warehouse_ID=? AND il.M_Product_ID=p.M_Product_ID) AS QtyUnconfirmed", Double.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "QtyUnconfirmedMove"), "(SELECT SUM(c.TargetQty) FROM M_MovementLineConfirm c INNER JOIN M_MovementLine ml ON (c.M_MovementLine_ID=ml.M_MovementLine_ID) INNER JOIN M_Locator l ON (ml.M_LocatorTo_ID=l.M_Locator_ID) WHERE c.Processed='N' AND l.M_Warehouse_ID=? AND ml.M_Product_ID=p.M_Product_ID) AS QtyUnconfirmedMove", Double.class));
|
||||||
|
}*/
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "Margin"), "bomPriceStd(p.M_Product_ID, pr.M_PriceList_Version_ID)-bomPriceLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS Margin", BigDecimal.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "PriceLimit"), "bomPriceLimit(p.M_Product_ID, pr.M_PriceList_Version_ID) AS PriceLimit", BigDecimal.class));
|
||||||
|
list.add(new Info_Column(Msg.translate(Env.getCtx(), "IsInstanceAttribute"), "pa.IsInstanceAttribute", Boolean.class));
|
||||||
|
s_productLayout = new Info_Column[list.size()];
|
||||||
|
list.toArray(s_productLayout);
|
||||||
|
//INDEX_NAME = 3;
|
||||||
|
//INDEX_PATTRIBUTE = s_productLayout.length - 1; // last item
|
||||||
|
return s_productLayout;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public DataRow getColumns() {
|
||||||
|
DataRow col = DataRow.Factory.newInstance();
|
||||||
|
DataField f = null;
|
||||||
|
f = col.addNewField(); //0
|
||||||
|
f.setType("int");
|
||||||
|
f.setLval("20, 0");
|
||||||
|
f.setColumn("key" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //1
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("1, 15");
|
||||||
|
f.setColumn("Discontinued" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //2
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("40, 110");
|
||||||
|
f.setColumn("Value" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //3
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("60, 140");
|
||||||
|
f.setColumn("Name" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //4
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("10, 50");
|
||||||
|
f.setColumn("QtyAvailable" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //5
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("10, 50");
|
||||||
|
f.setColumn("PriceList" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //6
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("10, 50");
|
||||||
|
f.setColumn("PriceStd" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //7
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("10, 50");
|
||||||
|
f.setColumn("QtyOnHand" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //8
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("10, 50");
|
||||||
|
f.setColumn("QtyReserved" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //9
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("10, 50");
|
||||||
|
f.setColumn("QtyOrdered" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //10
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("10, 50");
|
||||||
|
f.setColumn("Margin" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //10
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("10, 50");
|
||||||
|
f.setColumn("PriceLimit" );
|
||||||
|
|
||||||
|
f = col.addNewField(); //10
|
||||||
|
f.setType("string");
|
||||||
|
f.setLval("1, 20");
|
||||||
|
f.setColumn("IsInstanceAttribute" );
|
||||||
|
|
||||||
|
|
||||||
|
return col;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String getSQL() {
|
||||||
|
String dynWhere = getSQLWhere();
|
||||||
|
StringBuffer sql = new StringBuffer (m_sqlMain);
|
||||||
|
if (dynWhere.length() > 0)
|
||||||
|
sql.append(dynWhere); // includes first AND
|
||||||
|
|
||||||
|
sql.append(m_sqlOrder);
|
||||||
|
|
||||||
|
System.out.println( "GetSQL = "+sql.toString());
|
||||||
|
String dataSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables
|
||||||
|
dataSql = MRole.getDefault().addAccessSQL(dataSql, "p",
|
||||||
|
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||||
|
|
||||||
|
return dataSql;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getSQLCount() {
|
||||||
|
String dynWhere = getSQLWhere();
|
||||||
|
StringBuffer sql = new StringBuffer (m_sqlCount);
|
||||||
|
if (dynWhere.length() > 0)
|
||||||
|
sql.append(dynWhere); // includes first AND
|
||||||
|
|
||||||
|
String countSql = Msg.parseTranslation(Env.getCtx(), sql.toString()); // Variables
|
||||||
|
countSql = MRole.getDefault().addAccessSQL(countSql, "p",
|
||||||
|
MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
|
||||||
|
//log.finer(countSql);
|
||||||
|
|
||||||
|
|
||||||
|
return countSql;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Find Price List Version and update context
|
||||||
|
*
|
||||||
|
* @param M_PriceList_ID price list
|
||||||
|
* @return M_PriceList_Version_ID price list version
|
||||||
|
*/
|
||||||
|
private int findPLV (int M_PriceList_ID)
|
||||||
|
{
|
||||||
|
Timestamp priceDate = null;
|
||||||
|
// Sales Order Date
|
||||||
|
String dateStr = Env.getContext(m_ctx, p_WindowNo, "DateOrdered");
|
||||||
|
if (dateStr != null && dateStr.length() > 0)
|
||||||
|
priceDate = Env.getContextAsDate( m_ctx, p_WindowNo, "DateOrdered");
|
||||||
|
else // Invoice Date
|
||||||
|
{
|
||||||
|
dateStr = Env.getContext(m_ctx, p_WindowNo, "DateInvoiced");
|
||||||
|
if (dateStr != null && dateStr.length() > 0)
|
||||||
|
priceDate = Env.getContextAsDate(m_ctx, p_WindowNo, "DateInvoiced");
|
||||||
|
}
|
||||||
|
// Today
|
||||||
|
if (priceDate == null)
|
||||||
|
priceDate = new Timestamp(System.currentTimeMillis());
|
||||||
|
//
|
||||||
|
log.config("M_PriceList_ID=" + M_PriceList_ID + " - " + priceDate);
|
||||||
|
int retValue = 0;
|
||||||
|
String sql = "SELECT plv.M_PriceList_Version_ID, plv.ValidFrom "
|
||||||
|
+ "FROM M_PriceList pl, M_PriceList_Version plv "
|
||||||
|
+ "WHERE pl.M_PriceList_ID=plv.M_PriceList_ID"
|
||||||
|
+ " AND plv.IsActive='Y'"
|
||||||
|
+ " AND pl.M_PriceList_ID=? " // 1
|
||||||
|
+ "ORDER BY plv.ValidFrom DESC";
|
||||||
|
// find newest one
|
||||||
|
try
|
||||||
|
{
|
||||||
|
PreparedStatement pstmt = DB.prepareStatement(sql, null);
|
||||||
|
pstmt.setInt(1, M_PriceList_ID);
|
||||||
|
ResultSet rs = pstmt.executeQuery();
|
||||||
|
while (rs.next() && retValue == 0)
|
||||||
|
{
|
||||||
|
Timestamp plDate = rs.getTimestamp(2);
|
||||||
|
if (!priceDate.before(plDate))
|
||||||
|
retValue = rs.getInt(1);
|
||||||
|
}
|
||||||
|
rs.close();
|
||||||
|
pstmt.close();
|
||||||
|
}
|
||||||
|
catch (SQLException e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, sql, e);
|
||||||
|
}
|
||||||
|
Env.setContext(m_ctx, p_WindowNo, "M_PriceList_Version_ID", retValue);
|
||||||
|
return retValue;
|
||||||
|
} // findPLV
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,143 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* The contents of this file are subject to the Compiere License Version 1.1
|
||||||
|
* ("License"); You may not use this file except in compliance with the License
|
||||||
|
* You may obtain a copy of the License at http://www.compiere.org/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 Compiere ERP & CRM Smart Business Solution. The Initial
|
||||||
|
* Developer of the Original Code is Jorg Janke. Portions created by Jorg Janke
|
||||||
|
* are Copyright (C) 1999-2005 Jorg Janke.
|
||||||
|
* All parts are Copyright (C) 1999-2005 ComPiere, Inc. All Rights Reserved.
|
||||||
|
* Contributor(s): ______________________________________.
|
||||||
|
*****************************************************************************/
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Info Column Details
|
||||||
|
*
|
||||||
|
* @author Jorg Janke
|
||||||
|
* @version $Id: Info_Column.java,v 1.7 2005/12/17 19:55:47 jjanke Exp $
|
||||||
|
*/
|
||||||
|
public class Info_Column
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Create Info Column (r/o and not color column)
|
||||||
|
*
|
||||||
|
* @param colHeader Column Header
|
||||||
|
* @param colSQL SQL select code for column
|
||||||
|
* @param colClass class of column - determines display
|
||||||
|
*/
|
||||||
|
public Info_Column (String colHeader, String colSQL, Class colClass)
|
||||||
|
{
|
||||||
|
this(colHeader, colSQL, colClass, true, false, null);
|
||||||
|
} // Info_Column
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create Info Column (r/o and not color column)
|
||||||
|
*
|
||||||
|
* @param colHeader Column Header
|
||||||
|
* @param colSQL SQL select code for column
|
||||||
|
* @param colClass class of column - determines display
|
||||||
|
* @param IDcolSQL SQL select for the ID of the for the displayed column (KeyNamePair)
|
||||||
|
*/
|
||||||
|
public Info_Column (String colHeader, String colSQL, Class colClass, String IDcolSQL)
|
||||||
|
{
|
||||||
|
this(colHeader, colSQL, colClass, true, false, IDcolSQL);
|
||||||
|
} // Info_Column
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create Info Column
|
||||||
|
*
|
||||||
|
* @param colHeader Column Header
|
||||||
|
* @param colSQL SQL select code for column
|
||||||
|
* @param colClass class of column - determines display
|
||||||
|
* @param readOnly column is read only
|
||||||
|
* @param colorColumn if true, value of column determines foreground color
|
||||||
|
* @param IDcolSQL SQL select for the ID of the for the displayed column
|
||||||
|
*/
|
||||||
|
public Info_Column (String colHeader, String colSQL, Class colClass,
|
||||||
|
boolean readOnly, boolean colorColumn, String IDcolSQL)
|
||||||
|
{
|
||||||
|
setColHeader(colHeader);
|
||||||
|
setColSQL(colSQL);
|
||||||
|
setColClass(colClass);
|
||||||
|
setReadOnly(readOnly);
|
||||||
|
setColorColumn(colorColumn);
|
||||||
|
setIDcolSQL(IDcolSQL);
|
||||||
|
} // Info_Column
|
||||||
|
|
||||||
|
|
||||||
|
private String m_colHeader;
|
||||||
|
private String m_colSQL;
|
||||||
|
private Class m_colClass;
|
||||||
|
private boolean m_readOnly;
|
||||||
|
private boolean m_colorColumn;
|
||||||
|
private String m_IDcolSQL = "";
|
||||||
|
|
||||||
|
public Class getColClass()
|
||||||
|
{
|
||||||
|
return m_colClass;
|
||||||
|
}
|
||||||
|
public String getColHeader()
|
||||||
|
{
|
||||||
|
return m_colHeader;
|
||||||
|
}
|
||||||
|
public String getColSQL()
|
||||||
|
{
|
||||||
|
return m_colSQL;
|
||||||
|
}
|
||||||
|
public boolean isReadOnly()
|
||||||
|
{
|
||||||
|
return m_readOnly;
|
||||||
|
}
|
||||||
|
public void setColClass(Class colClass)
|
||||||
|
{
|
||||||
|
m_colClass = colClass;
|
||||||
|
}
|
||||||
|
public void setColHeader(String colHeader)
|
||||||
|
{
|
||||||
|
m_colHeader = colHeader;
|
||||||
|
if (colHeader != null)
|
||||||
|
{
|
||||||
|
int index = colHeader.indexOf('&');
|
||||||
|
if (index != -1)
|
||||||
|
m_colHeader = colHeader.substring(0, index) + colHeader.substring(index+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
public void setColSQL(String colSQL)
|
||||||
|
{
|
||||||
|
m_colSQL = colSQL;
|
||||||
|
}
|
||||||
|
public void setReadOnly(boolean readOnly)
|
||||||
|
{
|
||||||
|
m_readOnly = readOnly;
|
||||||
|
}
|
||||||
|
public void setColorColumn(boolean colorColumn)
|
||||||
|
{
|
||||||
|
m_colorColumn = colorColumn;
|
||||||
|
}
|
||||||
|
public boolean isColorColumn()
|
||||||
|
{
|
||||||
|
return m_colorColumn;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Add ID column SQL for the displayed column
|
||||||
|
* The Class for this should be KeyNamePair
|
||||||
|
*/
|
||||||
|
public void setIDcolSQL(String IDcolSQL)
|
||||||
|
{
|
||||||
|
m_IDcolSQL = IDcolSQL;
|
||||||
|
if (m_IDcolSQL == null)
|
||||||
|
m_IDcolSQL = "";
|
||||||
|
}
|
||||||
|
public String getIDcolSQL()
|
||||||
|
{
|
||||||
|
return m_IDcolSQL;
|
||||||
|
}
|
||||||
|
public boolean isIDcol()
|
||||||
|
{
|
||||||
|
return m_IDcolSQL.length() > 0;
|
||||||
|
}
|
||||||
|
} // infoColumn
|
||||||
|
|
|
@ -0,0 +1,69 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* This file is part of Adempiere ERP Bazaar *
|
||||||
|
* http://www.adempiere.org *
|
||||||
|
* *
|
||||||
|
* Copyright (C) Carlos Ruiz - globalqss *
|
||||||
|
* Copyright (C) Contributors *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU General Public License *
|
||||||
|
* as published by the Free Software Foundation; either version 2 *
|
||||||
|
* of the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the Free Software *
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||||
|
* MA 02110-1301, USA. *
|
||||||
|
* *
|
||||||
|
* Contributors: *
|
||||||
|
* - Carlos Ruiz (globalqss@users.sourceforge.net) *
|
||||||
|
* *
|
||||||
|
* Sponsors: *
|
||||||
|
* - GlobalQSS (http://www.globalqss.com) *
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
|
||||||
|
import javax.jws.WebService;
|
||||||
|
import javax.jws.soap.SOAPBinding;
|
||||||
|
import javax.jws.soap.SOAPBinding.ParameterStyle;
|
||||||
|
import javax.jws.soap.SOAPBinding.Style;
|
||||||
|
import javax.jws.soap.SOAPBinding.Use;
|
||||||
|
|
||||||
|
import pl.x3E.adInterface.ModelCRUDRequestDocument;
|
||||||
|
import pl.x3E.adInterface.ModelGetListRequestDocument;
|
||||||
|
import pl.x3E.adInterface.ModelRunProcessRequestDocument;
|
||||||
|
import pl.x3E.adInterface.ModelSetDocActionRequestDocument;
|
||||||
|
import pl.x3E.adInterface.RunProcessResponseDocument;
|
||||||
|
import pl.x3E.adInterface.StandardResponseDocument;
|
||||||
|
import pl.x3E.adInterface.WindowTabDataDocument;
|
||||||
|
|
||||||
|
@WebService(targetNamespace="http://3e.pl/ADInterface")
|
||||||
|
@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED)
|
||||||
|
public interface ModelADService {
|
||||||
|
|
||||||
|
/* Model oriented web services */
|
||||||
|
|
||||||
|
public StandardResponseDocument setDocAction(ModelSetDocActionRequestDocument req);
|
||||||
|
|
||||||
|
public RunProcessResponseDocument runProcess(ModelRunProcessRequestDocument req);
|
||||||
|
|
||||||
|
public WindowTabDataDocument getList(ModelGetListRequestDocument req);
|
||||||
|
|
||||||
|
public StandardResponseDocument createData(ModelCRUDRequestDocument req);
|
||||||
|
|
||||||
|
public StandardResponseDocument updateData(ModelCRUDRequestDocument req);
|
||||||
|
|
||||||
|
public StandardResponseDocument deleteData(ModelCRUDRequestDocument req);
|
||||||
|
|
||||||
|
public WindowTabDataDocument readData(ModelCRUDRequestDocument req);
|
||||||
|
|
||||||
|
public WindowTabDataDocument queryData(ModelCRUDRequestDocument req);
|
||||||
|
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,344 @@
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
import java.io.BufferedWriter;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
|
import java.io.FileWriter;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.io.Writer;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.apache.ecs.XhtmlDocument;
|
||||||
|
import org.apache.ecs.xhtml.h1;
|
||||||
|
import org.apache.ecs.xhtml.i;
|
||||||
|
import org.apache.ecs.xhtml.style;
|
||||||
|
import org.apache.ecs.xhtml.table;
|
||||||
|
import org.apache.ecs.xhtml.td;
|
||||||
|
import org.apache.ecs.xhtml.th;
|
||||||
|
import org.apache.ecs.xhtml.tr;
|
||||||
|
import org.compiere.model.MOrg;
|
||||||
|
import org.compiere.model.MQuery;
|
||||||
|
import org.compiere.print.MPrintFormat;
|
||||||
|
import org.compiere.print.MPrintFormatItem;
|
||||||
|
import org.compiere.print.PrintData;
|
||||||
|
import org.compiere.print.PrintDataElement;
|
||||||
|
import org.compiere.print.ReportEngine;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DisplayType;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Language;
|
||||||
|
import org.compiere.util.Util;
|
||||||
|
|
||||||
|
|
||||||
|
public class ReportEngineEx { //extends ReportEngine {
|
||||||
|
|
||||||
|
|
||||||
|
private static CLogger log = CLogger.getCLogger(ReportEngineEx.class);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Create EXCEL HTML File
|
||||||
|
* @param file file
|
||||||
|
* @param onlyTable if false create complete HTML document
|
||||||
|
* @param language optional language - if null the default language is used to format nubers/dates
|
||||||
|
* @return true if success
|
||||||
|
*/
|
||||||
|
public static boolean createEXCEL_HTML (ReportEngine re, Properties m_ctx, File file, boolean onlyTable, Language language)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Language lang = language;
|
||||||
|
if (lang == null)
|
||||||
|
lang = Language.getLoginLanguage();
|
||||||
|
FileWriter fw = new FileWriter (file, false);
|
||||||
|
return createEXCEL_HTML (re, m_ctx, new BufferedWriter(fw), onlyTable, lang);
|
||||||
|
}
|
||||||
|
catch (FileNotFoundException fnfe)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, "(f) - " + fnfe.toString());
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, "(f)", e);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} // createHTML
|
||||||
|
|
||||||
|
public static boolean createEXCEL_HTML_wr (ReportEngine re, Properties m_ctx, Writer wr, boolean onlyTable, Language language)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Language lang = language;
|
||||||
|
if (lang == null)
|
||||||
|
lang = Language.getLoginLanguage();
|
||||||
|
//FileWriter fw = new FileWriter (file, false);
|
||||||
|
return createEXCEL_HTML (re, m_ctx, new BufferedWriter(wr), onlyTable, lang);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, "(f)", e);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} // createHTML
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Write EXCEL HTML to writer
|
||||||
|
* @param writer writer
|
||||||
|
* @param onlyTable if false create complete HTML document
|
||||||
|
* @param language optional language - if null nubers/dates are not formatted
|
||||||
|
* @return true if success
|
||||||
|
*/
|
||||||
|
public static boolean createEXCEL_HTML (ReportEngine re, Properties m_ctx, Writer writer, boolean onlyTable, Language language)
|
||||||
|
{
|
||||||
|
|
||||||
|
PrintData m_printData = re.getPrintData();
|
||||||
|
MPrintFormat m_printFormat = re.getPrintFormat();
|
||||||
|
///Properties m_ctx = new Properties();
|
||||||
|
MQuery m_query = re.getQuery();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
table table = new table();
|
||||||
|
//
|
||||||
|
// for all rows (-1 = header row)
|
||||||
|
for (int row = -1; row < m_printData.getRowCount(); row++)
|
||||||
|
{
|
||||||
|
tr tr = new tr();
|
||||||
|
table.addElement(tr);
|
||||||
|
if (row != -1)
|
||||||
|
m_printData.setRowIndex(row);
|
||||||
|
// for all columns
|
||||||
|
for (int col = 0; col < m_printFormat.getItemCount(); col++)
|
||||||
|
{
|
||||||
|
MPrintFormatItem item = m_printFormat.getItem(col);
|
||||||
|
if (item.isPrinted())
|
||||||
|
{
|
||||||
|
// header row
|
||||||
|
if (row == -1)
|
||||||
|
{
|
||||||
|
th th = new th();
|
||||||
|
tr.addElement(th);
|
||||||
|
th.addElement(Util.maskHTML(item.getPrintName(language)));
|
||||||
|
th.setClass("xl_head");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
td td = new td();
|
||||||
|
tr.addElement(td);
|
||||||
|
Object obj = m_printData.getNode(new Integer(item.getAD_Column_ID()));
|
||||||
|
if (obj == null)
|
||||||
|
td.addElement(" ");
|
||||||
|
else if (obj instanceof PrintDataElement)
|
||||||
|
{
|
||||||
|
String value = ((PrintDataElement)obj).getValueDisplay(null); // formatted
|
||||||
|
int displayType = ((PrintDataElement)obj).getDisplayType();
|
||||||
|
if (((PrintDataElement)obj).isNumeric())
|
||||||
|
{
|
||||||
|
if (displayType == DisplayType.Integer)
|
||||||
|
{
|
||||||
|
td.addAttribute("x:num", value);
|
||||||
|
td.addElement(Util.maskHTML(value));
|
||||||
|
}
|
||||||
|
else if (displayType == DisplayType.Quantity)
|
||||||
|
{
|
||||||
|
td.addAttribute("x:num", value);
|
||||||
|
td.addElement(Util.maskHTML(value));
|
||||||
|
}
|
||||||
|
else if (displayType == DisplayType.Amount)
|
||||||
|
{
|
||||||
|
td.addAttribute("x:num", value);
|
||||||
|
td.addElement(Util.maskHTML(value));
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (displayType == DisplayType.CostPrice)
|
||||||
|
{
|
||||||
|
td.addAttribute("x:num", "");
|
||||||
|
td.addAttribute("u1:num", value);
|
||||||
|
td.setClass("xl25");
|
||||||
|
td.addElement(Util.maskHTML(value));
|
||||||
|
}
|
||||||
|
//else if (displayType == DisplayType.YesNo)
|
||||||
|
//{
|
||||||
|
|
||||||
|
//}
|
||||||
|
else // if (displayType == Number)
|
||||||
|
{
|
||||||
|
td.addElement(Util.maskHTML(value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (((PrintDataElement)obj).isDate())
|
||||||
|
{
|
||||||
|
if (displayType == DisplayType.Date)
|
||||||
|
{
|
||||||
|
td.setClass("xl24");
|
||||||
|
td.addElement(Util.maskHTML(value));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (displayType == DisplayType.DateTime)
|
||||||
|
{
|
||||||
|
td.setClass("xl26");
|
||||||
|
td.addElement(Util.maskHTML(value));
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
td.addElement(Util.maskHTML(value));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
|
||||||
|
td.addElement(Util.maskHTML(value));
|
||||||
|
}
|
||||||
|
else if (obj instanceof PrintData)
|
||||||
|
{
|
||||||
|
// ignore contained Data
|
||||||
|
}
|
||||||
|
else
|
||||||
|
log.log(Level.SEVERE, "createHTML - Element not PrintData(Element) " + obj.getClass());
|
||||||
|
}
|
||||||
|
} // printed
|
||||||
|
} // for all columns
|
||||||
|
} // for all rows
|
||||||
|
|
||||||
|
table table1 = new table();
|
||||||
|
table1.setBorder(0).setCols(10).setCellPadding(0).setCellSpacing(2);
|
||||||
|
table1.addElement( new tr().addElement(new td().setColSpan(10).addElement(new h1(re.getName())).setStyle("border:none;")));
|
||||||
|
tr tr1;
|
||||||
|
String tmp = "Jednostka: ";
|
||||||
|
MOrg o = MOrg.get(m_ctx, Env.getAD_Org_ID(m_ctx));
|
||||||
|
tmp += o.getName();
|
||||||
|
tr1 = new tr();
|
||||||
|
tr1.addElement( new td().addElement( tmp ).setColSpan(10).setStyle("border:none;") );
|
||||||
|
table1.addElement( tr1 );
|
||||||
|
|
||||||
|
java.text.DateFormat dateFormat = java.text.DateFormat.getDateInstance(java.text.DateFormat.FULL, new Locale("pl_PL"));
|
||||||
|
String dateData = "Czas wygenerowania: "+dateFormat.format(new java.util.Date());
|
||||||
|
tr1 = new tr();
|
||||||
|
tr1.addElement( new td().addElement( dateData ).setColSpan(10).setStyle("border:none;") );
|
||||||
|
table1.addElement( tr1 );
|
||||||
|
|
||||||
|
for (int r = 0; r < m_query.getRestrictionCount(); r++)
|
||||||
|
{
|
||||||
|
tr1 = new tr();
|
||||||
|
td td1 = new td().addElement(
|
||||||
|
new i(m_query.getInfoName(r)));
|
||||||
|
td1.addElement( " " +
|
||||||
|
m_query.getInfoOperator(r) + " " +
|
||||||
|
m_query.getInfoDisplayAll(r) ).setColSpan( 10 );
|
||||||
|
|
||||||
|
td1.setStyle("border:none;");
|
||||||
|
|
||||||
|
tr1.addElement(td1);
|
||||||
|
table1.addElement(tr1);
|
||||||
|
}
|
||||||
|
tr1 = new tr();
|
||||||
|
tr1.addElement( new td().addElement( " " ).setColSpan(10).setStyle("border:none;height:20px;") );
|
||||||
|
table1.addElement(tr1);
|
||||||
|
|
||||||
|
//
|
||||||
|
PrintWriter w = new PrintWriter(writer);
|
||||||
|
if (onlyTable)
|
||||||
|
table.output(w);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
XhtmlDocument doc = new XhtmlDocument();
|
||||||
|
|
||||||
|
String st =
|
||||||
|
"<!--table "+
|
||||||
|
" {mso-displayed-decimal-separator:\".\"; "+
|
||||||
|
" mso-displayed-thousand-separator:\" \";} "+
|
||||||
|
"@page "+
|
||||||
|
" {margin:.98in .79in .98in .79in; "+
|
||||||
|
" mso-header-margin:.5in; "+
|
||||||
|
" mso-footer-margin:.5in;} "+
|
||||||
|
"tr "+
|
||||||
|
" {mso-height-source:auto;} "+
|
||||||
|
"col "+
|
||||||
|
" {mso-width-source:auto;} "+
|
||||||
|
"br "+
|
||||||
|
" {mso-data-placement:same-cell;} "+
|
||||||
|
".style0 "+
|
||||||
|
" {mso-number-format:General; "+
|
||||||
|
" text-align:general; "+
|
||||||
|
" vertical-align:bottom; "+
|
||||||
|
" white-space:nowrap; "+
|
||||||
|
" mso-rotate:0; "+
|
||||||
|
" mso-background-source:auto; "+
|
||||||
|
" mso-pattern:auto; "+
|
||||||
|
" color:windowtext; "+
|
||||||
|
" font-size:10.0pt; "+
|
||||||
|
" font-weight:400; "+
|
||||||
|
" font-style:normal; "+
|
||||||
|
" text-decoration:none; "+
|
||||||
|
" font-family:Arial; "+
|
||||||
|
" mso-generic-font-family:auto; "+
|
||||||
|
" mso-font-charset:238; "+
|
||||||
|
" border:none; "+
|
||||||
|
" mso-protection:locked visible; "+
|
||||||
|
" mso-style-name:Normalny; "+
|
||||||
|
" mso-style-id:0;} "+
|
||||||
|
"td "+
|
||||||
|
" {mso-style-parent:style0; "+
|
||||||
|
" padding-top:1px; "+
|
||||||
|
" padding-right:1px; "+
|
||||||
|
" padding-left:1px; "+
|
||||||
|
" mso-ignore:padding; "+
|
||||||
|
" color:windowtext; "+
|
||||||
|
" font-size:10.0pt; "+
|
||||||
|
" font-weight:400; "+
|
||||||
|
" font-style:normal; "+
|
||||||
|
" text-decoration:none; "+
|
||||||
|
" font-family:Arial; "+
|
||||||
|
" mso-generic-font-family:auto; "+
|
||||||
|
" mso-font-charset:238; "+
|
||||||
|
" mso-number-format:General; "+
|
||||||
|
" text-align:general; "+
|
||||||
|
" vertical-align:bottom; "+
|
||||||
|
//" border:none; "+
|
||||||
|
"border:.5pt solid #a0a0a0; "+ //windowtext
|
||||||
|
" mso-background-source:auto; "+
|
||||||
|
" mso-pattern:auto; "+
|
||||||
|
" mso-protection:locked visible; "+
|
||||||
|
" white-space:nowrap; "+
|
||||||
|
" mso-rotate:0;} "+
|
||||||
|
".xl24 "+
|
||||||
|
"{mso-style-parent:style0; "+
|
||||||
|
"mso-number-format:\"Short Date\";} "+
|
||||||
|
".xl25 "+
|
||||||
|
"{mso-style-parent:style0; "+
|
||||||
|
"mso-number-format:Fixed;} "+
|
||||||
|
".xl26 "+
|
||||||
|
"{mso-style-parent:style0; "+
|
||||||
|
"mso-number-format:\"yy\\/mm\\/dd\\ h\\:mm\\;\\@\";} "+
|
||||||
|
".xl_head "+
|
||||||
|
"{text-align:center; mso-style-parent:style0; "+
|
||||||
|
"font-weight:700; "+
|
||||||
|
"font-family:Arial, sans-serif; "+
|
||||||
|
"mso-font-charset:238; "+
|
||||||
|
"border:.5pt solid windowtext; "+
|
||||||
|
"background:silver; "+
|
||||||
|
"mso-pattern:auto none;} "+
|
||||||
|
"--> ";
|
||||||
|
|
||||||
|
doc.appendHead( new style().addElement(st));
|
||||||
|
doc.appendBody( table1 );
|
||||||
|
doc.appendBody(table);
|
||||||
|
doc.output(w);
|
||||||
|
}
|
||||||
|
w.flush();
|
||||||
|
w.close();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, "createHTML(w)", e);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} // createHTML
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,200 @@
|
||||||
|
package com._3e.ADInterface;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import org.compiere.model.GridTab;
|
||||||
|
import org.compiere.model.GridWindow;
|
||||||
|
import org.compiere.model.GridWindowVO;
|
||||||
|
import org.compiere.model.MQuery;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ADEMPIERE/COMPIERE
|
||||||
|
*
|
||||||
|
* A:
|
||||||
|
* Replace GridWindowVO with GridWindowVO
|
||||||
|
* GridWindow with GridWindow
|
||||||
|
* GridTab with GridTab
|
||||||
|
*/
|
||||||
|
|
||||||
|
public class WWindowStatus
|
||||||
|
{
|
||||||
|
public class AD_WrongTabException extends Exception
|
||||||
|
{
|
||||||
|
public AD_WrongTabException( String msg ) {
|
||||||
|
super(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static WWindowStatus get (Map cache, int WinNo, boolean changeTab, int TabNo, boolean changeRow, /*int RowNo*/int RecordID ) //throws AD_WrongTabException
|
||||||
|
{
|
||||||
|
WWindowStatus ws = (WWindowStatus)cache.get(new Integer(WinNo));
|
||||||
|
if (ws != null)
|
||||||
|
{
|
||||||
|
if (changeTab &&ws.curTab.getTabNo()!=TabNo)
|
||||||
|
{
|
||||||
|
//if (!changeTab)
|
||||||
|
// return null;
|
||||||
|
//throw ws.new AD_WrongTabException("");
|
||||||
|
WWindowStatus.changeTabIfNeeded( ws, TabNo );
|
||||||
|
ws.updateRecIDMap();
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
if (changeRow)
|
||||||
|
{
|
||||||
|
if (RowNo<0) RowNo = 0;
|
||||||
|
if (ws.curTab.getCurrentRow() != RowNo)
|
||||||
|
{
|
||||||
|
int r = ws.curTab.navigate(RowNo);
|
||||||
|
if (r==-1)
|
||||||
|
ws.curTab.dataRefresh();
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
// zakladamy ze dostajemy teraz RecordID zamiast RowNo;
|
||||||
|
if (changeRow) {
|
||||||
|
int RowNo = ws.getRowNoFromRecordID( RecordID );
|
||||||
|
|
||||||
|
if (RowNo<0) RowNo = 0;
|
||||||
|
if (ws.curTab.getCurrentRow() != RowNo)
|
||||||
|
{
|
||||||
|
int r = ws.curTab.navigate(RowNo);
|
||||||
|
if (r==-1)
|
||||||
|
ws.curTab.dataRefresh();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// ADEMPIERE/COMPIERE
|
||||||
|
if (ws!=null && !ws.curTab.getTableModel().isOpen())
|
||||||
|
ws.curTab.getTableModel().
|
||||||
|
open(0); // adempiere
|
||||||
|
//open(); // compiere
|
||||||
|
|
||||||
|
return ws;
|
||||||
|
} // get
|
||||||
|
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Constructor - First Tab - First Row - Single Row.
|
||||||
|
* <br>
|
||||||
|
* Initialize Formats
|
||||||
|
* @param GridWindowVO window VO
|
||||||
|
*/
|
||||||
|
public WWindowStatus ( GridWindowVO GridWindowVO)
|
||||||
|
{
|
||||||
|
mWindow = new GridWindow(GridWindowVO);
|
||||||
|
curTab = mWindow.getTab(0);
|
||||||
|
curTab.setSingleRow(true);
|
||||||
|
|
||||||
|
ctx = GridWindowVO.ctx;
|
||||||
|
m_needSave = false;
|
||||||
|
|
||||||
|
ads = new ADDataStatusListener(ctx);
|
||||||
|
curTab.addDataStatusListener( ads );
|
||||||
|
|
||||||
|
RecordIDMap = new HashMap<Integer, Integer>();
|
||||||
|
} // WWindowStatus
|
||||||
|
|
||||||
|
|
||||||
|
/** The GridWindow */
|
||||||
|
protected GridWindow mWindow;
|
||||||
|
/** The current GridTab */
|
||||||
|
protected GridTab curTab;
|
||||||
|
|
||||||
|
|
||||||
|
/** Window Context */
|
||||||
|
public Properties ctx = null;
|
||||||
|
|
||||||
|
public ADDataStatusListener ads = null;
|
||||||
|
|
||||||
|
public int TabNo = 0;
|
||||||
|
public MQuery findQuery = null;
|
||||||
|
public boolean hasFindParams = false;
|
||||||
|
public boolean findQueryApplied = false;
|
||||||
|
public boolean m_needSave = false;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* String representation
|
||||||
|
* @return String representation
|
||||||
|
*/
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "WWindowStatus[" + mWindow
|
||||||
|
+ " - " + curTab + "]";
|
||||||
|
} // toString
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public static void changeTabIfNeeded(WWindowStatus ws, int TabNo)
|
||||||
|
{
|
||||||
|
if (ws.curTab.getTabNo() != TabNo) // tab change
|
||||||
|
{
|
||||||
|
//ws.curTab = ws.mWindow.getTab(TabNo);
|
||||||
|
if (TabNo > ws.curTab.getTabNo())
|
||||||
|
{
|
||||||
|
//if (ws.curTab.getTableModel().isInserting() ) // kolec
|
||||||
|
// return;
|
||||||
|
|
||||||
|
ws.curTab.removeDataStatusListener( ws.ads );
|
||||||
|
// ADEMPIERE/COMPIERE
|
||||||
|
ws.mWindow.initTab(TabNo); //adempiere specific
|
||||||
|
ws.curTab = ws.mWindow.getTab(TabNo);
|
||||||
|
ws.curTab.addDataStatusListener( ws.ads );
|
||||||
|
ws.curTab.query(ws.mWindow.isTransaction()); // false
|
||||||
|
ws.curTab.navigate(0);
|
||||||
|
ws.m_needSave = false;
|
||||||
|
ws.updateRecIDMap();
|
||||||
|
}
|
||||||
|
// move back
|
||||||
|
else if (TabNo < ws.curTab.getTabNo())
|
||||||
|
{
|
||||||
|
ws.curTab.removeDataStatusListener( ws.ads );
|
||||||
|
// ADEMPIERE/COMPIERE
|
||||||
|
ws.mWindow.initTab(TabNo); //adempiere specific
|
||||||
|
ws.curTab = ws.mWindow.getTab(TabNo);
|
||||||
|
ws.curTab.addDataStatusListener( ws.ads );
|
||||||
|
// ws.curTab.dataRefresh(); // bylo
|
||||||
|
ws.curTab.query(ws.mWindow.isTransaction()); // false
|
||||||
|
ws.curTab.navigate(0);
|
||||||
|
ws.m_needSave = false;
|
||||||
|
ws.updateRecIDMap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Map<Integer, Integer> RecordIDMap = null;
|
||||||
|
|
||||||
|
public int getRowNoFromRecordID( int RecordID ) {
|
||||||
|
Integer rowNo = this.RecordIDMap.get( RecordID );
|
||||||
|
if (rowNo == null) rowNo = new Integer(-1);
|
||||||
|
System.out.println("getRowNo From RecID "+RecordID+" = "+rowNo.intValue());
|
||||||
|
return rowNo.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public Map<Integer, Integer> getRecordIDMap() {
|
||||||
|
return RecordIDMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void updateRecIDMap() {
|
||||||
|
int rc = curTab.getRowCount();
|
||||||
|
int initRowNo = 0;
|
||||||
|
|
||||||
|
//Map<Integer, Integer> RecordIDMap = ws.getRecordIDMap();
|
||||||
|
|
||||||
|
RecordIDMap.clear();
|
||||||
|
|
||||||
|
for (int lineNo = initRowNo; lineNo < rc; lineNo++)
|
||||||
|
{
|
||||||
|
int recID = curTab.getKeyID( lineNo );
|
||||||
|
//System.out.println(""+lineNo+" - "+recID);
|
||||||
|
RecordIDMap.put( recID, lineNo );
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
} // WWindowStatus
|
|
@ -0,0 +1,22 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.adaxa.ws;
|
||||||
|
|
||||||
|
import javax.jws.WebService;
|
||||||
|
import javax.jws.soap.SOAPBinding;
|
||||||
|
import javax.jws.soap.SOAPBinding.ParameterStyle;
|
||||||
|
import javax.jws.soap.SOAPBinding.Style;
|
||||||
|
import javax.jws.soap.SOAPBinding.Use;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ashley
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@WebService(targetNamespace="http://3e.pl/ADInterface")
|
||||||
|
@SOAPBinding(style=Style.RPC,use=Use.LITERAL,parameterStyle=ParameterStyle.WRAPPED)
|
||||||
|
public interface WebstoreService
|
||||||
|
{
|
||||||
|
public ProcessResponseDocument runProcess(ProcessRequestDocument requestDoc);
|
||||||
|
}
|
|
@ -0,0 +1,579 @@
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
package com.adaxa.ws;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import javax.jws.WebService;
|
||||||
|
|
||||||
|
import org.adempiere.exceptions.AdempiereException;
|
||||||
|
import org.compiere.model.Lookup;
|
||||||
|
import org.compiere.model.MPInstance;
|
||||||
|
import org.compiere.model.MPInstancePara;
|
||||||
|
import org.compiere.model.MProcess;
|
||||||
|
import org.compiere.model.MProcessPara;
|
||||||
|
import org.compiere.model.MWebService;
|
||||||
|
import org.compiere.model.MWebServiceType;
|
||||||
|
import org.compiere.model.X_WS_WebServiceMethod;
|
||||||
|
import org.compiere.model.X_WS_WebService_Para;
|
||||||
|
import org.compiere.process.ProcessInfo;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.DisplayType;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
import org.compiere.util.Login;
|
||||||
|
import org.compiere.util.NamePair;
|
||||||
|
import org.compiere.util.Trx;
|
||||||
|
import org.compiere.util.ValueNamePair;
|
||||||
|
|
||||||
|
import com._3e.ADInterface.CompiereService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ashley
|
||||||
|
*/
|
||||||
|
@WebService(endpointInterface="com.adaxa.ws.WebstoreService", serviceName="WebstoreService", targetNamespace="http://3e.pl/ADInterface")
|
||||||
|
public class WebstoreServiceImpl implements WebstoreService
|
||||||
|
{
|
||||||
|
|
||||||
|
protected static final CLogger logger = CLogger
|
||||||
|
.getCLogger(WebstoreService.class);
|
||||||
|
public static final String WEB_SERVICE_NAME = "WebstoreService";
|
||||||
|
private CompiereService compiereService;
|
||||||
|
private MWebService webService;
|
||||||
|
private X_WS_WebServiceMethod webServiceMethod;
|
||||||
|
private MWebServiceType webServiceType;
|
||||||
|
|
||||||
|
public WebstoreServiceImpl()
|
||||||
|
{
|
||||||
|
compiereService = new CompiereService();
|
||||||
|
compiereService.connect();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void login(LoginRequest loginRequest) throws Exception
|
||||||
|
{
|
||||||
|
Login login = new Login(compiereService.getM_ctx());
|
||||||
|
|
||||||
|
// Validate user credentials
|
||||||
|
KeyNamePair[] roles = login.getRoles(loginRequest.getUser(),
|
||||||
|
loginRequest.getPass());
|
||||||
|
|
||||||
|
if (roles == null)
|
||||||
|
{
|
||||||
|
throw new Exception("Login Error: Invalid user credentials");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate role
|
||||||
|
KeyNamePair loginRole = null;
|
||||||
|
for (KeyNamePair role : roles)
|
||||||
|
{
|
||||||
|
if (role.getKey() == loginRequest.getRoleID())
|
||||||
|
{
|
||||||
|
loginRole = role;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loginRole == null)
|
||||||
|
{
|
||||||
|
throw new Exception(
|
||||||
|
"Login Error: Role is not allowed for this user");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate client
|
||||||
|
KeyNamePair[] clients = login.getClients(loginRole);
|
||||||
|
|
||||||
|
if (clients == null)
|
||||||
|
{
|
||||||
|
throw new Exception(
|
||||||
|
"Login Error: Client is not allowed for this user with the defined role");
|
||||||
|
}
|
||||||
|
|
||||||
|
KeyNamePair loginClient = null;
|
||||||
|
for (KeyNamePair client : clients)
|
||||||
|
{
|
||||||
|
if (client.getKey() == loginRequest.getClientID())
|
||||||
|
{
|
||||||
|
loginClient = client;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loginClient == null)
|
||||||
|
{
|
||||||
|
throw new Exception(
|
||||||
|
"Login Error: Client is not allowed for this user with the defined role");
|
||||||
|
}
|
||||||
|
|
||||||
|
compiereService.getM_ctx().setProperty("#AD_Client_ID", "" + loginRequest.getClientID());
|
||||||
|
|
||||||
|
// Validate org
|
||||||
|
KeyNamePair[] orgs = login.getOrgs(loginRole);
|
||||||
|
if (orgs == null)
|
||||||
|
{
|
||||||
|
throw new Exception(
|
||||||
|
"Login Error: Organization is not allowed for this user");
|
||||||
|
}
|
||||||
|
|
||||||
|
KeyNamePair loginOrg = null;
|
||||||
|
for (KeyNamePair org : orgs)
|
||||||
|
{
|
||||||
|
if (org.getKey() == loginRequest.getOrgID())
|
||||||
|
{
|
||||||
|
loginOrg = org;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loginOrg == null)
|
||||||
|
{
|
||||||
|
throw new Exception(
|
||||||
|
"Login Error: Organization is not allowed for this user");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Validate Warehouse
|
||||||
|
KeyNamePair[] warehouses = login.getWarehouses(loginOrg);
|
||||||
|
|
||||||
|
if (warehouses == null)
|
||||||
|
{
|
||||||
|
throw new Exception(
|
||||||
|
"Login Error: Warehouse is not allowed for this user");
|
||||||
|
}
|
||||||
|
|
||||||
|
KeyNamePair loginWarehouse = null;
|
||||||
|
for (KeyNamePair warehouse : warehouses)
|
||||||
|
{
|
||||||
|
if (warehouse.getKey() == loginRequest.getWarehouseID())
|
||||||
|
{
|
||||||
|
loginWarehouse = warehouse;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (loginWarehouse == null)
|
||||||
|
{
|
||||||
|
throw new Exception(
|
||||||
|
"Login Error: Warehouse is not allowed for this user");
|
||||||
|
}
|
||||||
|
|
||||||
|
String error = login.validateLogin(loginOrg);
|
||||||
|
|
||||||
|
if (error != null && error.length() > 0)
|
||||||
|
{
|
||||||
|
throw new Exception("Login Error: " + error);
|
||||||
|
}
|
||||||
|
|
||||||
|
int AD_User_ID = Env.getAD_User_ID(compiereService.getM_ctx());
|
||||||
|
|
||||||
|
if (!compiereService.login(AD_User_ID, loginRequest.getRoleID(),
|
||||||
|
loginRequest.getClientID(), loginRequest.getOrgID(),
|
||||||
|
loginRequest.getWarehouseID(), loginRequest.getLang()))
|
||||||
|
{
|
||||||
|
throw new Exception(
|
||||||
|
"Login Error: Could not initialize login details");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initWebServiceType(String webserviceValue, String methodValue,
|
||||||
|
String serviceTypeValue) throws Exception
|
||||||
|
{
|
||||||
|
webService = MWebService.get(compiereService.getM_ctx(),
|
||||||
|
webserviceValue);
|
||||||
|
if (webService == null || !webService.isActive())
|
||||||
|
{
|
||||||
|
throw new Exception("Web Service Configuration Error: Web Service "
|
||||||
|
+ webserviceValue + " not registered");
|
||||||
|
}
|
||||||
|
|
||||||
|
webServiceMethod = webService.getMethod(methodValue);
|
||||||
|
if (webServiceMethod == null || !webServiceMethod.isActive())
|
||||||
|
{
|
||||||
|
throw new Exception("Web Service Configuration Error: Method "
|
||||||
|
+ methodValue + " not registered");
|
||||||
|
}
|
||||||
|
|
||||||
|
String sql = "SELECT * FROM WS_WebServiceType "
|
||||||
|
+ "WHERE AD_Client_ID=? " + "AND WS_WebService_ID=? "
|
||||||
|
+ "AND WS_WebServiceMethod_ID=? " + "AND Value=? "
|
||||||
|
+ "AND IsActive='Y'";
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement(sql, null);
|
||||||
|
pstmt.setInt(1, compiereService.getM_AD_Client_ID());
|
||||||
|
pstmt.setInt(2, webService.getWS_WebService_ID());
|
||||||
|
pstmt.setInt(3, webServiceMethod.getWS_WebServiceMethod_ID());
|
||||||
|
pstmt.setString(4, serviceTypeValue);
|
||||||
|
rs = pstmt.executeQuery();
|
||||||
|
if (rs.next())
|
||||||
|
{
|
||||||
|
webServiceType = new MWebServiceType(
|
||||||
|
compiereService.getM_ctx(), rs, null);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
logger.log(Level.SEVERE, "Could not get web service type", ex);
|
||||||
|
throw new Exception(
|
||||||
|
"Web Service Error: Could not get web service with type '"
|
||||||
|
+ serviceTypeValue + "'");
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DB.close(rs, pstmt);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (webServiceType == null)
|
||||||
|
{
|
||||||
|
throw new Exception("Web Service Error: Web service type '"
|
||||||
|
+ serviceTypeValue + "' is not configured");
|
||||||
|
}
|
||||||
|
|
||||||
|
String accessSql = "SELECT IsReadWrite FROM WS_WebServiceTypeAccess WHERE AD_Role_ID=? "
|
||||||
|
+ "AND WS_WebServiceType_ID=? AND IsActive='Y'";
|
||||||
|
|
||||||
|
String hasAccess = DB.getSQLValueString(null, accessSql,
|
||||||
|
Env.getAD_Role_ID(compiereService.getM_ctx()),
|
||||||
|
webServiceType.get_ID());
|
||||||
|
|
||||||
|
if (!"Y".equals(hasAccess))
|
||||||
|
{
|
||||||
|
throw new Exception(
|
||||||
|
"Web Service Error: Login role does not have access to the service type");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
private <T> T formatValue(String value, Class<T> type) throws Exception
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (value == null)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else if (String.class == type)
|
||||||
|
{
|
||||||
|
return (T) value;
|
||||||
|
}
|
||||||
|
else if (value.trim().length() == 0)
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
else if (Integer.class == type)
|
||||||
|
{
|
||||||
|
return (T) Integer.valueOf(value);
|
||||||
|
}
|
||||||
|
else if (BigDecimal.class == type)
|
||||||
|
{
|
||||||
|
return (T) new BigDecimal(value);
|
||||||
|
}
|
||||||
|
else if (Boolean.class == type)
|
||||||
|
{
|
||||||
|
if ("Y".equalsIgnoreCase(value))
|
||||||
|
{
|
||||||
|
return (T) Boolean.TRUE;
|
||||||
|
}
|
||||||
|
else if ("N".equalsIgnoreCase(value))
|
||||||
|
{
|
||||||
|
return (T) Boolean.FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
|
return (T) Boolean.valueOf(value);
|
||||||
|
}
|
||||||
|
else if (Timestamp.class == type)
|
||||||
|
{
|
||||||
|
Date date = compiereService.dateFormat.parse(value);
|
||||||
|
return (T) new Timestamp(date.getTime());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
|
||||||
|
throw new Exception("Casting to type '"
|
||||||
|
+ type.getClass().getName() + "' is not defined");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
throw new Exception("Cannot cast parameter to type: "
|
||||||
|
+ type.getClass().getName() + ", cause: " + ex.getMessage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public String formatValue(Object value)
|
||||||
|
{
|
||||||
|
if (value == null)
|
||||||
|
{
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
else if (value instanceof Timestamp)
|
||||||
|
{
|
||||||
|
Date date = new Date(((Timestamp) value).getTime());
|
||||||
|
return compiereService.dateFormat.format(date);
|
||||||
|
}
|
||||||
|
|
||||||
|
return String.valueOf(value);
|
||||||
|
}
|
||||||
|
|
||||||
|
private <T> T getConstantParameterValue(MWebServiceType serviceType,
|
||||||
|
String parameterName, Class<T> type) throws Exception
|
||||||
|
{
|
||||||
|
X_WS_WebService_Para processIdParameter = webServiceType
|
||||||
|
.getParameter(parameterName);
|
||||||
|
|
||||||
|
if (processIdParameter == null
|
||||||
|
|| !X_WS_WebService_Para.PARAMETERTYPE_Constant
|
||||||
|
.equals(processIdParameter.getParameterType()))
|
||||||
|
{
|
||||||
|
logger.severe("Invalid configuration for '" + parameterName
|
||||||
|
+ "' parameter in the web service type: "
|
||||||
|
+ serviceType.getName());
|
||||||
|
throw new Exception("Web Service Error: Invalid configuraiton");
|
||||||
|
}
|
||||||
|
|
||||||
|
String parameterValue = processIdParameter.getConstantValue();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
return formatValue(parameterValue, type);
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
logger.severe("Error in formatting value, cause: "
|
||||||
|
+ ex.getMessage());
|
||||||
|
throw new Exception(
|
||||||
|
"Web Service Error: Invalid configuration for parameter '"
|
||||||
|
+ parameterName + "' and service type '"
|
||||||
|
+ serviceType.getName() + "'");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private MPInstance fillParameters(MProcess process,
|
||||||
|
Parameter parameters[], int recordId) throws Exception
|
||||||
|
{
|
||||||
|
MPInstance processInstance = new MPInstance(process, recordId);
|
||||||
|
MPInstancePara[] instanceParameters = processInstance.getParameters();
|
||||||
|
HashMap<String, String> parametersMap = new HashMap<String, String>();
|
||||||
|
for (Parameter parameter : parameters)
|
||||||
|
{
|
||||||
|
parametersMap.put(parameter.getName(), parameter.getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
for (int i = 0; i < instanceParameters.length; i++)
|
||||||
|
{
|
||||||
|
MPInstancePara instanceParameter = instanceParameters[i];
|
||||||
|
String parameterName = instanceParameter.getParameterName();
|
||||||
|
MProcessPara processParameter = process.getParameter(parameterName);
|
||||||
|
|
||||||
|
if (processParameter == null)
|
||||||
|
{
|
||||||
|
logger.severe("Parameter '" + parameterName
|
||||||
|
+ "' not found for process with value '"
|
||||||
|
+ process.getValue() + "'");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
int displayType = processParameter.getAD_Reference_ID();
|
||||||
|
|
||||||
|
String value = parametersMap.get(parameterName);
|
||||||
|
String valueTo = null;
|
||||||
|
|
||||||
|
if (value != null)
|
||||||
|
{
|
||||||
|
value = value.trim();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (processParameter.isRange())
|
||||||
|
{
|
||||||
|
valueTo = parametersMap.get(parameterName + "_2");
|
||||||
|
|
||||||
|
if (valueTo != null)
|
||||||
|
{
|
||||||
|
valueTo = valueTo.trim();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value != null && value.length() == 0)
|
||||||
|
value = null;
|
||||||
|
|
||||||
|
if (value != null
|
||||||
|
&& (DisplayType.List == displayType
|
||||||
|
|| DisplayType.TableDir == displayType || DisplayType.Table == displayType)
|
||||||
|
&& value.equals("-1"))
|
||||||
|
{
|
||||||
|
value = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (value == null && processParameter.isMandatory())
|
||||||
|
{
|
||||||
|
throw new Exception("Parameter '" + parameterName
|
||||||
|
+ "' is mandatory");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (DisplayType.isNumeric(displayType)
|
||||||
|
|| DisplayType.isID(displayType))
|
||||||
|
{
|
||||||
|
instanceParameter.setP_Number(formatValue(value,
|
||||||
|
BigDecimal.class));
|
||||||
|
if (processParameter.isRange())
|
||||||
|
{
|
||||||
|
instanceParameter.setP_Number_To(formatValue(valueTo,
|
||||||
|
BigDecimal.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (DisplayType.isDate(displayType))
|
||||||
|
{
|
||||||
|
instanceParameter
|
||||||
|
.setP_Date(formatValue(value, Timestamp.class));
|
||||||
|
if (processParameter.isRange())
|
||||||
|
{
|
||||||
|
instanceParameter.setP_Date_To(formatValue(valueTo,
|
||||||
|
Timestamp.class));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (DisplayType.YesNo == processParameter.getAD_Reference_ID())
|
||||||
|
{
|
||||||
|
boolean booleanValue = formatValue(value, Boolean.class);
|
||||||
|
instanceParameter.setP_String((booleanValue ? "Y" : "N"));
|
||||||
|
}
|
||||||
|
if (processParameter.isLookup())
|
||||||
|
{
|
||||||
|
Lookup lookup = processParameter.getLookup();
|
||||||
|
if (lookup != null)
|
||||||
|
{
|
||||||
|
NamePair namePair = lookup.getDirect(value, false, false);
|
||||||
|
if (namePair != null)
|
||||||
|
{
|
||||||
|
instanceParameter.setInfo(namePair.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
instanceParameter.setP_String(value);
|
||||||
|
instanceParameter.setP_String_To(valueTo);
|
||||||
|
}
|
||||||
|
|
||||||
|
instanceParameter.saveEx();
|
||||||
|
}
|
||||||
|
|
||||||
|
processInstance.saveEx();
|
||||||
|
|
||||||
|
return processInstance;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void fillOutputValues(MProcess process, ProcessInfo processInfo,
|
||||||
|
ProcessResponse processResponse)
|
||||||
|
{
|
||||||
|
if (processInfo.getSerializableObject() != null
|
||||||
|
&& processInfo.getSerializableObject() instanceof List)
|
||||||
|
{
|
||||||
|
List<?> outputValues = (List<?>) processInfo
|
||||||
|
.getSerializableObject();
|
||||||
|
for (Object obj : outputValues)
|
||||||
|
{
|
||||||
|
if (obj instanceof ValueNamePair)
|
||||||
|
{
|
||||||
|
ValueNamePair outputValueNamePair = (ValueNamePair)obj;
|
||||||
|
OutputData outputData = processResponse.addNewOuptutData();
|
||||||
|
outputData.setName(outputValueNamePair.getName());
|
||||||
|
outputData.setValue(formatValue(outputValueNamePair.getValueObject()));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProcessResponseDocument runProcess(ProcessRequestDocument requestDoc)
|
||||||
|
{
|
||||||
|
ProcessResponseDocument responseDoc = ProcessResponseDocument.Factory.newInstance();
|
||||||
|
ProcessResponse response = responseDoc.addNewProcessResponse();
|
||||||
|
|
||||||
|
LoginRequest loginRequest = requestDoc.getProcessRequest()
|
||||||
|
.getLoginRequest();
|
||||||
|
|
||||||
|
String serviceType = requestDoc.getProcessRequest().getServiceType();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
login(loginRequest);
|
||||||
|
initWebServiceType(WEB_SERVICE_NAME, "runProcess", serviceType);
|
||||||
|
String processValue = getConstantParameterValue(webServiceType,
|
||||||
|
"PROCESS", String.class);
|
||||||
|
|
||||||
|
int processId = MProcess.getProcess_ID(processValue, null);
|
||||||
|
|
||||||
|
if (processId <= 0)
|
||||||
|
{
|
||||||
|
logger.severe("Process with value '" + processValue + "' not found");
|
||||||
|
throw new Exception("Configuration error - Process not found");
|
||||||
|
}
|
||||||
|
|
||||||
|
MProcess process = MProcess.get(compiereService.getM_ctx(),
|
||||||
|
processId);
|
||||||
|
|
||||||
|
String accessSql = "SELECT IsReadWrite FROM AD_Process_Access "
|
||||||
|
+ "WHERE AD_Role_ID=? AND AD_Process_ID=? AND IsActive='Y'";
|
||||||
|
String hasAccess = DB.getSQLValueString(null, accessSql,
|
||||||
|
Env.getAD_Role_ID(compiereService.getM_ctx()), processId);
|
||||||
|
|
||||||
|
if (!"Y".equals(hasAccess))
|
||||||
|
{
|
||||||
|
throw new Exception("Configuration Error: Login role doesn not have access to the process");
|
||||||
|
}
|
||||||
|
|
||||||
|
Parameter[] parameters = requestDoc.getProcessRequest().getProcessData().getParameterArray();
|
||||||
|
MPInstance processInstance = fillParameters(process, parameters, 0);
|
||||||
|
|
||||||
|
ProcessInfo processInfo = new ProcessInfo (process.getName(), process.getAD_Process_ID());
|
||||||
|
processInfo.setAD_User_ID(Env.getAD_User_ID(compiereService.getM_ctx()));
|
||||||
|
processInfo.setAD_Client_ID(Env.getAD_Client_ID(compiereService.getM_ctx()));
|
||||||
|
processInfo.setAD_PInstance_ID(processInstance.getAD_PInstance_ID());
|
||||||
|
|
||||||
|
boolean success = false;
|
||||||
|
|
||||||
|
Trx trx = Trx.get(Trx.createTrxName("WSProcess"), true);
|
||||||
|
try
|
||||||
|
{
|
||||||
|
success = process.processIt(processInfo, trx);
|
||||||
|
fillOutputValues(process, processInfo, response);
|
||||||
|
trx.commit();
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
trx.rollback();
|
||||||
|
trx.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (success && !processInfo.isError())
|
||||||
|
{
|
||||||
|
response.setIsError(false);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
response.setIsError(true);
|
||||||
|
response.setError(processInfo.getSummary());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (AdempiereException ex)
|
||||||
|
{
|
||||||
|
response.setIsError(true);
|
||||||
|
response.setError(ex.getMessage());
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
response.setIsError(true);
|
||||||
|
response.setError(ex.getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return responseDoc;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,56 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* This file is part of Adempiere ERP Bazaar *
|
||||||
|
* http://www.adempiere.org *
|
||||||
|
* *
|
||||||
|
* Copyright (C) Carlos Ruiz - globalqss *
|
||||||
|
* Copyright (C) Contributors *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU General Public License *
|
||||||
|
* as published by the Free Software Foundation; either version 2 *
|
||||||
|
* of the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the Free Software *
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||||
|
* MA 02110-1301, USA. *
|
||||||
|
* *
|
||||||
|
* Contributors: *
|
||||||
|
* - Carlos Ruiz (globalqss@users.sourceforge.net) *
|
||||||
|
* *
|
||||||
|
* Sponsors: *
|
||||||
|
* - GlobalQSS (http://www.globalqss.com) *
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
package com.globalqss.ObPOSInterface;
|
||||||
|
|
||||||
|
import javax.jws.WebService;
|
||||||
|
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.ArrayOfTns1Order;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.ProductsCatalogResponseDocument;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.ProductsPlusCatalogResponseDocument;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.UploadOrdersResponseDocument;
|
||||||
|
|
||||||
|
@WebService
|
||||||
|
public interface ExternalSales {
|
||||||
|
|
||||||
|
public ProductsPlusCatalogResponseDocument getProductsPlusCatalog(int entityId, int organizationId, int salesChannel, String username, String password);
|
||||||
|
|
||||||
|
public UploadOrdersResponseDocument uploadOrders(int entityId, int organizationId, int salesChannel, ArrayOfTns1Order newOrders, String username, String password);
|
||||||
|
|
||||||
|
public ProductsCatalogResponseDocument getProductsCatalog(int entityId, int organizationId, int salesChannel, String username, String password);
|
||||||
|
|
||||||
|
/* methods to implement */
|
||||||
|
|
||||||
|
/*
|
||||||
|
|
||||||
|
public GetOrdersResponseDocument getOrders(GetOrdersRequestDocument req) throws XFireFault;
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,171 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* This file is part of Adempiere ERP Bazaar *
|
||||||
|
* http://www.adempiere.org *
|
||||||
|
* *
|
||||||
|
* Copyright (C) Carlos Ruiz - globalqss *
|
||||||
|
* Copyright (C) Contributors *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU General Public License *
|
||||||
|
* as published by the Free Software Foundation; either version 2 *
|
||||||
|
* of the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the Free Software *
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||||
|
* MA 02110-1301, USA. *
|
||||||
|
* *
|
||||||
|
* Contributors: *
|
||||||
|
* - Carlos Ruiz (globalqss@users.sourceforge.net) *
|
||||||
|
* *
|
||||||
|
* Sponsors: *
|
||||||
|
* - GlobalQSS (http://www.globalqss.com) *
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
package com.globalqss.ObPOSInterface;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.security.MessageDigest;
|
||||||
|
import java.security.NoSuchAlgorithmException;
|
||||||
|
|
||||||
|
import javax.xml.namespace.QName;
|
||||||
|
|
||||||
|
import org.apache.commons.codec.binary.Base64;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.SecureEngine;
|
||||||
|
import org.idempiere.webservices.fault.IdempiereServiceFault;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.ArrayOfTns1Order;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.ProductsCatalogResponse;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.ProductsCatalogResponseDocument;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.ProductsPlusCatalogResponse;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.ProductsPlusCatalogResponseDocument;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.UploadOrdersResponse;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.UploadOrdersResponseDocument;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ADEMPIERE/COMPIERE
|
||||||
|
*
|
||||||
|
* Web Service interface for openbravo pos
|
||||||
|
*
|
||||||
|
* Contributors: Carlos Ruiz - globalqss
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Carlos Ruiz - globalqss
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class ExternalSalesImpl implements ExternalSales {
|
||||||
|
|
||||||
|
private static CLogger log = CLogger.getCLogger(ExternalSalesImpl.class);
|
||||||
|
|
||||||
|
private static String webServiceName = new String("ExternalSales");
|
||||||
|
|
||||||
|
public ExternalSalesImpl()
|
||||||
|
{
|
||||||
|
log.info("Creating session object ExternalSales");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return "0.1.0";
|
||||||
|
}
|
||||||
|
|
||||||
|
public UploadOrdersResponseDocument uploadOrders(int entityId,
|
||||||
|
int organizationId, int salesChannel, ArrayOfTns1Order newOrders,
|
||||||
|
String username, String password) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
UploadOrdersResponseDocument resdoc = UploadOrdersResponseDocument.Factory.newInstance();
|
||||||
|
UploadOrdersResponse res = resdoc.addNewUploadOrdersResponse();
|
||||||
|
|
||||||
|
authenticate(username, password, webServiceName, "uploadOrders");
|
||||||
|
|
||||||
|
return resdoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProductsCatalogResponseDocument getProductsCatalog(int entityId,
|
||||||
|
int organizationId, int salesChannel, String username,
|
||||||
|
String password) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
ProductsCatalogResponseDocument resdoc = ProductsCatalogResponseDocument.Factory.newInstance();
|
||||||
|
ProductsCatalogResponse res = resdoc.addNewProductsCatalogResponse();
|
||||||
|
|
||||||
|
authenticate(username, password, webServiceName, "getProductsCatalog");
|
||||||
|
|
||||||
|
return resdoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public ProductsPlusCatalogResponseDocument getProductsPlusCatalog(
|
||||||
|
int entityId, int organizationId, int salesChannel,
|
||||||
|
String username, String password) {
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
ProductsPlusCatalogResponseDocument resdoc = ProductsPlusCatalogResponseDocument.Factory.newInstance();
|
||||||
|
ProductsPlusCatalogResponse res = resdoc.addNewProductsPlusCatalogResponse();
|
||||||
|
|
||||||
|
authenticate(username, password, webServiceName, "getProductsPlusCatalog");
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Sample of needed work
|
||||||
|
*
|
||||||
|
ArrayOfTns1ProductPlus app = res.addNewArrayOfTns1ProductPlus();
|
||||||
|
// Iterate in M_Product for the organization / warehouse?
|
||||||
|
|
||||||
|
for (MProduct product : products) ...
|
||||||
|
|
||||||
|
ProductPlus prds = app.addNewProducts();
|
||||||
|
Category cat = prds.addNewCategory();
|
||||||
|
cat.setDescription(product.getM_Category().getDescription());
|
||||||
|
cat.setId(product.getM_Category_ID());
|
||||||
|
cat.setName(product.getM_Category().getName());
|
||||||
|
Tax tax = prds.addNewTax();
|
||||||
|
tax.setName(product.getC_Tax().getName());
|
||||||
|
tax.setId(product.getC_Tax_ID());
|
||||||
|
tax.setPercentage(product.getC_Tax().getRate());
|
||||||
|
prds.setDescription(product.getDescription());
|
||||||
|
prds.setEan(product.getEAN());
|
||||||
|
prds.setId(product.getM_Product_ID());
|
||||||
|
prds.setListPrice(product.getPriceList()); // we would need a price list related to the POS
|
||||||
|
prds.setName(product.getName());
|
||||||
|
prds.setNumber(product.getNumber()); // number?
|
||||||
|
prds.setPurchasePrice(product.getPurchasePrice()); // we would need a purchase price list related to the POS
|
||||||
|
prds.setQtyonhand(product.getQtyOnHand()); // we would need a warehouse or locator related to the POS
|
||||||
|
*/
|
||||||
|
|
||||||
|
return resdoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void authenticate(String username, String password, String webServiceName, String method) {
|
||||||
|
String dbpwd = DB.getSQLValueString(null, "SELECT Password FROM AD_User WHERE Name=? AND Password IS NOT NULL", username); // and ad_client_id in (0,?)
|
||||||
|
if (dbpwd == null || dbpwd.length() <= 0)
|
||||||
|
throw new IdempiereServiceFault("Invalid user/password", new QName("username"));
|
||||||
|
|
||||||
|
String isencr = DB.getSQLValueString(null, "SELECT IsEncrypted FROM AD_Column WHERE AD_Column_ID=417");
|
||||||
|
if ("Y".equals(isencr))
|
||||||
|
dbpwd = SecureEngine.decrypt(dbpwd);
|
||||||
|
|
||||||
|
String hashPassword = null;
|
||||||
|
try {
|
||||||
|
hashPassword = new String(Base64.encodeBase64(MessageDigest.getInstance("SHA-1").digest(dbpwd.getBytes("UTF-8"))), "ASCII");
|
||||||
|
} catch (UnsupportedEncodingException e1) {
|
||||||
|
throw new IdempiereServiceFault("Error hashing db password", e1, new QName("username"));
|
||||||
|
} catch (NoSuchAlgorithmException e1) {
|
||||||
|
throw new IdempiereServiceFault("Error hashing db password", e1, new QName("username"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! hashPassword.equals(password))
|
||||||
|
/* Invalid password */
|
||||||
|
throw new IdempiereServiceFault("Invalid user/password", new QName("password"));
|
||||||
|
|
||||||
|
throw new IdempiereServiceFault("Security not implemented yet", new QName("webServiceName"));
|
||||||
|
// TODO: authenticate web service and method
|
||||||
|
// TODO: Search for a service type for client and role access with the same value as the method
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,60 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* This file is part of Adempiere ERP Bazaar *
|
||||||
|
* http://www.adempiere.org *
|
||||||
|
* *
|
||||||
|
* Copyright (C) Carlos Ruiz - globalqss *
|
||||||
|
* Copyright (C) Contributors *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU General Public License *
|
||||||
|
* as published by the Free Software Foundation; either version 2 *
|
||||||
|
* of the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the Free Software *
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||||
|
* MA 02110-1301, USA. *
|
||||||
|
* *
|
||||||
|
* Contributors: *
|
||||||
|
* - Carlos Ruiz (globalqss@users.sourceforge.net) *
|
||||||
|
* *
|
||||||
|
* Sponsors: *
|
||||||
|
* - GlobalQSS (http://www.globalqss.com) *
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
package com.globalqss.ObPOSInterface;
|
||||||
|
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.GetCustomersResponseDocument;
|
||||||
|
|
||||||
|
@javax.jws.WebService
|
||||||
|
public interface WebService {
|
||||||
|
|
||||||
|
/* methods to implement */
|
||||||
|
|
||||||
|
public GetCustomersResponseDocument getCustomers(int clientId, String username, String password);
|
||||||
|
|
||||||
|
/*
|
||||||
|
public GetCustomerResponseDocument getCustomer(GetCustomerRequestDocument req) throws XFireFault;
|
||||||
|
|
||||||
|
public GetCustomerResponse1Document getCustomer(GetCustomerRequest1Document req) throws XFireFault;
|
||||||
|
|
||||||
|
public UpdateCustomerResponseDocument updateCustomer(UpdateCustomerRequestDocument req) throws XFireFault;
|
||||||
|
|
||||||
|
public GetCustomerAddressesResponseDocument getCustomerAddresses(GetCustomerAddressesRequestDocument req) throws XFireFault;
|
||||||
|
|
||||||
|
public GetCustomerLocationResponseDocument getCustomerLocation(GetCustomerLocationRequestDocument req) throws XFireFault;
|
||||||
|
|
||||||
|
public UpdateAddressResponseDocument updateAddress(UpdateAddressRequestDocument req) throws XFireFault;
|
||||||
|
|
||||||
|
public GetCustomerContactResponseDocument getCustomerContact(GetCustomerContactRequestDocument req) throws XFireFault;
|
||||||
|
|
||||||
|
public UpdateContactResponseDocument updateContact(UpdateContactRequestDocument req) throws XFireFault;
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,78 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* This file is part of Adempiere ERP Bazaar *
|
||||||
|
* http://www.adempiere.org *
|
||||||
|
* *
|
||||||
|
* Copyright (C) Carlos Ruiz - globalqss *
|
||||||
|
* Copyright (C) Contributors *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU General Public License *
|
||||||
|
* as published by the Free Software Foundation; either version 2 *
|
||||||
|
* of the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the Free Software *
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||||
|
* MA 02110-1301, USA. *
|
||||||
|
* *
|
||||||
|
* Contributors: *
|
||||||
|
* - Carlos Ruiz (globalqss@users.sourceforge.net) *
|
||||||
|
* *
|
||||||
|
* Sponsors: *
|
||||||
|
* - GlobalQSS (http://www.globalqss.com) *
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
package com.globalqss.ObPOSInterface;
|
||||||
|
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.GetCustomersResponse;
|
||||||
|
import org.openbravo.erpCommon.ws.externalSales.GetCustomersResponseDocument;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* ADEMPIERE/COMPIERE
|
||||||
|
*
|
||||||
|
* Web Service interface for openbravo pos
|
||||||
|
*
|
||||||
|
* Contributors: Carlos Ruiz - globalqss
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @author Carlos Ruiz - globalqss
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class WebServiceImpl implements WebService {
|
||||||
|
|
||||||
|
private static CLogger log = CLogger.getCLogger(WebServiceImpl.class);
|
||||||
|
|
||||||
|
private static String webServiceName = new String("WebService");
|
||||||
|
|
||||||
|
public WebServiceImpl()
|
||||||
|
{
|
||||||
|
log.info("Creating session object ExternalSales");
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getVersion() {
|
||||||
|
return "0.1.0";
|
||||||
|
}
|
||||||
|
|
||||||
|
public GetCustomersResponseDocument getCustomers(int clientId, String username, String password)
|
||||||
|
{
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
GetCustomersResponseDocument resdoc = GetCustomersResponseDocument.Factory.newInstance();
|
||||||
|
GetCustomersResponse res = resdoc.addNewGetCustomersResponse();
|
||||||
|
|
||||||
|
ExternalSalesImpl.authenticate(username, password, webServiceName, "getCustomers");
|
||||||
|
|
||||||
|
// TODO Auto-generated method stub
|
||||||
|
|
||||||
|
return resdoc;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,51 @@
|
||||||
|
/**
|
||||||
|
* reportServer for JasperReport.
|
||||||
|
* Copyright (C) 2004 Peter Shen.
|
||||||
|
* Shanghai, China.
|
||||||
|
* Email: zpshen@gmail.com
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Contributor: Marco LOMBARDO, Compilo subAdministrator.
|
||||||
|
* lombardo@mayking.com, mar9000@gmail.com
|
||||||
|
* Italy.
|
||||||
|
**/
|
||||||
|
package net.sf.compilo.data;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import net.sf.compilo.report.ReportInfo;
|
||||||
|
|
||||||
|
import org.compiere.process.ProcessInfo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* CompiereDataSourceFactory
|
||||||
|
*
|
||||||
|
* @author Peter Shen
|
||||||
|
* @version $Id: CompiereDataSourceFactory.java,v 1.2 2005/08/04 09:42:41 pshen Exp $
|
||||||
|
* @description: CompiereDataSourceFactory
|
||||||
|
*/
|
||||||
|
public class CompiereDataSourceFactory
|
||||||
|
{
|
||||||
|
|
||||||
|
public static compiereDataSource createDataSource(Properties ctx, ReportInfo ri, ProcessInfo pi, HashMap params)
|
||||||
|
{
|
||||||
|
if(ri.getReportViewID() > 0)
|
||||||
|
return new ReportViewDataSource(ctx, pi, params);
|
||||||
|
|
||||||
|
return new DBDataSource(ctx, ri, params);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,241 @@
|
||||||
|
/**
|
||||||
|
* reportServer for JasperReport.
|
||||||
|
* Copyright (C) 2004 Peter Shen.
|
||||||
|
* Shanghai, China.
|
||||||
|
* Email: zpshen@gmail.com
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Contributor: Marco LOMBARDO, Compilo subAdministrator.
|
||||||
|
* lombardo@mayking.com, mar9000@gmail.com
|
||||||
|
* Italy.
|
||||||
|
**/
|
||||||
|
package net.sf.compilo.data;
|
||||||
|
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import net.sf.compilo.report.ReportInfo;
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JRField;
|
||||||
|
import net.sf.jasperreports.engine.JRParameter;
|
||||||
|
import net.sf.jasperreports.engine.JasperReport;
|
||||||
|
import net.sf.jasperreports.engine.util.JRQueryExecuter;
|
||||||
|
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* DBDataSource
|
||||||
|
*
|
||||||
|
* @author Peter Shen
|
||||||
|
* @version $Id: DBDataSource.java,v 1.3 2005/08/04 09:42:41 pshen Exp $
|
||||||
|
* @description: DBDataSource
|
||||||
|
*/
|
||||||
|
public class DBDataSource extends compiereDataSource
|
||||||
|
{
|
||||||
|
private PreparedStatement m_pstmt = null;
|
||||||
|
private ResultSet m_resultSet = null;
|
||||||
|
|
||||||
|
public DBDataSource(Properties ctx, ReportInfo ri, HashMap params)
|
||||||
|
{
|
||||||
|
JasperReport jr = ri.getJasperReport();
|
||||||
|
//Generate parameters map
|
||||||
|
HashMap parametersMap = new HashMap();
|
||||||
|
JRParameter[] jpara = jr.getParameters();
|
||||||
|
for (int i=0; i<jpara.length; i++)
|
||||||
|
{
|
||||||
|
parametersMap.put(jpara[i].getName(), jpara[i]);
|
||||||
|
}
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
m_pstmt = JRQueryExecuter.getStatement(
|
||||||
|
jr.getQuery(),
|
||||||
|
parametersMap,
|
||||||
|
params,
|
||||||
|
DB.getConnectionRO()
|
||||||
|
);
|
||||||
|
if(m_pstmt != null)
|
||||||
|
m_resultSet = m_pstmt.executeQuery();
|
||||||
|
}
|
||||||
|
catch (JRException jre)
|
||||||
|
{
|
||||||
|
log.saveError("GetStatement", jre);
|
||||||
|
m_resultSet = null;
|
||||||
|
}
|
||||||
|
catch (SQLException sqle)
|
||||||
|
{
|
||||||
|
log.saveError("GetResultSet", sqle);
|
||||||
|
m_resultSet = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see net.sf.jasperreports.engine.JRDataSource#getFieldValue(net.sf.jasperreports.engine.JRField)
|
||||||
|
*/
|
||||||
|
public Object getFieldValue(JRField field) throws JRException
|
||||||
|
{
|
||||||
|
Object objValue = null;
|
||||||
|
if (field != null && m_resultSet != null)
|
||||||
|
{
|
||||||
|
Class clazz = field.getValueClass();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if (clazz.equals(java.lang.Object.class))
|
||||||
|
{
|
||||||
|
objValue = m_resultSet.getObject(field.getName());
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.lang.Boolean.class))
|
||||||
|
{
|
||||||
|
objValue = m_resultSet.getBoolean(field.getName()) ? Boolean.TRUE : Boolean.FALSE;
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.lang.Byte.class))
|
||||||
|
{
|
||||||
|
objValue = new Byte(m_resultSet.getByte(field.getName()));
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.util.Date.class))
|
||||||
|
{
|
||||||
|
objValue = m_resultSet.getDate(field.getName());
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.sql.Timestamp.class))
|
||||||
|
{
|
||||||
|
objValue = m_resultSet.getTimestamp(field.getName());
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.sql.Time.class))
|
||||||
|
{
|
||||||
|
objValue = m_resultSet.getTime(field.getName());
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.lang.Double.class))
|
||||||
|
{
|
||||||
|
objValue = new Double(m_resultSet.getDouble(field.getName()));
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.lang.Float.class))
|
||||||
|
{
|
||||||
|
objValue = new Float(m_resultSet.getFloat(field.getName()));
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.lang.Integer.class))
|
||||||
|
{
|
||||||
|
objValue = new Integer(m_resultSet.getInt(field.getName()));
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.lang.Long.class))
|
||||||
|
{
|
||||||
|
objValue = new Long(m_resultSet.getLong(field.getName()));
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.lang.Short.class))
|
||||||
|
{
|
||||||
|
objValue = new Short(m_resultSet.getShort(field.getName()));
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.math.BigDecimal.class))
|
||||||
|
{
|
||||||
|
objValue = m_resultSet.getBigDecimal(field.getName());
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (clazz.equals(java.lang.String.class))
|
||||||
|
{
|
||||||
|
objValue = m_resultSet.getString(field.getName());
|
||||||
|
if(m_resultSet.wasNull())
|
||||||
|
{
|
||||||
|
objValue = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
throw new JRException("Unable to get value for field '" + field.getName() + "' of class '" + clazz.getName() + "'", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return objValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see net.sf.jasperreports.engine.JRDataSource#next()
|
||||||
|
*/
|
||||||
|
public boolean next() throws JRException
|
||||||
|
{
|
||||||
|
boolean retValue = false;
|
||||||
|
if(m_resultSet == null)
|
||||||
|
return retValue;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
retValue = m_resultSet.next();
|
||||||
|
}
|
||||||
|
catch(SQLException sqle)
|
||||||
|
{
|
||||||
|
throw new JRException(sqle);
|
||||||
|
}
|
||||||
|
return retValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see net.sf.compilo.data.compiereDataSource#close()
|
||||||
|
*/
|
||||||
|
public void close()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if(m_resultSet != null)
|
||||||
|
m_resultSet.close();
|
||||||
|
|
||||||
|
if(m_pstmt != null)
|
||||||
|
m_pstmt.close();
|
||||||
|
}
|
||||||
|
catch (Exception e){}
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,103 @@
|
||||||
|
/**
|
||||||
|
* reportServer for JasperReport.
|
||||||
|
* Copyright (C) 2004 Peter Shen.
|
||||||
|
* Shanghai, China.
|
||||||
|
* Email: zpshen@gmail.com
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Contributor: Marco LOMBARDO, Compilo subAdministrator.
|
||||||
|
* lombardo@mayking.com, mar9000@gmail.com
|
||||||
|
* Italy.
|
||||||
|
**/
|
||||||
|
package net.sf.compilo.data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JRField;
|
||||||
|
|
||||||
|
import org.compiere.print.PrintData;
|
||||||
|
import org.compiere.print.PrintDataElement;
|
||||||
|
import org.compiere.print.ReportEngine;
|
||||||
|
import org.compiere.process.ProcessInfo;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ReportViewDataSource
|
||||||
|
*
|
||||||
|
* @author Peter Shen
|
||||||
|
* @version $Id: ReportViewDataSource.java,v 1.3 2005/08/04 09:42:41 pshen Exp $
|
||||||
|
* @description: ReportViewDataSource
|
||||||
|
*/
|
||||||
|
public class ReportViewDataSource extends compiereDataSource
|
||||||
|
{
|
||||||
|
|
||||||
|
/** Query Data */
|
||||||
|
private PrintData m_printData = null;
|
||||||
|
private int m_index = 0;
|
||||||
|
|
||||||
|
public ReportViewDataSource(Properties ctx, ProcessInfo pi, HashMap params)
|
||||||
|
{
|
||||||
|
ReportEngine re = ReportEngine.get(ctx, pi);
|
||||||
|
m_printData = re.getPrintData();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see net.sf.jasperreports.engine.JRDataSource#next()
|
||||||
|
*/
|
||||||
|
public boolean next() throws JRException
|
||||||
|
{
|
||||||
|
if(m_index >= m_printData.getRowCount())
|
||||||
|
return false;
|
||||||
|
|
||||||
|
m_printData.setRowIndex(m_index++);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see net.sf.jasperreports.engine.JRDataSource#getFieldValue(net.sf.jasperreports.engine.JRField)
|
||||||
|
*/
|
||||||
|
public Object getFieldValue(JRField field) throws JRException
|
||||||
|
{
|
||||||
|
PrintDataElement pde = (PrintDataElement)m_printData.getNode(field.getName());
|
||||||
|
if(pde == null || pde.isNull())
|
||||||
|
return null;
|
||||||
|
|
||||||
|
if(pde.isDate())
|
||||||
|
return (java.util.Date)pde.getValue();
|
||||||
|
if(pde.isNumeric())
|
||||||
|
return (BigDecimal)pde.getValue();
|
||||||
|
if(pde.isID() && field.getValueClassName().indexOf("Integer") >= 0)
|
||||||
|
return (Integer)pde.getValue();
|
||||||
|
else if(pde.isID() && field.getValueClassName().indexOf("String") >= 0)
|
||||||
|
return pde.getValue().toString();
|
||||||
|
if(pde.isYesNo())
|
||||||
|
return (Boolean)pde.getValue();
|
||||||
|
|
||||||
|
return pde.getValue().toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* (non-Javadoc)
|
||||||
|
* @see net.sf.compilo.data.compiereDataSource#close()
|
||||||
|
*/
|
||||||
|
public void close()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,49 @@
|
||||||
|
/**
|
||||||
|
* reportServer for JasperReport.
|
||||||
|
* Copyright (C) 2004 Peter Shen.
|
||||||
|
* Shanghai, China.
|
||||||
|
* Email: zpshen@gmail.com
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Contributor: Marco LOMBARDO, Compilo subAdministrator.
|
||||||
|
* lombardo@mayking.com, mar9000@gmail.com
|
||||||
|
* Italy.
|
||||||
|
**/
|
||||||
|
package net.sf.compilo.data;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JRDataSource;
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JRField;
|
||||||
|
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* compiereDataSource
|
||||||
|
*
|
||||||
|
* @author Peter Shen
|
||||||
|
* @version $Id: compiereDataSource.java,v 1.4 2005/08/04 09:42:41 pshen Exp $
|
||||||
|
* @description: compiereDataSource
|
||||||
|
*/
|
||||||
|
public abstract class compiereDataSource implements JRDataSource
|
||||||
|
{
|
||||||
|
protected CLogger log = CLogger.getCLogger(compiereDataSource.class);
|
||||||
|
|
||||||
|
public abstract Object getFieldValue(JRField field) throws JRException;
|
||||||
|
|
||||||
|
public abstract boolean next() throws JRException;
|
||||||
|
|
||||||
|
public abstract void close();
|
||||||
|
}
|
|
@ -0,0 +1,44 @@
|
||||||
|
/**
|
||||||
|
* reportServer for JasperReport.
|
||||||
|
* Copyright (C) 2004 Peter Shen.
|
||||||
|
* Shanghai, China.
|
||||||
|
* Email: zpshen@gmail.com
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Contributor: Marco LOMBARDO, Compilo subAdministrator.
|
||||||
|
* lombardo@mayking.com, mar9000@gmail.com
|
||||||
|
* Italy.
|
||||||
|
**/
|
||||||
|
package net.sf.compilo.data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Peter Shen
|
||||||
|
* @version $Id: sqlProcessor.java,v 1.1 2005/07/15 10:29:40 pshen Exp $
|
||||||
|
*
|
||||||
|
* TODO To change the template for this generated type comment go to
|
||||||
|
* Window - Preferences - Java - Code Generation - Code and Comments
|
||||||
|
*/
|
||||||
|
public class sqlProcessor
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public sqlProcessor()
|
||||||
|
{
|
||||||
|
super();
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,63 @@
|
||||||
|
/**
|
||||||
|
* reportServer for JasperReport.
|
||||||
|
* Copyright (C) 2004 Peter Shen.
|
||||||
|
* Shanghai, China.
|
||||||
|
* Email: zpshen@gmail.com
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Contributor: Marco LOMBARDO, Compilo subAdministrator.
|
||||||
|
* lombardo@mayking.com, mar9000@gmail.com
|
||||||
|
* Italy.
|
||||||
|
**/
|
||||||
|
package net.sf.compilo.report;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.FilenameFilter;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Peter Shen
|
||||||
|
* @version $Id: FileFilter.java,v 1.2 2005/07/16 02:39:17 pshen Exp $
|
||||||
|
**/
|
||||||
|
public class FileFilter implements FilenameFilter
|
||||||
|
{
|
||||||
|
private String reportStart;
|
||||||
|
private File directory;
|
||||||
|
private String extension[];
|
||||||
|
|
||||||
|
public FileFilter(String reportStart, File directory, String[] extension)
|
||||||
|
{
|
||||||
|
this.reportStart = reportStart;
|
||||||
|
this.directory = directory;
|
||||||
|
this.extension = extension;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean accept(File file, String name)
|
||||||
|
{
|
||||||
|
if (file.equals( directory))
|
||||||
|
{
|
||||||
|
if (name.startsWith( reportStart))
|
||||||
|
{
|
||||||
|
for(int i=0; i<extension.length; i++)
|
||||||
|
{
|
||||||
|
int pos = name.lastIndexOf(extension[i]);
|
||||||
|
if ( (pos!=-1) && (pos==(name.length() - extension[i].length())))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,385 @@
|
||||||
|
/**
|
||||||
|
* reportServer for JasperReport.
|
||||||
|
* Copyright (C) 2004 Peter Shen.
|
||||||
|
* Shanghai, China.
|
||||||
|
* Email: zpshen@gmail.com
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Contributor: Marco LOMBARDO, Compilo subAdministrator.
|
||||||
|
* lombardo@mayking.com, mar9000@gmail.com
|
||||||
|
* Italy.
|
||||||
|
**/
|
||||||
|
package net.sf.compilo.report;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JasperCompileManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperReport;
|
||||||
|
import net.sf.jasperreports.engine.util.JRLoader;
|
||||||
|
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
|
||||||
|
//import com._3e.tools.KwotaSlownie.*;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Peter Shen
|
||||||
|
* @version $Id: ReportInfo.java,v 1.5 2005/08/04 09:42:41 pshen Exp $
|
||||||
|
**/
|
||||||
|
public class ReportInfo
|
||||||
|
{
|
||||||
|
private String reportFile;
|
||||||
|
private boolean directPrint;
|
||||||
|
private int ReportViewID = 0;
|
||||||
|
private int PrintFormatID = 0;
|
||||||
|
private int m_AD_Process_ID;
|
||||||
|
/** The field that points to the JasperReport or
|
||||||
|
to the main Report in case of subreports. Marco LOMBARDO
|
||||||
|
*/
|
||||||
|
private JasperReport jasperReport;
|
||||||
|
private HashMap subReport = new HashMap();
|
||||||
|
private boolean hasSubReport = false;
|
||||||
|
private boolean hasError = false;
|
||||||
|
private ArrayList errorMsg = new ArrayList();
|
||||||
|
private CLogger log = CLogger.getCLogger(ReportInfo.class);
|
||||||
|
|
||||||
|
public ReportInfo ()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReportInfo( int AD_Process_ID)
|
||||||
|
{
|
||||||
|
this.m_AD_Process_ID = AD_Process_ID;
|
||||||
|
getReportDefinition(AD_Process_ID);
|
||||||
|
if(hasError)
|
||||||
|
return;
|
||||||
|
|
||||||
|
processReport(this.reportFile);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
protected File processReport(String reportFile)
|
||||||
|
{
|
||||||
|
log.finest("ReportInfo.processReport - " + reportFile);
|
||||||
|
File JasperDesignFile = new File(reportFile);
|
||||||
|
String JasperReportFile = reportFile.replaceAll(".jrxml", ".jasper").replaceAll(".xml", ".jasper");
|
||||||
|
File jasperFile = new File(JasperReportFile);
|
||||||
|
// Marco LOMBARDO: this is the local one, there is the same
|
||||||
|
// field at class level. There was a bug on it about subreports.
|
||||||
|
JasperReport jasperReport = null;
|
||||||
|
|
||||||
|
if (jasperFile.exists())
|
||||||
|
{ // test time
|
||||||
|
if (JasperDesignFile.lastModified() <= jasperFile.lastModified())
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
jasperReport = (JasperReport)JRLoader.loadObject(jasperFile.getAbsolutePath()); // Marco LOMBARDO: should refer to local.
|
||||||
|
}
|
||||||
|
catch (JRException e)
|
||||||
|
{
|
||||||
|
this.jasperReport = null; // Marco LOMBARDO: on error reset global report.
|
||||||
|
log.saveError("ReportServer.processReport: Can not load report - ", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
jasperReport = compileReport( JasperDesignFile, jasperFile); // Marco LOMBARDO: should refer to local.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{ // create new jasper file
|
||||||
|
// Marco LOMBARDO: should refer to local.
|
||||||
|
jasperReport = compileReport( JasperDesignFile, jasperFile);
|
||||||
|
}
|
||||||
|
if(hasError)
|
||||||
|
return null;
|
||||||
|
// Marco LOMBARDO: report is ready.
|
||||||
|
// Marco LOMBARDO: if the global field is null, set it.
|
||||||
|
// Marco LOMBARDO: this should happen only after compile the main report.
|
||||||
|
if (this.jasperReport == null)
|
||||||
|
this.jasperReport = jasperReport;
|
||||||
|
|
||||||
|
if(jasperReport != null) // Marco LOMBARDO: should refer to local.
|
||||||
|
{
|
||||||
|
String[] extension = {".xml", "jrxml"};
|
||||||
|
File[] subreports = JasperDesignFile.getParentFile().listFiles( new FileFilter( JasperReportFile.replaceAll(".jasper","")+"Subreport", JasperDesignFile.getParentFile(), extension));
|
||||||
|
for( int i=0; i<subreports.length; i++)
|
||||||
|
{
|
||||||
|
log.finest("The subreport file @ " + subreports[i].getAbsolutePath());
|
||||||
|
File sub = processReport(subreports[i].getAbsolutePath());
|
||||||
|
String subName = sub.getName();
|
||||||
|
int pos = sub.getName().indexOf('.');
|
||||||
|
if (pos!=-1)
|
||||||
|
subName = subName.substring(0, pos);
|
||||||
|
subReport.put(subName,sub.getAbsolutePath());
|
||||||
|
this.hasSubReport = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if(hasError)
|
||||||
|
return null;
|
||||||
|
return jasperFile;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Compile xml file to jasper File
|
||||||
|
*/
|
||||||
|
private JasperReport compileReport( File reportFile, File jasperFile)
|
||||||
|
{
|
||||||
|
JasperReport res = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
String compiere_home = (String)System.getProperty("COMPIERE_HOME");
|
||||||
|
// compiere_home = "C:/compiere/acompiere2/";
|
||||||
|
//log.info( "compiere_home = "+compiere_home);
|
||||||
|
System.setProperty("jasper.reports.compile.class.path", compiere_home+"/lib/reporttools.jar;"+compiere_home+"/lib/Compiere.jar");
|
||||||
|
JasperCompileManager.compileReportToFile( reportFile.getAbsolutePath(), jasperFile.getAbsolutePath());
|
||||||
|
jasperFile.setLastModified( reportFile.lastModified());
|
||||||
|
res = (JasperReport)JRLoader.loadObject(jasperFile.getAbsolutePath());
|
||||||
|
}
|
||||||
|
catch (JRException e)
|
||||||
|
{
|
||||||
|
log.info("ReportInfo.compileReport- "+ e);
|
||||||
|
this.errorMsg.add("ReportInfo.compileReport- " + e.getMessage());
|
||||||
|
this.hasError = true;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get JasperReport xml file path or ReportView and PrintFormat definition
|
||||||
|
*/
|
||||||
|
private void getReportDefinition(int AD_Process_ID)
|
||||||
|
{
|
||||||
|
String sql = "SELECT pr.JasperReport, pr.AD_ReportView_ID, pr.AD_PrintFormat_ID, "
|
||||||
|
+ "pr.IsDirectPrint from AD_Process pr "
|
||||||
|
+ "WHERE pr.AD_Process_Id=? ";
|
||||||
|
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement(sql, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
|
||||||
|
pstmt.setInt(1, AD_Process_ID);
|
||||||
|
rs = pstmt.executeQuery();
|
||||||
|
String path = null;
|
||||||
|
String tmp = null;
|
||||||
|
if (rs.next())
|
||||||
|
{
|
||||||
|
path = rs.getString(1);
|
||||||
|
this.ReportViewID = rs.getInt(2);
|
||||||
|
this.PrintFormatID = rs.getInt(3);
|
||||||
|
tmp = rs.getString(4);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
String err = "ReportData.getReportFileName data not found -" + sql;
|
||||||
|
errorMsg.add(err);
|
||||||
|
hasError = true;
|
||||||
|
log.saveError(err, "");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
this.directPrint = (tmp.equalsIgnoreCase("y"))?true:false;
|
||||||
|
File xmlfile = new File(ReportProcessor.REPORT_HOME, path);
|
||||||
|
if(xmlfile != null && xmlfile.exists())
|
||||||
|
this.reportFile = xmlfile.getAbsolutePath();
|
||||||
|
else
|
||||||
|
{
|
||||||
|
hasError = true;
|
||||||
|
log.saveError("Error", "The Report File not exists");
|
||||||
|
}
|
||||||
|
rs.close();
|
||||||
|
pstmt.close();
|
||||||
|
}
|
||||||
|
catch (SQLException e)
|
||||||
|
{
|
||||||
|
log.saveError("ReportData.getReportFileName - " + sql, e);
|
||||||
|
this.errorMsg.add("ReportData.getReportFileName - " + sql);
|
||||||
|
this.hasError = true;
|
||||||
|
this.directPrint = false;
|
||||||
|
this.reportFile = null;
|
||||||
|
}
|
||||||
|
catch (Exception ee)
|
||||||
|
{
|
||||||
|
log.saveError("ReportData.getReportFileName - " + sql, ee);
|
||||||
|
this.errorMsg.add("ReportData.getReportFileName - " + sql);
|
||||||
|
this.hasError = true;
|
||||||
|
this.directPrint = false;
|
||||||
|
this.reportFile = null;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if(rs != null) rs.close();
|
||||||
|
if(pstmt != null) pstmt.close();
|
||||||
|
}
|
||||||
|
catch(Exception ex){}
|
||||||
|
}
|
||||||
|
log.info("Get ReportDefinition-" + this.toString());
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
private void getResource()
|
||||||
|
{
|
||||||
|
// Resources
|
||||||
|
File[] resources =
|
||||||
|
reportInfo.getReportFile().getParentFile().listFiles(
|
||||||
|
new FileFilter( jasperName, reportInfo.getReportFile().getParentFile(), ".properties"));
|
||||||
|
File resFile = null;
|
||||||
|
// try baseName + "_" + language
|
||||||
|
for( int i=0; i<resources.length; i++)
|
||||||
|
{
|
||||||
|
if ( resources[i].getName().equals( jasperName+currLang.getLocale().getLanguage()+".properties"))
|
||||||
|
{
|
||||||
|
resFile=resources[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (resFile==null)
|
||||||
|
{
|
||||||
|
// try baseName only
|
||||||
|
for( int i=0; i<resources.length; i++)
|
||||||
|
{
|
||||||
|
if ( resources[i].getName().equals( jasperName+".properties"))
|
||||||
|
{
|
||||||
|
resFile=resources[i];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (resFile!=null)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
PropertyResourceBundle res = new PropertyResourceBundle( new FileInputStream(resFile));
|
||||||
|
m_Param.put("RESOURCE", res);
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
protected boolean isDirty()
|
||||||
|
{
|
||||||
|
if(this.reportFile == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(this.jasperReport == null)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(isDirty(this.reportFile))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if(hasSubReport)
|
||||||
|
{
|
||||||
|
String[] extension = {".xml", "jrxml"};
|
||||||
|
File reportDesighFile = new File(this.reportFile);
|
||||||
|
File[] subreports = reportDesighFile.getParentFile().listFiles( new FileFilter( reportFile.replaceAll(".jasper","")+"Subreport", reportDesighFile.getParentFile(), extension));
|
||||||
|
for( int i=0; i<subreports.length; i++)
|
||||||
|
{
|
||||||
|
log.finest("The subreport file @ " + subreports[i].getAbsolutePath());
|
||||||
|
if(isDirty(subreports[i].getAbsolutePath()))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean isDirty(String file)
|
||||||
|
{
|
||||||
|
File JasperDesignFile = new File(file);
|
||||||
|
String JasperReportFile = this.reportFile.replaceAll(".jrxml", ".jasper").replaceAll(".xml", ".jasper");
|
||||||
|
File jasperFile = new File(JasperReportFile);
|
||||||
|
if (jasperFile.exists())
|
||||||
|
{
|
||||||
|
// test time
|
||||||
|
if (JasperDesignFile.lastModified() > jasperFile.lastModified())
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return "AD_Process_ID:" + m_AD_Process_ID + " XMLFile:" + this.reportFile + " ReportView_ID:" + this.ReportViewID;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return Returns the reportViewID.
|
||||||
|
*/
|
||||||
|
public int getReportViewID()
|
||||||
|
{
|
||||||
|
return ReportViewID;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @param reportViewID The reportViewID to set.
|
||||||
|
*/
|
||||||
|
protected void setReportViewID(int reportViewID)
|
||||||
|
{
|
||||||
|
ReportViewID = reportViewID;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return Returns the directPrint.
|
||||||
|
*/
|
||||||
|
protected boolean isDirectPrint()
|
||||||
|
{
|
||||||
|
return directPrint;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return Returns the errorMsg.
|
||||||
|
*/
|
||||||
|
protected ArrayList getErrorMsg()
|
||||||
|
{
|
||||||
|
return errorMsg;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return Returns the hasError.
|
||||||
|
*/
|
||||||
|
protected boolean hasError()
|
||||||
|
{
|
||||||
|
return hasError;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return Returns the jasperReport.
|
||||||
|
*/
|
||||||
|
public JasperReport getJasperReport()
|
||||||
|
{
|
||||||
|
return jasperReport;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* @return Returns the subReport.
|
||||||
|
*/
|
||||||
|
protected HashMap getSubReport()
|
||||||
|
{
|
||||||
|
return subReport;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,102 @@
|
||||||
|
/**
|
||||||
|
* reportServer for JasperReport. Copyright (C) 2004 Peter Shen. Shanghai,
|
||||||
|
* China. Email: zpshen@gmail.com
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or modify it under
|
||||||
|
* the terms of the GNU Lesser General Public License as published by the Free
|
||||||
|
* Software Foundation; either version 2.1 of the License, or (at your option)
|
||||||
|
* any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful, but WITHOUT
|
||||||
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||||
|
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
|
||||||
|
* details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public License
|
||||||
|
* along with this library; if not, write to the Free Software Foundation, Inc.,
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Contributor: Marco LOMBARDO, Compilo subAdministrator. lombardo@mayking.com,
|
||||||
|
* mar9000@gmail.com Italy.
|
||||||
|
*/
|
||||||
|
package net.sf.compilo.report;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
|
||||||
|
;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ReportPool
|
||||||
|
*
|
||||||
|
* @author Peter Shen
|
||||||
|
* @version $Id: ReportPool.java,v 1.2 2005/08/03 10:33:00 pshen Exp $
|
||||||
|
* @description: JasperReport Object Pool
|
||||||
|
*/
|
||||||
|
public class ReportPool
|
||||||
|
{
|
||||||
|
private static HashMap pool = new HashMap();
|
||||||
|
|
||||||
|
private static final int MAXNUM = 15;
|
||||||
|
private static int size = 0;
|
||||||
|
|
||||||
|
private CLogger log = CLogger.getCLogger(ReportPool.class);
|
||||||
|
|
||||||
|
public ReportInfo getReport (int AD_Process_ID )
|
||||||
|
{
|
||||||
|
/* ReportInfo reportinfo = (ReportInfo) pool.get(new Integer(AD_Process_ID));
|
||||||
|
if (reportinfo == null)
|
||||||
|
{
|
||||||
|
reportinfo = loadReport(AD_Process_ID);
|
||||||
|
addReport(AD_Process_ID, reportinfo, false);
|
||||||
|
}
|
||||||
|
else if(reportinfo.isDirty())
|
||||||
|
{
|
||||||
|
log.info("ReportInfo " + reportinfo + "dirty, Refresh");
|
||||||
|
reportinfo = loadReport(AD_Process_ID);
|
||||||
|
if(!reportinfo.hasError())
|
||||||
|
addReport(AD_Process_ID, reportinfo, true);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
ReportInfo reportinfo;
|
||||||
|
reportinfo = loadReport(AD_Process_ID);
|
||||||
|
return reportinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
private ReportInfo loadReport (int AD_Process_ID )
|
||||||
|
{
|
||||||
|
ReportInfo reportinfo = new ReportInfo(AD_Process_ID);
|
||||||
|
return reportinfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
private synchronized void addReport(int AD_Process_ID, ReportInfo reportinfo, boolean refresh)
|
||||||
|
{
|
||||||
|
if(refresh)
|
||||||
|
{
|
||||||
|
pool.put(new Integer(AD_Process_ID), reportinfo);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
while(size > MAXNUM)
|
||||||
|
{
|
||||||
|
Set s = pool.keySet();
|
||||||
|
Iterator it = s.iterator();
|
||||||
|
if (it.hasNext())
|
||||||
|
{
|
||||||
|
Integer key = (Integer)it.next();
|
||||||
|
log.info("Remove " + key + " from the report pool");
|
||||||
|
pool.remove(key);
|
||||||
|
}
|
||||||
|
size--;
|
||||||
|
}
|
||||||
|
|
||||||
|
pool.put(new Integer(AD_Process_ID), reportinfo);
|
||||||
|
size++;
|
||||||
|
}
|
||||||
|
log.info("Load " + reportinfo + " into Report Pool" + " Size=" + size);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,268 @@
|
||||||
|
/**
|
||||||
|
* reportServer for JasperReport.
|
||||||
|
* Copyright (C) 2004 Peter Shen.
|
||||||
|
* Shanghai, China.
|
||||||
|
* Email: zpshen@gmail.com
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
|
*
|
||||||
|
* Contributor: Marco LOMBARDO, Compilo subAdministrator.
|
||||||
|
* lombardo@mayking.com, mar9000@gmail.com
|
||||||
|
* Italy.
|
||||||
|
**/
|
||||||
|
package net.sf.compilo.report;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
import net.sf.compilo.data.CompiereDataSourceFactory;
|
||||||
|
import net.sf.compilo.data.compiereDataSource;
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JasperFillManager;
|
||||||
|
import net.sf.jasperreports.engine.JasperPrint;
|
||||||
|
|
||||||
|
import org.compiere.model.MPInstance;
|
||||||
|
import org.compiere.model.MPInstancePara;
|
||||||
|
import org.compiere.process.ProcessInfo;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
import org.compiere.util.Env;
|
||||||
|
import org.compiere.util.Language;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Report Server
|
||||||
|
*
|
||||||
|
* @author Peter Shen
|
||||||
|
* @version $Id: ReportProcessor.java,v 1.7 2005/09/03 04:09:51 pshen Exp $
|
||||||
|
* @description: report server
|
||||||
|
*/
|
||||||
|
public class ReportProcessor
|
||||||
|
{
|
||||||
|
public static final String REPORT_PATH__fix = "c:/compiere/compiere-all/reports";
|
||||||
|
|
||||||
|
public static File REPORT_HOME = null;
|
||||||
|
private static CLogger log = CLogger.getCLogger(ReportProcessor.class);
|
||||||
|
|
||||||
|
static
|
||||||
|
{
|
||||||
|
String reportPath = REPORT_PATH__fix;// "c:/compiere/compiere-all/reports";//System.getProperty("REPORT_HOME");
|
||||||
|
if (reportPath == null || reportPath.length() == 0)
|
||||||
|
reportPath = System.getProperty("COMPIERE_HOME")+ System.getProperty("file.separator")+ "reports";
|
||||||
|
//System.setProperty("jasper.reports.compiler.class", "net.sf.jasperreports.engine.design.JRCompiler");
|
||||||
|
String classpath = Thread.currentThread().getContextClassLoader().getResource("net/sf/jasperreports/engine").toString();
|
||||||
|
System.setProperty("jasper.reports.compile.temp", reportPath);
|
||||||
|
System.setProperty("jasper.reports.compile.class.path", classpath.split("file:/")[1].split("!")[0]);
|
||||||
|
//System.setProperty("jasper.reports.compiler.class", "net.sf.jasperreports.engine.design.JRBshCompiler");
|
||||||
|
|
||||||
|
REPORT_HOME = new File(reportPath);
|
||||||
|
if(!REPORT_HOME.exists())
|
||||||
|
log.saveError("The Report_Home not exists", REPORT_HOME.getAbsolutePath());
|
||||||
|
|
||||||
|
log.info("Set REPORT_HOME to " + REPORT_HOME.getAbsolutePath());
|
||||||
|
}
|
||||||
|
|
||||||
|
public ReportProcessor (Properties ctx, ProcessInfo pi)
|
||||||
|
{
|
||||||
|
System.setProperty("jasper.reports.compile.keep.java.file", "true");
|
||||||
|
m_AD_PInstance_ID = pi.getAD_PInstance_ID();
|
||||||
|
m_AD_Process_ID = pi.getAD_Process_ID();
|
||||||
|
m_Record_ID = pi.getRecord_ID();
|
||||||
|
//m_isPrint = pi.getIsPrint();
|
||||||
|
m_Param = new HashMap();
|
||||||
|
m_ctx = ctx;
|
||||||
|
m_pi = pi;
|
||||||
|
} // ReportServer
|
||||||
|
|
||||||
|
public JasperPrint runReport()
|
||||||
|
{
|
||||||
|
System.setProperty("jasper.reports.compile.keep.java.file", "true");
|
||||||
|
ReportPool rp = new ReportPool();
|
||||||
|
ReportInfo reportInfo = rp.getReport(m_AD_Process_ID);
|
||||||
|
rp = null;
|
||||||
|
|
||||||
|
if (!reportInfo.hasError() && reportInfo.getJasperReport()!= null)
|
||||||
|
{
|
||||||
|
// add parameter
|
||||||
|
m_Param.putAll(reportInfo.getSubReport());
|
||||||
|
addProcessParameters( m_AD_PInstance_ID, m_Param);
|
||||||
|
m_Param.put("RECORD_ID", new Integer( m_Record_ID));
|
||||||
|
// Marco LOMBARDO: REPORT_HOME used to express subreports path.
|
||||||
|
m_Param.put("REPORT_HOME", REPORT_PATH__fix ); //System.getProperty("REPORT_HOME"));
|
||||||
|
// End Marco LOMBARDO.
|
||||||
|
Language currLang = Env.getLanguage(Env.getCtx());
|
||||||
|
m_Param.put("CURRENT_LANG", currLang.getAD_Language());
|
||||||
|
|
||||||
|
java.sql.Connection conn = DB.getConnectionRO();
|
||||||
|
m_Param.put("REPORT_CONNECTION", conn ); //DB_CONN
|
||||||
|
m_Param.put("DB_CONN", conn );
|
||||||
|
System.out.println( "REPORT_CONNECTION = "+conn.toString() );
|
||||||
|
log.saveError("REPORT_CONNECTION = "+conn.toString(), "");
|
||||||
|
//System.out.println( "REPORT_HOME = "+System.getProperty("REPORT_HOME") );
|
||||||
|
|
||||||
|
// fill report
|
||||||
|
try
|
||||||
|
{
|
||||||
|
compiereDataSource ds = CompiereDataSourceFactory.createDataSource(m_ctx, reportInfo, m_pi, m_Param);
|
||||||
|
//compiereDataSource ds = new compiereDataSource (m_ctx, reportInfo.getJasperReport());
|
||||||
|
m_jasperPrint = JasperFillManager.fillReport( reportInfo.getJasperReport(), m_Param, ds);
|
||||||
|
ds.close();
|
||||||
|
|
||||||
|
log.finest("ReportProcessor.fillReport");
|
||||||
|
}
|
||||||
|
catch (JRException e)
|
||||||
|
{
|
||||||
|
m_jasperPrint = null;
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
System.out.println("Error:" + reportInfo.getErrorMsg());
|
||||||
|
|
||||||
|
return m_jasperPrint;
|
||||||
|
}// runReport
|
||||||
|
|
||||||
|
|
||||||
|
private void addProcessParameters( int AD_PInstance_ID, Map params)
|
||||||
|
{
|
||||||
|
log.finest("ReportStarter.addProcessParameters");
|
||||||
|
MPInstance pinstance = new MPInstance(m_ctx, AD_PInstance_ID, null);
|
||||||
|
MPInstancePara[] pinstancePara = pinstance.getParameters();
|
||||||
|
|
||||||
|
m_Record_ID = pinstance.getRecord_ID();
|
||||||
|
params.put("AD_Client_ID",new Integer(pinstance.getAD_Client_ID()));
|
||||||
|
params.put("AD_Org_ID",new Integer(pinstance.getAD_Org_ID()));
|
||||||
|
|
||||||
|
for(int i=0; i<pinstancePara.length; i++)
|
||||||
|
{
|
||||||
|
MPInstancePara para = pinstancePara[i];
|
||||||
|
if (para.getInfo() != null)
|
||||||
|
{
|
||||||
|
if (para.getInfo_To()!=null)
|
||||||
|
{
|
||||||
|
params.put( para.getParameterName()+"_Info1", para.getInfo());
|
||||||
|
params.put( para.getParameterName()+"_info2", para.getInfo_To());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
params.put( para.getParameterName()+"_Info", para.getInfo());
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
params.put( para.getParameterName()+"_Info", "");
|
||||||
|
params.put( para.getParameterName()+"_Info1", "");
|
||||||
|
params.put( para.getParameterName()+"_info2", "");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (para.getP_String() != null)
|
||||||
|
{
|
||||||
|
if (para.getP_String_To()!=null) {
|
||||||
|
params.put( para.getParameterName()+"1", para.getP_String());
|
||||||
|
params.put( para.getParameterName()+"2", para.getP_String_To());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
params.put( para.getParameterName(), para.getP_String());
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (para.getP_Date() != null)
|
||||||
|
{
|
||||||
|
if (para.getP_Date()!=null)
|
||||||
|
{
|
||||||
|
params.put( para.getParameterName()+"1", para.getP_Date());
|
||||||
|
params.put( para.getParameterName()+"2", para.getP_Date_To());
|
||||||
|
}
|
||||||
|
else
|
||||||
|
params.put( para.getParameterName(), para.getP_Date());
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (para.getP_Number() != null)
|
||||||
|
{
|
||||||
|
if (para.getP_Number_To() != null
|
||||||
|
&& !para.getP_Number_To().equals(""))
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Integer pIntNum = Integer.valueOf(para.getP_Number()
|
||||||
|
.toString());
|
||||||
|
Integer pIntNumTo = Integer.valueOf(para
|
||||||
|
.getP_Number_To().toString());
|
||||||
|
params.put(para.getParameterName() + "1", pIntNum);
|
||||||
|
params.put(para.getParameterName() + "2", pIntNumTo);
|
||||||
|
}
|
||||||
|
catch (NumberFormatException nfe)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Double pDoubleNum = Double.valueOf(para
|
||||||
|
.getP_Number().toString());
|
||||||
|
Double pDoubleNumTo = Double.valueOf(para
|
||||||
|
.getP_Number_To().toString());
|
||||||
|
params.put(para.getParameterName() + "1",
|
||||||
|
pDoubleNum);
|
||||||
|
params.put(para.getParameterName() + "2",
|
||||||
|
pDoubleNumTo);
|
||||||
|
}
|
||||||
|
catch (NumberFormatException nfe2)
|
||||||
|
{
|
||||||
|
params.put(para.getParameterName() + "1", para
|
||||||
|
.getP_Number());
|
||||||
|
params.put(para.getParameterName() + "2", para
|
||||||
|
.getP_Number_To());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Integer pIntNum = Integer.valueOf(para.getP_Number()
|
||||||
|
.toString());
|
||||||
|
params.put(para.getParameterName(), pIntNum);
|
||||||
|
}
|
||||||
|
catch (NumberFormatException nfe)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Double pDoubleNum = Double.valueOf(para
|
||||||
|
.getP_Number().toString());
|
||||||
|
params.put(para.getParameterName(), pDoubleNum);
|
||||||
|
}
|
||||||
|
catch (NumberFormatException nfe2)
|
||||||
|
{
|
||||||
|
params.put(para.getParameterName(), para
|
||||||
|
.getP_Number());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private int m_AD_PInstance_ID = 0;
|
||||||
|
private int m_AD_Process_ID = 0;
|
||||||
|
private int m_Record_ID = 0;
|
||||||
|
private boolean m_isPrint = false;
|
||||||
|
private HashMap m_Param = null;
|
||||||
|
private Properties m_ctx = null;
|
||||||
|
private JasperPrint m_jasperPrint = null;
|
||||||
|
private ProcessInfo m_pi = null;
|
||||||
|
}
|
|
@ -0,0 +1,341 @@
|
||||||
|
/*
|
||||||
|
* ============================================================================
|
||||||
|
* GNU Lesser General Public License
|
||||||
|
* ============================================================================
|
||||||
|
*
|
||||||
|
* JasperReports - Free Java report-generating library.
|
||||||
|
* Copyright (C) 2001-2005 JasperSoft Corporation http://www.jaspersoft.com
|
||||||
|
*
|
||||||
|
* This library is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU Lesser General Public
|
||||||
|
* License as published by the Free Software Foundation; either
|
||||||
|
* version 2.1 of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This library is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
* Lesser General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU Lesser General Public
|
||||||
|
* License along with this library; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
*
|
||||||
|
* JasperSoft Corporation
|
||||||
|
* 185, Berry Street, Suite 6200
|
||||||
|
* San Francisco CA 94107
|
||||||
|
* http://www.jaspersoft.com
|
||||||
|
*/
|
||||||
|
package net.sf.jasperreports.engine.util;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Connection;
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.SQLException;
|
||||||
|
import java.sql.Types;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
import net.sf.jasperreports.engine.JRException;
|
||||||
|
import net.sf.jasperreports.engine.JRParameter;
|
||||||
|
import net.sf.jasperreports.engine.JRQuery;
|
||||||
|
import net.sf.jasperreports.engine.JRQueryChunk;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Teodor Danciu (teodord@users.sourceforge.net)
|
||||||
|
* @version $Id: JRQueryExecuter.java,v 1.7 2005/06/27 07:16:53 teodord Exp $
|
||||||
|
*/
|
||||||
|
public class JRQueryExecuter
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private JRQuery query = null;
|
||||||
|
private Map parametersMap = new HashMap();
|
||||||
|
private Map parameterValues = null;
|
||||||
|
private String queryString = "";
|
||||||
|
private List parameterNames = new ArrayList();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
protected JRQueryExecuter(JRQuery query, Map parameters, Map values)
|
||||||
|
{
|
||||||
|
this.query = query;
|
||||||
|
this.parametersMap = parameters;
|
||||||
|
this.parameterValues = values;
|
||||||
|
|
||||||
|
this.parseQuery();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public static PreparedStatement getStatement(
|
||||||
|
JRQuery query,
|
||||||
|
Map parameters,
|
||||||
|
Map values,
|
||||||
|
Connection conn
|
||||||
|
) throws JRException
|
||||||
|
{
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
|
||||||
|
if (conn != null)
|
||||||
|
{
|
||||||
|
JRQueryExecuter queryExecuter =
|
||||||
|
new JRQueryExecuter(
|
||||||
|
query,
|
||||||
|
parameters,
|
||||||
|
values
|
||||||
|
);
|
||||||
|
|
||||||
|
pstmt = queryExecuter.getStatement(conn);
|
||||||
|
}
|
||||||
|
|
||||||
|
return pstmt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private void parseQuery()
|
||||||
|
{
|
||||||
|
queryString = "";
|
||||||
|
parameterNames = new ArrayList();
|
||||||
|
|
||||||
|
if (query != null)
|
||||||
|
{
|
||||||
|
JRQueryChunk[] chunks = query.getChunks();
|
||||||
|
if (chunks != null && chunks.length > 0)
|
||||||
|
{
|
||||||
|
StringBuffer sbuffer = new StringBuffer();
|
||||||
|
JRQueryChunk chunk = null;
|
||||||
|
for(int i = 0; i < chunks.length; i++)
|
||||||
|
{
|
||||||
|
chunk = chunks[i];
|
||||||
|
switch (chunk.getType())
|
||||||
|
{
|
||||||
|
case JRQueryChunk.TYPE_PARAMETER_CLAUSE :
|
||||||
|
{
|
||||||
|
String parameterName = chunk.getText();
|
||||||
|
Object parameterValue = parameterValues.get(parameterName);
|
||||||
|
sbuffer.append(String.valueOf(parameterValue));
|
||||||
|
//parameterNames.add(parameterName);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case JRQueryChunk.TYPE_PARAMETER :
|
||||||
|
{
|
||||||
|
sbuffer.append("?");
|
||||||
|
parameterNames.add(chunk.getText());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case JRQueryChunk.TYPE_TEXT :
|
||||||
|
default :
|
||||||
|
{
|
||||||
|
sbuffer.append(chunk.getText());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
queryString = sbuffer.toString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private PreparedStatement getStatement(Connection conn) throws JRException
|
||||||
|
{
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
|
||||||
|
if (queryString != null && queryString.trim().length() > 0)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = conn.prepareStatement(queryString);
|
||||||
|
|
||||||
|
if (parameterNames != null && parameterNames.size() > 0)
|
||||||
|
{
|
||||||
|
JRParameter parameter = null;
|
||||||
|
String parameterName = null;
|
||||||
|
Class clazz = null;
|
||||||
|
Object parameterValue = null;
|
||||||
|
for(int i = 0; i < parameterNames.size(); i++)
|
||||||
|
{
|
||||||
|
parameterName = (String)parameterNames.get(i);
|
||||||
|
parameter = (JRParameter)parametersMap.get(parameterName);
|
||||||
|
clazz = parameter.getValueClass();
|
||||||
|
//FIXMEparameterValue = jrParameter.getValue();
|
||||||
|
parameterValue = parameterValues.get(parameterName);
|
||||||
|
|
||||||
|
if ( clazz.equals(java.lang.Object.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.JAVA_OBJECT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setObject(i + 1, parameterValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.lang.Boolean.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.BIT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setBoolean(i + 1, ((Boolean)parameterValue).booleanValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.lang.Byte.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.TINYINT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setByte(i + 1, ((Byte)parameterValue).byteValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.lang.Double.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.DOUBLE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setDouble(i + 1, ((Double)parameterValue).doubleValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.lang.Float.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.FLOAT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setFloat(i + 1, ((Float)parameterValue).floatValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.lang.Integer.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.INTEGER);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setInt(i + 1, ((Integer)parameterValue).intValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.lang.Long.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.BIGINT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setLong(i + 1, ((Long)parameterValue).longValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.lang.Short.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.SMALLINT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setShort(i + 1, ((Short)parameterValue).shortValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.math.BigDecimal.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.DECIMAL);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setBigDecimal(i + 1, (BigDecimal)parameterValue);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.lang.String.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.VARCHAR);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setString(i + 1, parameterValue.toString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.util.Date.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.DATE);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setDate( i + 1, new java.sql.Date( ((java.util.Date)parameterValue).getTime() ) );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.sql.Timestamp.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.TIMESTAMP);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setTimestamp( i + 1, (java.sql.Timestamp)parameterValue );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if ( clazz.equals(java.sql.Time.class) )
|
||||||
|
{
|
||||||
|
if (parameterValue == null)
|
||||||
|
{
|
||||||
|
pstmt.setNull(i + 1, Types.TIME);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
pstmt.setTime( i + 1, (java.sql.Time)parameterValue );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new JRException("Parameter type not supported in query : " + parameterName + " class " + clazz.getName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (SQLException e)
|
||||||
|
{
|
||||||
|
throw new JRException("Error preparing statement for executing the report query : " + "\n\n" + queryString + "\n\n", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return pstmt;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,170 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Interface for WS_WebService
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS
|
||||||
|
*/
|
||||||
|
public interface I_WS_WebService
|
||||||
|
{
|
||||||
|
|
||||||
|
/** TableName=WS_WebService */
|
||||||
|
public static final String Table_Name = "WS_WebService";
|
||||||
|
|
||||||
|
/** AD_Table_ID=53162 */
|
||||||
|
public static final int Table_ID = MTable.getTable_ID(Table_Name);
|
||||||
|
|
||||||
|
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||||
|
|
||||||
|
/** AccessLevel = 4 - System
|
||||||
|
*/
|
||||||
|
BigDecimal accessLevel = BigDecimal.valueOf(4);
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
|
||||||
|
/** Column name AD_Client_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||||
|
|
||||||
|
/** Get Client.
|
||||||
|
* Client/Tenant for this installation.
|
||||||
|
*/
|
||||||
|
public int getAD_Client_ID();
|
||||||
|
|
||||||
|
/** Column name AD_Org_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||||
|
|
||||||
|
/** Set Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public void setAD_Org_ID (int AD_Org_ID);
|
||||||
|
|
||||||
|
/** Get Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public int getAD_Org_ID();
|
||||||
|
|
||||||
|
/** Column name Created */
|
||||||
|
public static final String COLUMNNAME_Created = "Created";
|
||||||
|
|
||||||
|
/** Get Created.
|
||||||
|
* Date this record was created
|
||||||
|
*/
|
||||||
|
public Timestamp getCreated();
|
||||||
|
|
||||||
|
/** Column name CreatedBy */
|
||||||
|
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||||
|
|
||||||
|
/** Get Created By.
|
||||||
|
* User who created this records
|
||||||
|
*/
|
||||||
|
public int getCreatedBy();
|
||||||
|
|
||||||
|
/** Column name Description */
|
||||||
|
public static final String COLUMNNAME_Description = "Description";
|
||||||
|
|
||||||
|
/** Set Description.
|
||||||
|
* Optional short description of the record
|
||||||
|
*/
|
||||||
|
public void setDescription (String Description);
|
||||||
|
|
||||||
|
/** Get Description.
|
||||||
|
* Optional short description of the record
|
||||||
|
*/
|
||||||
|
public String getDescription();
|
||||||
|
|
||||||
|
/** Column name Help */
|
||||||
|
public static final String COLUMNNAME_Help = "Help";
|
||||||
|
|
||||||
|
/** Set Comment/Help.
|
||||||
|
* Comment or Hint
|
||||||
|
*/
|
||||||
|
public void setHelp (String Help);
|
||||||
|
|
||||||
|
/** Get Comment/Help.
|
||||||
|
* Comment or Hint
|
||||||
|
*/
|
||||||
|
public String getHelp();
|
||||||
|
|
||||||
|
/** Column name IsActive */
|
||||||
|
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||||
|
|
||||||
|
/** Set Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public void setIsActive (boolean IsActive);
|
||||||
|
|
||||||
|
/** Get Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public boolean isActive();
|
||||||
|
|
||||||
|
/** Column name Name */
|
||||||
|
public static final String COLUMNNAME_Name = "Name";
|
||||||
|
|
||||||
|
/** Set Name.
|
||||||
|
* Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public void setName (String Name);
|
||||||
|
|
||||||
|
/** Get Name.
|
||||||
|
* Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public String getName();
|
||||||
|
|
||||||
|
/** Column name Updated */
|
||||||
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
||||||
|
/** Get Updated.
|
||||||
|
* Date this record was updated
|
||||||
|
*/
|
||||||
|
public Timestamp getUpdated();
|
||||||
|
|
||||||
|
/** Column name UpdatedBy */
|
||||||
|
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||||
|
|
||||||
|
/** Get Updated By.
|
||||||
|
* User who updated this records
|
||||||
|
*/
|
||||||
|
public int getUpdatedBy();
|
||||||
|
|
||||||
|
/** Column name Value */
|
||||||
|
public static final String COLUMNNAME_Value = "Value";
|
||||||
|
|
||||||
|
/** Set Search Key.
|
||||||
|
* Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public void setValue (String Value);
|
||||||
|
|
||||||
|
/** Get Search Key.
|
||||||
|
* Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public String getValue();
|
||||||
|
|
||||||
|
/** Column name WS_WebService_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebService_ID = "WS_WebService_ID";
|
||||||
|
|
||||||
|
/** Set Web Service */
|
||||||
|
public void setWS_WebService_ID (int WS_WebService_ID);
|
||||||
|
|
||||||
|
/** Get Web Service */
|
||||||
|
public int getWS_WebService_ID();
|
||||||
|
}
|
|
@ -0,0 +1,144 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Interface for WS_WebServiceFieldInput
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS
|
||||||
|
*/
|
||||||
|
public interface I_WS_WebServiceFieldInput
|
||||||
|
{
|
||||||
|
|
||||||
|
/** TableName=WS_WebServiceFieldInput */
|
||||||
|
public static final String Table_Name = "WS_WebServiceFieldInput";
|
||||||
|
|
||||||
|
/** AD_Table_ID=53166 */
|
||||||
|
public static final int Table_ID = MTable.getTable_ID(Table_Name);
|
||||||
|
|
||||||
|
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||||
|
|
||||||
|
/** AccessLevel = 6 - System - Client
|
||||||
|
*/
|
||||||
|
BigDecimal accessLevel = BigDecimal.valueOf(6);
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
|
||||||
|
/** Column name AD_Client_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||||
|
|
||||||
|
/** Get Client.
|
||||||
|
* Client/Tenant for this installation.
|
||||||
|
*/
|
||||||
|
public int getAD_Client_ID();
|
||||||
|
|
||||||
|
/** Column name AD_Column_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Column_ID = "AD_Column_ID";
|
||||||
|
|
||||||
|
/** Set Column.
|
||||||
|
* Column in the table
|
||||||
|
*/
|
||||||
|
public void setAD_Column_ID (int AD_Column_ID);
|
||||||
|
|
||||||
|
/** Get Column.
|
||||||
|
* Column in the table
|
||||||
|
*/
|
||||||
|
public int getAD_Column_ID();
|
||||||
|
|
||||||
|
public I_AD_Column getAD_Column() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name AD_Org_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||||
|
|
||||||
|
/** Set Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public void setAD_Org_ID (int AD_Org_ID);
|
||||||
|
|
||||||
|
/** Get Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public int getAD_Org_ID();
|
||||||
|
|
||||||
|
/** Column name Created */
|
||||||
|
public static final String COLUMNNAME_Created = "Created";
|
||||||
|
|
||||||
|
/** Get Created.
|
||||||
|
* Date this record was created
|
||||||
|
*/
|
||||||
|
public Timestamp getCreated();
|
||||||
|
|
||||||
|
/** Column name CreatedBy */
|
||||||
|
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||||
|
|
||||||
|
/** Get Created By.
|
||||||
|
* User who created this records
|
||||||
|
*/
|
||||||
|
public int getCreatedBy();
|
||||||
|
|
||||||
|
/** Column name IsActive */
|
||||||
|
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||||
|
|
||||||
|
/** Set Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public void setIsActive (boolean IsActive);
|
||||||
|
|
||||||
|
/** Get Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public boolean isActive();
|
||||||
|
|
||||||
|
/** Column name Updated */
|
||||||
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
||||||
|
/** Get Updated.
|
||||||
|
* Date this record was updated
|
||||||
|
*/
|
||||||
|
public Timestamp getUpdated();
|
||||||
|
|
||||||
|
/** Column name UpdatedBy */
|
||||||
|
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||||
|
|
||||||
|
/** Get Updated By.
|
||||||
|
* User who updated this records
|
||||||
|
*/
|
||||||
|
public int getUpdatedBy();
|
||||||
|
|
||||||
|
/** Column name WS_WebServiceFieldInput_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebServiceFieldInput_ID = "WS_WebServiceFieldInput_ID";
|
||||||
|
|
||||||
|
/** Set Web Service Field Input */
|
||||||
|
public void setWS_WebServiceFieldInput_ID (int WS_WebServiceFieldInput_ID);
|
||||||
|
|
||||||
|
/** Get Web Service Field Input */
|
||||||
|
public int getWS_WebServiceFieldInput_ID();
|
||||||
|
|
||||||
|
/** Column name WS_WebServiceType_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID";
|
||||||
|
|
||||||
|
/** Set Web Service Type */
|
||||||
|
public void setWS_WebServiceType_ID (int WS_WebServiceType_ID);
|
||||||
|
|
||||||
|
/** Get Web Service Type */
|
||||||
|
public int getWS_WebServiceType_ID();
|
||||||
|
|
||||||
|
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
|
||||||
|
}
|
|
@ -0,0 +1,144 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Interface for WS_WebServiceFieldOutput
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS
|
||||||
|
*/
|
||||||
|
public interface I_WS_WebServiceFieldOutput
|
||||||
|
{
|
||||||
|
|
||||||
|
/** TableName=WS_WebServiceFieldOutput */
|
||||||
|
public static final String Table_Name = "WS_WebServiceFieldOutput";
|
||||||
|
|
||||||
|
/** AD_Table_ID=53167 */
|
||||||
|
public static final int Table_ID = MTable.getTable_ID(Table_Name);
|
||||||
|
|
||||||
|
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||||
|
|
||||||
|
/** AccessLevel = 6 - System - Client
|
||||||
|
*/
|
||||||
|
BigDecimal accessLevel = BigDecimal.valueOf(6);
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
|
||||||
|
/** Column name AD_Client_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||||
|
|
||||||
|
/** Get Client.
|
||||||
|
* Client/Tenant for this installation.
|
||||||
|
*/
|
||||||
|
public int getAD_Client_ID();
|
||||||
|
|
||||||
|
/** Column name AD_Column_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Column_ID = "AD_Column_ID";
|
||||||
|
|
||||||
|
/** Set Column.
|
||||||
|
* Column in the table
|
||||||
|
*/
|
||||||
|
public void setAD_Column_ID (int AD_Column_ID);
|
||||||
|
|
||||||
|
/** Get Column.
|
||||||
|
* Column in the table
|
||||||
|
*/
|
||||||
|
public int getAD_Column_ID();
|
||||||
|
|
||||||
|
public I_AD_Column getAD_Column() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name AD_Org_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||||
|
|
||||||
|
/** Set Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public void setAD_Org_ID (int AD_Org_ID);
|
||||||
|
|
||||||
|
/** Get Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public int getAD_Org_ID();
|
||||||
|
|
||||||
|
/** Column name Created */
|
||||||
|
public static final String COLUMNNAME_Created = "Created";
|
||||||
|
|
||||||
|
/** Get Created.
|
||||||
|
* Date this record was created
|
||||||
|
*/
|
||||||
|
public Timestamp getCreated();
|
||||||
|
|
||||||
|
/** Column name CreatedBy */
|
||||||
|
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||||
|
|
||||||
|
/** Get Created By.
|
||||||
|
* User who created this records
|
||||||
|
*/
|
||||||
|
public int getCreatedBy();
|
||||||
|
|
||||||
|
/** Column name IsActive */
|
||||||
|
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||||
|
|
||||||
|
/** Set Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public void setIsActive (boolean IsActive);
|
||||||
|
|
||||||
|
/** Get Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public boolean isActive();
|
||||||
|
|
||||||
|
/** Column name Updated */
|
||||||
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
||||||
|
/** Get Updated.
|
||||||
|
* Date this record was updated
|
||||||
|
*/
|
||||||
|
public Timestamp getUpdated();
|
||||||
|
|
||||||
|
/** Column name UpdatedBy */
|
||||||
|
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||||
|
|
||||||
|
/** Get Updated By.
|
||||||
|
* User who updated this records
|
||||||
|
*/
|
||||||
|
public int getUpdatedBy();
|
||||||
|
|
||||||
|
/** Column name WS_WebServiceFieldOutput_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebServiceFieldOutput_ID = "WS_WebServiceFieldOutput_ID";
|
||||||
|
|
||||||
|
/** Set Web Service Field Output */
|
||||||
|
public void setWS_WebServiceFieldOutput_ID (int WS_WebServiceFieldOutput_ID);
|
||||||
|
|
||||||
|
/** Get Web Service Field Output */
|
||||||
|
public int getWS_WebServiceFieldOutput_ID();
|
||||||
|
|
||||||
|
/** Column name WS_WebServiceType_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID";
|
||||||
|
|
||||||
|
/** Set Web Service Type */
|
||||||
|
public void setWS_WebServiceType_ID (int WS_WebServiceType_ID);
|
||||||
|
|
||||||
|
/** Get Web Service Type */
|
||||||
|
public int getWS_WebServiceType_ID();
|
||||||
|
|
||||||
|
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
|
||||||
|
}
|
|
@ -0,0 +1,181 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Interface for WS_WebServiceMethod
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS
|
||||||
|
*/
|
||||||
|
public interface I_WS_WebServiceMethod
|
||||||
|
{
|
||||||
|
|
||||||
|
/** TableName=WS_WebServiceMethod */
|
||||||
|
public static final String Table_Name = "WS_WebServiceMethod";
|
||||||
|
|
||||||
|
/** AD_Table_ID=53163 */
|
||||||
|
public static final int Table_ID = MTable.getTable_ID(Table_Name);
|
||||||
|
|
||||||
|
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||||
|
|
||||||
|
/** AccessLevel = 4 - System
|
||||||
|
*/
|
||||||
|
BigDecimal accessLevel = BigDecimal.valueOf(4);
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
|
||||||
|
/** Column name AD_Client_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||||
|
|
||||||
|
/** Get Client.
|
||||||
|
* Client/Tenant for this installation.
|
||||||
|
*/
|
||||||
|
public int getAD_Client_ID();
|
||||||
|
|
||||||
|
/** Column name AD_Org_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||||
|
|
||||||
|
/** Set Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public void setAD_Org_ID (int AD_Org_ID);
|
||||||
|
|
||||||
|
/** Get Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public int getAD_Org_ID();
|
||||||
|
|
||||||
|
/** Column name Created */
|
||||||
|
public static final String COLUMNNAME_Created = "Created";
|
||||||
|
|
||||||
|
/** Get Created.
|
||||||
|
* Date this record was created
|
||||||
|
*/
|
||||||
|
public Timestamp getCreated();
|
||||||
|
|
||||||
|
/** Column name CreatedBy */
|
||||||
|
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||||
|
|
||||||
|
/** Get Created By.
|
||||||
|
* User who created this records
|
||||||
|
*/
|
||||||
|
public int getCreatedBy();
|
||||||
|
|
||||||
|
/** Column name Description */
|
||||||
|
public static final String COLUMNNAME_Description = "Description";
|
||||||
|
|
||||||
|
/** Set Description.
|
||||||
|
* Optional short description of the record
|
||||||
|
*/
|
||||||
|
public void setDescription (String Description);
|
||||||
|
|
||||||
|
/** Get Description.
|
||||||
|
* Optional short description of the record
|
||||||
|
*/
|
||||||
|
public String getDescription();
|
||||||
|
|
||||||
|
/** Column name Help */
|
||||||
|
public static final String COLUMNNAME_Help = "Help";
|
||||||
|
|
||||||
|
/** Set Comment/Help.
|
||||||
|
* Comment or Hint
|
||||||
|
*/
|
||||||
|
public void setHelp (String Help);
|
||||||
|
|
||||||
|
/** Get Comment/Help.
|
||||||
|
* Comment or Hint
|
||||||
|
*/
|
||||||
|
public String getHelp();
|
||||||
|
|
||||||
|
/** Column name IsActive */
|
||||||
|
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||||
|
|
||||||
|
/** Set Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public void setIsActive (boolean IsActive);
|
||||||
|
|
||||||
|
/** Get Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public boolean isActive();
|
||||||
|
|
||||||
|
/** Column name Name */
|
||||||
|
public static final String COLUMNNAME_Name = "Name";
|
||||||
|
|
||||||
|
/** Set Name.
|
||||||
|
* Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public void setName (String Name);
|
||||||
|
|
||||||
|
/** Get Name.
|
||||||
|
* Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public String getName();
|
||||||
|
|
||||||
|
/** Column name Updated */
|
||||||
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
||||||
|
/** Get Updated.
|
||||||
|
* Date this record was updated
|
||||||
|
*/
|
||||||
|
public Timestamp getUpdated();
|
||||||
|
|
||||||
|
/** Column name UpdatedBy */
|
||||||
|
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||||
|
|
||||||
|
/** Get Updated By.
|
||||||
|
* User who updated this records
|
||||||
|
*/
|
||||||
|
public int getUpdatedBy();
|
||||||
|
|
||||||
|
/** Column name Value */
|
||||||
|
public static final String COLUMNNAME_Value = "Value";
|
||||||
|
|
||||||
|
/** Set Search Key.
|
||||||
|
* Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public void setValue (String Value);
|
||||||
|
|
||||||
|
/** Get Search Key.
|
||||||
|
* Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public String getValue();
|
||||||
|
|
||||||
|
/** Column name WS_WebService_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebService_ID = "WS_WebService_ID";
|
||||||
|
|
||||||
|
/** Set Web Service */
|
||||||
|
public void setWS_WebService_ID (int WS_WebService_ID);
|
||||||
|
|
||||||
|
/** Get Web Service */
|
||||||
|
public int getWS_WebService_ID();
|
||||||
|
|
||||||
|
public I_WS_WebService getWS_WebService() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name WS_WebServiceMethod_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebServiceMethod_ID = "WS_WebServiceMethod_ID";
|
||||||
|
|
||||||
|
/** Set Web Service Method */
|
||||||
|
public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID);
|
||||||
|
|
||||||
|
/** Get Web Service Method */
|
||||||
|
public int getWS_WebServiceMethod_ID();
|
||||||
|
}
|
|
@ -0,0 +1,207 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Interface for WS_WebServiceType
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS
|
||||||
|
*/
|
||||||
|
public interface I_WS_WebServiceType
|
||||||
|
{
|
||||||
|
|
||||||
|
/** TableName=WS_WebServiceType */
|
||||||
|
public static final String Table_Name = "WS_WebServiceType";
|
||||||
|
|
||||||
|
/** AD_Table_ID=53164 */
|
||||||
|
public static final int Table_ID = MTable.getTable_ID(Table_Name);
|
||||||
|
|
||||||
|
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||||
|
|
||||||
|
/** AccessLevel = 6 - System - Client
|
||||||
|
*/
|
||||||
|
BigDecimal accessLevel = BigDecimal.valueOf(6);
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
|
||||||
|
/** Column name AD_Client_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||||
|
|
||||||
|
/** Get Client.
|
||||||
|
* Client/Tenant for this installation.
|
||||||
|
*/
|
||||||
|
public int getAD_Client_ID();
|
||||||
|
|
||||||
|
/** Column name AD_Org_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||||
|
|
||||||
|
/** Set Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public void setAD_Org_ID (int AD_Org_ID);
|
||||||
|
|
||||||
|
/** Get Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public int getAD_Org_ID();
|
||||||
|
|
||||||
|
/** Column name AD_Table_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Table_ID = "AD_Table_ID";
|
||||||
|
|
||||||
|
/** Set Table.
|
||||||
|
* Database Table information
|
||||||
|
*/
|
||||||
|
public void setAD_Table_ID (int AD_Table_ID);
|
||||||
|
|
||||||
|
/** Get Table.
|
||||||
|
* Database Table information
|
||||||
|
*/
|
||||||
|
public int getAD_Table_ID();
|
||||||
|
|
||||||
|
public I_AD_Table getAD_Table() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name Created */
|
||||||
|
public static final String COLUMNNAME_Created = "Created";
|
||||||
|
|
||||||
|
/** Get Created.
|
||||||
|
* Date this record was created
|
||||||
|
*/
|
||||||
|
public Timestamp getCreated();
|
||||||
|
|
||||||
|
/** Column name CreatedBy */
|
||||||
|
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||||
|
|
||||||
|
/** Get Created By.
|
||||||
|
* User who created this records
|
||||||
|
*/
|
||||||
|
public int getCreatedBy();
|
||||||
|
|
||||||
|
/** Column name Description */
|
||||||
|
public static final String COLUMNNAME_Description = "Description";
|
||||||
|
|
||||||
|
/** Set Description.
|
||||||
|
* Optional short description of the record
|
||||||
|
*/
|
||||||
|
public void setDescription (String Description);
|
||||||
|
|
||||||
|
/** Get Description.
|
||||||
|
* Optional short description of the record
|
||||||
|
*/
|
||||||
|
public String getDescription();
|
||||||
|
|
||||||
|
/** Column name Help */
|
||||||
|
public static final String COLUMNNAME_Help = "Help";
|
||||||
|
|
||||||
|
/** Set Comment/Help.
|
||||||
|
* Comment or Hint
|
||||||
|
*/
|
||||||
|
public void setHelp (String Help);
|
||||||
|
|
||||||
|
/** Get Comment/Help.
|
||||||
|
* Comment or Hint
|
||||||
|
*/
|
||||||
|
public String getHelp();
|
||||||
|
|
||||||
|
/** Column name IsActive */
|
||||||
|
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||||
|
|
||||||
|
/** Set Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public void setIsActive (boolean IsActive);
|
||||||
|
|
||||||
|
/** Get Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public boolean isActive();
|
||||||
|
|
||||||
|
/** Column name Name */
|
||||||
|
public static final String COLUMNNAME_Name = "Name";
|
||||||
|
|
||||||
|
/** Set Name.
|
||||||
|
* Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public void setName (String Name);
|
||||||
|
|
||||||
|
/** Get Name.
|
||||||
|
* Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public String getName();
|
||||||
|
|
||||||
|
/** Column name Updated */
|
||||||
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
||||||
|
/** Get Updated.
|
||||||
|
* Date this record was updated
|
||||||
|
*/
|
||||||
|
public Timestamp getUpdated();
|
||||||
|
|
||||||
|
/** Column name UpdatedBy */
|
||||||
|
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||||
|
|
||||||
|
/** Get Updated By.
|
||||||
|
* User who updated this records
|
||||||
|
*/
|
||||||
|
public int getUpdatedBy();
|
||||||
|
|
||||||
|
/** Column name Value */
|
||||||
|
public static final String COLUMNNAME_Value = "Value";
|
||||||
|
|
||||||
|
/** Set Search Key.
|
||||||
|
* Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public void setValue (String Value);
|
||||||
|
|
||||||
|
/** Get Search Key.
|
||||||
|
* Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public String getValue();
|
||||||
|
|
||||||
|
/** Column name WS_WebService_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebService_ID = "WS_WebService_ID";
|
||||||
|
|
||||||
|
/** Set Web Service */
|
||||||
|
public void setWS_WebService_ID (int WS_WebService_ID);
|
||||||
|
|
||||||
|
/** Get Web Service */
|
||||||
|
public int getWS_WebService_ID();
|
||||||
|
|
||||||
|
public I_WS_WebService getWS_WebService() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name WS_WebServiceMethod_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebServiceMethod_ID = "WS_WebServiceMethod_ID";
|
||||||
|
|
||||||
|
/** Set Web Service Method */
|
||||||
|
public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID);
|
||||||
|
|
||||||
|
/** Get Web Service Method */
|
||||||
|
public int getWS_WebServiceMethod_ID();
|
||||||
|
|
||||||
|
public I_WS_WebServiceMethod getWS_WebServiceMethod() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name WS_WebServiceType_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID";
|
||||||
|
|
||||||
|
/** Set Web Service Type */
|
||||||
|
public void setWS_WebServiceType_ID (int WS_WebServiceType_ID);
|
||||||
|
|
||||||
|
/** Get Web Service Type */
|
||||||
|
public int getWS_WebServiceType_ID();
|
||||||
|
}
|
|
@ -0,0 +1,148 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Interface for WS_WebServiceTypeAccess
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS
|
||||||
|
*/
|
||||||
|
public interface I_WS_WebServiceTypeAccess
|
||||||
|
{
|
||||||
|
|
||||||
|
/** TableName=WS_WebServiceTypeAccess */
|
||||||
|
public static final String Table_Name = "WS_WebServiceTypeAccess";
|
||||||
|
|
||||||
|
/** AD_Table_ID=53168 */
|
||||||
|
public static final int Table_ID = MTable.getTable_ID(Table_Name);
|
||||||
|
|
||||||
|
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||||
|
|
||||||
|
/** AccessLevel = 6 - System - Client
|
||||||
|
*/
|
||||||
|
BigDecimal accessLevel = BigDecimal.valueOf(6);
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
|
||||||
|
/** Column name AD_Client_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||||
|
|
||||||
|
/** Get Client.
|
||||||
|
* Client/Tenant for this installation.
|
||||||
|
*/
|
||||||
|
public int getAD_Client_ID();
|
||||||
|
|
||||||
|
/** Column name AD_Org_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||||
|
|
||||||
|
/** Set Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public void setAD_Org_ID (int AD_Org_ID);
|
||||||
|
|
||||||
|
/** Get Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public int getAD_Org_ID();
|
||||||
|
|
||||||
|
/** Column name AD_Role_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Role_ID = "AD_Role_ID";
|
||||||
|
|
||||||
|
/** Set Role.
|
||||||
|
* Responsibility Role
|
||||||
|
*/
|
||||||
|
public void setAD_Role_ID (int AD_Role_ID);
|
||||||
|
|
||||||
|
/** Get Role.
|
||||||
|
* Responsibility Role
|
||||||
|
*/
|
||||||
|
public int getAD_Role_ID();
|
||||||
|
|
||||||
|
public I_AD_Role getAD_Role() throws RuntimeException;
|
||||||
|
|
||||||
|
/** Column name Created */
|
||||||
|
public static final String COLUMNNAME_Created = "Created";
|
||||||
|
|
||||||
|
/** Get Created.
|
||||||
|
* Date this record was created
|
||||||
|
*/
|
||||||
|
public Timestamp getCreated();
|
||||||
|
|
||||||
|
/** Column name CreatedBy */
|
||||||
|
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||||
|
|
||||||
|
/** Get Created By.
|
||||||
|
* User who created this records
|
||||||
|
*/
|
||||||
|
public int getCreatedBy();
|
||||||
|
|
||||||
|
/** Column name IsActive */
|
||||||
|
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||||
|
|
||||||
|
/** Set Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public void setIsActive (boolean IsActive);
|
||||||
|
|
||||||
|
/** Get Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public boolean isActive();
|
||||||
|
|
||||||
|
/** Column name IsReadWrite */
|
||||||
|
public static final String COLUMNNAME_IsReadWrite = "IsReadWrite";
|
||||||
|
|
||||||
|
/** Set Read Write.
|
||||||
|
* Field is read / write
|
||||||
|
*/
|
||||||
|
public void setIsReadWrite (boolean IsReadWrite);
|
||||||
|
|
||||||
|
/** Get Read Write.
|
||||||
|
* Field is read / write
|
||||||
|
*/
|
||||||
|
public boolean isReadWrite();
|
||||||
|
|
||||||
|
/** Column name Updated */
|
||||||
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
||||||
|
/** Get Updated.
|
||||||
|
* Date this record was updated
|
||||||
|
*/
|
||||||
|
public Timestamp getUpdated();
|
||||||
|
|
||||||
|
/** Column name UpdatedBy */
|
||||||
|
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||||
|
|
||||||
|
/** Get Updated By.
|
||||||
|
* User who updated this records
|
||||||
|
*/
|
||||||
|
public int getUpdatedBy();
|
||||||
|
|
||||||
|
/** Column name WS_WebServiceType_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID";
|
||||||
|
|
||||||
|
/** Set Web Service Type */
|
||||||
|
public void setWS_WebServiceType_ID (int WS_WebServiceType_ID);
|
||||||
|
|
||||||
|
/** Get Web Service Type */
|
||||||
|
public int getWS_WebServiceType_ID();
|
||||||
|
|
||||||
|
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
|
||||||
|
}
|
|
@ -0,0 +1,160 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.sql.Timestamp;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Interface for WS_WebService_Para
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS
|
||||||
|
*/
|
||||||
|
public interface I_WS_WebService_Para
|
||||||
|
{
|
||||||
|
|
||||||
|
/** TableName=WS_WebService_Para */
|
||||||
|
public static final String Table_Name = "WS_WebService_Para";
|
||||||
|
|
||||||
|
/** AD_Table_ID=53165 */
|
||||||
|
public static final int Table_ID = MTable.getTable_ID(Table_Name);
|
||||||
|
|
||||||
|
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||||
|
|
||||||
|
/** AccessLevel = 6 - System - Client
|
||||||
|
*/
|
||||||
|
BigDecimal accessLevel = BigDecimal.valueOf(6);
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
|
||||||
|
/** Column name AD_Client_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||||
|
|
||||||
|
/** Get Client.
|
||||||
|
* Client/Tenant for this installation.
|
||||||
|
*/
|
||||||
|
public int getAD_Client_ID();
|
||||||
|
|
||||||
|
/** Column name AD_Org_ID */
|
||||||
|
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||||
|
|
||||||
|
/** Set Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public void setAD_Org_ID (int AD_Org_ID);
|
||||||
|
|
||||||
|
/** Get Organization.
|
||||||
|
* Organizational entity within client
|
||||||
|
*/
|
||||||
|
public int getAD_Org_ID();
|
||||||
|
|
||||||
|
/** Column name ConstantValue */
|
||||||
|
public static final String COLUMNNAME_ConstantValue = "ConstantValue";
|
||||||
|
|
||||||
|
/** Set Constant Value.
|
||||||
|
* Constant value
|
||||||
|
*/
|
||||||
|
public void setConstantValue (String ConstantValue);
|
||||||
|
|
||||||
|
/** Get Constant Value.
|
||||||
|
* Constant value
|
||||||
|
*/
|
||||||
|
public String getConstantValue();
|
||||||
|
|
||||||
|
/** Column name Created */
|
||||||
|
public static final String COLUMNNAME_Created = "Created";
|
||||||
|
|
||||||
|
/** Get Created.
|
||||||
|
* Date this record was created
|
||||||
|
*/
|
||||||
|
public Timestamp getCreated();
|
||||||
|
|
||||||
|
/** Column name CreatedBy */
|
||||||
|
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||||
|
|
||||||
|
/** Get Created By.
|
||||||
|
* User who created this records
|
||||||
|
*/
|
||||||
|
public int getCreatedBy();
|
||||||
|
|
||||||
|
/** Column name IsActive */
|
||||||
|
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||||
|
|
||||||
|
/** Set Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public void setIsActive (boolean IsActive);
|
||||||
|
|
||||||
|
/** Get Active.
|
||||||
|
* The record is active in the system
|
||||||
|
*/
|
||||||
|
public boolean isActive();
|
||||||
|
|
||||||
|
/** Column name ParameterName */
|
||||||
|
public static final String COLUMNNAME_ParameterName = "ParameterName";
|
||||||
|
|
||||||
|
/** Set Parameter Name */
|
||||||
|
public void setParameterName (String ParameterName);
|
||||||
|
|
||||||
|
/** Get Parameter Name */
|
||||||
|
public String getParameterName();
|
||||||
|
|
||||||
|
/** Column name ParameterType */
|
||||||
|
public static final String COLUMNNAME_ParameterType = "ParameterType";
|
||||||
|
|
||||||
|
/** Set Parameter Type */
|
||||||
|
public void setParameterType (String ParameterType);
|
||||||
|
|
||||||
|
/** Get Parameter Type */
|
||||||
|
public String getParameterType();
|
||||||
|
|
||||||
|
/** Column name Updated */
|
||||||
|
public static final String COLUMNNAME_Updated = "Updated";
|
||||||
|
|
||||||
|
/** Get Updated.
|
||||||
|
* Date this record was updated
|
||||||
|
*/
|
||||||
|
public Timestamp getUpdated();
|
||||||
|
|
||||||
|
/** Column name UpdatedBy */
|
||||||
|
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||||
|
|
||||||
|
/** Get Updated By.
|
||||||
|
* User who updated this records
|
||||||
|
*/
|
||||||
|
public int getUpdatedBy();
|
||||||
|
|
||||||
|
/** Column name WS_WebService_Para_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebService_Para_ID = "WS_WebService_Para_ID";
|
||||||
|
|
||||||
|
/** Set Web Service Parameters */
|
||||||
|
public void setWS_WebService_Para_ID (int WS_WebService_Para_ID);
|
||||||
|
|
||||||
|
/** Get Web Service Parameters */
|
||||||
|
public int getWS_WebService_Para_ID();
|
||||||
|
|
||||||
|
/** Column name WS_WebServiceType_ID */
|
||||||
|
public static final String COLUMNNAME_WS_WebServiceType_ID = "WS_WebServiceType_ID";
|
||||||
|
|
||||||
|
/** Set Web Service Type */
|
||||||
|
public void setWS_WebServiceType_ID (int WS_WebServiceType_ID);
|
||||||
|
|
||||||
|
/** Get Web Service Type */
|
||||||
|
public int getWS_WebServiceType_ID();
|
||||||
|
|
||||||
|
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException;
|
||||||
|
}
|
|
@ -0,0 +1,214 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* This file is part of Adempiere ERP Bazaar *
|
||||||
|
* http://www.adempiere.org *
|
||||||
|
* *
|
||||||
|
* Copyright (C) Carlos Ruiz - globalqss *
|
||||||
|
* Copyright (C) Contributors *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU General Public License *
|
||||||
|
* as published by the Free Software Foundation; either version 2 *
|
||||||
|
* of the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the Free Software *
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||||
|
* MA 02110-1301, USA. *
|
||||||
|
* *
|
||||||
|
* Contributors: *
|
||||||
|
* - Carlos Ruiz (globalqss@users.sourceforge.net) *
|
||||||
|
* *
|
||||||
|
* Sponsors: *
|
||||||
|
* - GlobalQSS (http://www.globalqss.com) *
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.compiere.util.CCache;
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Web Services Model
|
||||||
|
*
|
||||||
|
* @author Carlos Ruiz
|
||||||
|
*/
|
||||||
|
public class MWebService extends X_WS_WebService
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 3561409141850981248L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get MWebService from Cache
|
||||||
|
* @param ctx context
|
||||||
|
* @param WS_WebService_ID id
|
||||||
|
* @return MWebService
|
||||||
|
*/
|
||||||
|
public static MWebService get (Properties ctx, int WS_WebService_ID)
|
||||||
|
{
|
||||||
|
Integer key = new Integer (WS_WebService_ID);
|
||||||
|
MWebService retValue = (MWebService) s_cache.get (key);
|
||||||
|
if (retValue != null)
|
||||||
|
return retValue;
|
||||||
|
retValue = new MWebService (ctx, WS_WebService_ID, null);
|
||||||
|
if (retValue.get_ID () != 0)
|
||||||
|
s_cache.put (key, retValue);
|
||||||
|
return retValue;
|
||||||
|
} // get
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get WebService from Cache
|
||||||
|
* @param ctx context
|
||||||
|
* @param webServiceValue
|
||||||
|
* @return Table
|
||||||
|
*/
|
||||||
|
public static MWebService get (Properties ctx, String webServiceValue)
|
||||||
|
{
|
||||||
|
if (webServiceValue == null)
|
||||||
|
return null;
|
||||||
|
Iterator<MWebService> it = s_cache.values().iterator();
|
||||||
|
while (it.hasNext())
|
||||||
|
{
|
||||||
|
MWebService retValue = it.next();
|
||||||
|
if (webServiceValue.equals(retValue.getValue()))
|
||||||
|
return retValue;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
MWebService retValue = null;
|
||||||
|
String sql = "SELECT * FROM WS_WebService WHERE Value=?";
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement (sql, null);
|
||||||
|
pstmt.setString(1, webServiceValue);
|
||||||
|
rs = pstmt.executeQuery ();
|
||||||
|
if (rs.next ())
|
||||||
|
retValue = new MWebService (ctx, rs, null);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
s_log.log(Level.SEVERE, sql, e);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DB.close(rs, pstmt);
|
||||||
|
rs = null;
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
if (retValue != null)
|
||||||
|
{
|
||||||
|
Integer key = new Integer (retValue.getWS_WebService_ID());
|
||||||
|
s_cache.put (key, retValue);
|
||||||
|
}
|
||||||
|
return retValue;
|
||||||
|
} // get
|
||||||
|
|
||||||
|
/** Methods */
|
||||||
|
private X_WS_WebServiceMethod[] m_methods = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Methods
|
||||||
|
* @param requery requery
|
||||||
|
* @return array of methods
|
||||||
|
*/
|
||||||
|
public X_WS_WebServiceMethod[] getMethods (boolean requery)
|
||||||
|
{
|
||||||
|
if (m_methods != null && !requery)
|
||||||
|
return m_methods;
|
||||||
|
String sql = "SELECT * FROM WS_WebServiceMethod WHERE WS_WebService_ID=? AND IsActive='Y' ORDER BY Value";
|
||||||
|
ArrayList<X_WS_WebServiceMethod> list = new ArrayList<X_WS_WebServiceMethod>();
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement (sql, get_TrxName());
|
||||||
|
pstmt.setInt (1, getWS_WebService_ID());
|
||||||
|
rs = pstmt.executeQuery ();
|
||||||
|
while (rs.next ())
|
||||||
|
list.add (new X_WS_WebServiceMethod (getCtx(), rs, get_TrxName()));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, sql, e);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DB.close(rs, pstmt);
|
||||||
|
rs = null;
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
m_methods = new X_WS_WebServiceMethod[list.size ()];
|
||||||
|
list.toArray (m_methods);
|
||||||
|
return m_methods;
|
||||||
|
} // getMethods
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Method
|
||||||
|
* @param methodValue
|
||||||
|
* @return method if found
|
||||||
|
*/
|
||||||
|
public X_WS_WebServiceMethod getMethod (String methodValue)
|
||||||
|
{
|
||||||
|
if (methodValue == null || methodValue.length() == 0)
|
||||||
|
return null;
|
||||||
|
getMethods(false);
|
||||||
|
//
|
||||||
|
for (int i = 0; i < m_methods.length; i++)
|
||||||
|
{
|
||||||
|
if (methodValue.equals(m_methods[i].getValue()))
|
||||||
|
return m_methods[i];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
} // getMethod
|
||||||
|
|
||||||
|
/** Cache */
|
||||||
|
private static CCache<Integer,MWebService> s_cache = new CCache<Integer,MWebService>("WS_WebService", 20);
|
||||||
|
|
||||||
|
/** Static Logger */
|
||||||
|
private static CLogger s_log = CLogger.getCLogger (MWebService.class);
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Standard Constructor
|
||||||
|
* @param ctx context
|
||||||
|
* @param WS_WebService_ID
|
||||||
|
* @param trxName transaction
|
||||||
|
*/
|
||||||
|
public MWebService (Properties ctx, int WS_WebService_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, WS_WebService_ID, trxName);
|
||||||
|
/** if (WS_WebService_ID == 0)
|
||||||
|
{
|
||||||
|
setName (null);
|
||||||
|
setValue (null);
|
||||||
|
setWS_WebService_ID (0);
|
||||||
|
} */
|
||||||
|
} // MWebService
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Constructor
|
||||||
|
* @param ctx context
|
||||||
|
* @param rs result set
|
||||||
|
* @param trxName transaction
|
||||||
|
*/
|
||||||
|
public MWebService (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super(ctx, rs, trxName);
|
||||||
|
} // MWebService
|
||||||
|
|
||||||
|
} // MWebService
|
|
@ -0,0 +1,273 @@
|
||||||
|
/**********************************************************************
|
||||||
|
* This file is part of Adempiere ERP Bazaar *
|
||||||
|
* http://www.adempiere.org *
|
||||||
|
* *
|
||||||
|
* Copyright (C) Carlos Ruiz - globalqss *
|
||||||
|
* Copyright (C) Contributors *
|
||||||
|
* *
|
||||||
|
* This program is free software; you can redistribute it and/or *
|
||||||
|
* modify it under the terms of the GNU General Public License *
|
||||||
|
* as published by the Free Software Foundation; either version 2 *
|
||||||
|
* of the License, or (at your option) any later version. *
|
||||||
|
* *
|
||||||
|
* This program is distributed in the hope that it will be useful, *
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||||
|
* GNU General Public License for more details. *
|
||||||
|
* *
|
||||||
|
* You should have received a copy of the GNU General Public License *
|
||||||
|
* along with this program; if not, write to the Free Software *
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||||
|
* MA 02110-1301, USA. *
|
||||||
|
* *
|
||||||
|
* Contributors: *
|
||||||
|
* - Carlos Ruiz (globalqss@users.sourceforge.net) *
|
||||||
|
* *
|
||||||
|
* Sponsors: *
|
||||||
|
* - GlobalQSS (http://www.globalqss.com) *
|
||||||
|
***********************************************************************/
|
||||||
|
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.PreparedStatement;
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Properties;
|
||||||
|
import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.compiere.util.CLogger;
|
||||||
|
import org.compiere.util.DB;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Web Services Type Model
|
||||||
|
*
|
||||||
|
* @author Carlos Ruiz
|
||||||
|
*/
|
||||||
|
public class MWebServiceType extends X_WS_WebServiceType
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 134887822892217528L;
|
||||||
|
|
||||||
|
/** Parameters */
|
||||||
|
private X_WS_WebService_Para[] m_para = null;
|
||||||
|
|
||||||
|
/** Allowed input columns */
|
||||||
|
private String[] m_inputcolumnnames = null;
|
||||||
|
/** Allowed output columns */
|
||||||
|
private String[] m_outputcolumnnames = null;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Parameters
|
||||||
|
* @param requery requery
|
||||||
|
* @return array of methods
|
||||||
|
*/
|
||||||
|
public X_WS_WebService_Para[] getParameters (boolean requery)
|
||||||
|
{
|
||||||
|
if (m_para != null && !requery)
|
||||||
|
return m_para;
|
||||||
|
String sql = "SELECT * FROM WS_WebService_Para WHERE WS_WebServiceType_ID=? AND IsActive='Y' ORDER BY ParameterName";
|
||||||
|
ArrayList<X_WS_WebService_Para> list = new ArrayList<X_WS_WebService_Para>();
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement (sql, get_TrxName());
|
||||||
|
pstmt.setInt (1, getWS_WebServiceType_ID());
|
||||||
|
rs = pstmt.executeQuery ();
|
||||||
|
while (rs.next ())
|
||||||
|
list.add (new X_WS_WebService_Para (getCtx(), rs, get_TrxName()));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, sql, e);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DB.close(rs, pstmt);
|
||||||
|
rs = null;
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
m_para = new X_WS_WebService_Para[list.size ()];
|
||||||
|
list.toArray (m_para);
|
||||||
|
return m_para;
|
||||||
|
} // getParameters
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Parameter
|
||||||
|
* @param parameterName
|
||||||
|
* @return parameter if found
|
||||||
|
*/
|
||||||
|
public X_WS_WebService_Para getParameter (String parameterName)
|
||||||
|
{
|
||||||
|
if (parameterName == null || parameterName.length() == 0)
|
||||||
|
return null;
|
||||||
|
getParameters(false);
|
||||||
|
//
|
||||||
|
for (int i = 0; i < m_para.length; i++)
|
||||||
|
{
|
||||||
|
if (parameterName.equals(m_para[i].getParameterName()))
|
||||||
|
return m_para[i];
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
} // getParameter
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Input Columnnames
|
||||||
|
* @param requery requery
|
||||||
|
* @return array of methods
|
||||||
|
*/
|
||||||
|
public String[] getInputColumnNames (boolean requery)
|
||||||
|
{
|
||||||
|
if (m_inputcolumnnames != null && !requery)
|
||||||
|
return m_inputcolumnnames;
|
||||||
|
String sql = "SELECT c.ColumnName FROM WS_WebServiceFieldInput f, AD_Column c " +
|
||||||
|
"WHERE f.WS_WebServiceType_ID=? " +
|
||||||
|
"AND c.AD_Column_ID=f.AD_Column_ID " +
|
||||||
|
"AND c.IsActive='Y' " +
|
||||||
|
"AND f.IsActive='Y' " +
|
||||||
|
"ORDER BY c.ColumnName";
|
||||||
|
ArrayList<String> list = new ArrayList<String>();
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement (sql, get_TrxName());
|
||||||
|
pstmt.setInt (1, getWS_WebServiceType_ID());
|
||||||
|
rs = pstmt.executeQuery ();
|
||||||
|
while (rs.next ())
|
||||||
|
list.add (rs.getString(1));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, sql, e);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DB.close(rs, pstmt);
|
||||||
|
rs = null;
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
m_inputcolumnnames = new String[list.size ()];
|
||||||
|
list.toArray (m_inputcolumnnames);
|
||||||
|
return m_inputcolumnnames;
|
||||||
|
} // getInputColumnNames
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is Input Column Name Allowed
|
||||||
|
* @param columnName
|
||||||
|
* @return true if allowed
|
||||||
|
*/
|
||||||
|
public boolean isInputColumnNameAllowed (String columnName)
|
||||||
|
{
|
||||||
|
if (columnName == null || columnName.length() == 0)
|
||||||
|
return false;
|
||||||
|
getInputColumnNames(false);
|
||||||
|
//
|
||||||
|
for (int i = 0; i < m_inputcolumnnames.length; i++)
|
||||||
|
{
|
||||||
|
if (columnName.equals(m_inputcolumnnames[i]))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} // isInputColumnNameAllowed
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Output Columnnames
|
||||||
|
* @param requery requery
|
||||||
|
* @return array of methods
|
||||||
|
*/
|
||||||
|
public String[] getOutputColumnNames (boolean requery)
|
||||||
|
{
|
||||||
|
if (m_outputcolumnnames != null && !requery)
|
||||||
|
return m_outputcolumnnames;
|
||||||
|
String sql = "SELECT c.ColumnName FROM WS_WebServiceFieldOutput f, AD_Column c " +
|
||||||
|
"WHERE f.WS_WebServiceType_ID=? " +
|
||||||
|
"AND c.AD_Column_ID=f.AD_Column_ID " +
|
||||||
|
"AND c.IsActive='Y' " +
|
||||||
|
"AND f.IsActive='Y' " +
|
||||||
|
"ORDER BY c.ColumnName";
|
||||||
|
ArrayList<String> list = new ArrayList<String>();
|
||||||
|
PreparedStatement pstmt = null;
|
||||||
|
ResultSet rs = null;
|
||||||
|
try
|
||||||
|
{
|
||||||
|
pstmt = DB.prepareStatement (sql, get_TrxName());
|
||||||
|
pstmt.setInt (1, getWS_WebServiceType_ID());
|
||||||
|
rs = pstmt.executeQuery ();
|
||||||
|
while (rs.next ())
|
||||||
|
list.add (rs.getString(1));
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
log.log(Level.SEVERE, sql, e);
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
DB.close(rs, pstmt);
|
||||||
|
rs = null;
|
||||||
|
pstmt = null;
|
||||||
|
}
|
||||||
|
//
|
||||||
|
m_outputcolumnnames = new String[list.size ()];
|
||||||
|
list.toArray (m_outputcolumnnames);
|
||||||
|
return m_outputcolumnnames;
|
||||||
|
} // getOutputColumnNames
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Is Output Column Name Allowed
|
||||||
|
* @param columnName
|
||||||
|
* @return true if allowed
|
||||||
|
*/
|
||||||
|
public boolean isOutputColumnNameAllowed (String columnName)
|
||||||
|
{
|
||||||
|
if (columnName == null || columnName.length() == 0)
|
||||||
|
return false;
|
||||||
|
getOutputColumnNames(false);
|
||||||
|
//
|
||||||
|
for (int i = 0; i < m_outputcolumnnames.length; i++)
|
||||||
|
{
|
||||||
|
if (columnName.equals(m_outputcolumnnames[i]))
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
} // isOutputColumnNameAllowed
|
||||||
|
|
||||||
|
/** Static Logger */
|
||||||
|
private static CLogger s_log = CLogger.getCLogger (MWebServiceType.class);
|
||||||
|
|
||||||
|
/**************************************************************************
|
||||||
|
* Standard Constructor
|
||||||
|
* @param ctx context
|
||||||
|
* @param WS_WebServiceType_ID
|
||||||
|
* @param trxName transaction
|
||||||
|
*/
|
||||||
|
public MWebServiceType (Properties ctx, int WS_WebServiceType_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, WS_WebServiceType_ID, trxName);
|
||||||
|
/** if (WS_WebServiceType_ID == 0)
|
||||||
|
{
|
||||||
|
setName (null);
|
||||||
|
setValue (null);
|
||||||
|
setWS_WebService_ID (0);
|
||||||
|
setWS_WebServiceMethod_ID (0);
|
||||||
|
setWS_WebServiceType_ID (0);
|
||||||
|
} */
|
||||||
|
} // MWebServiceType
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Load Constructor
|
||||||
|
* @param ctx context
|
||||||
|
* @param rs result set
|
||||||
|
* @param trxName transaction
|
||||||
|
*/
|
||||||
|
public MWebServiceType (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super(ctx, rs, trxName);
|
||||||
|
} // MWebServiceType
|
||||||
|
|
||||||
|
} // MWebServiceType
|
|
@ -0,0 +1,170 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
/** Generated Model - DO NOT CHANGE */
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.Properties;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Model for WS_WebService
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS - $Id$ */
|
||||||
|
public class X_WS_WebService extends PO implements I_WS_WebService, I_Persistent
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 20100713L;
|
||||||
|
|
||||||
|
/** Standard Constructor */
|
||||||
|
public X_WS_WebService (Properties ctx, int WS_WebService_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, WS_WebService_ID, trxName);
|
||||||
|
/** if (WS_WebService_ID == 0)
|
||||||
|
{
|
||||||
|
setName (null);
|
||||||
|
setValue (null);
|
||||||
|
setWS_WebService_ID (0);
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Constructor */
|
||||||
|
public X_WS_WebService (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, rs, trxName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** AccessLevel
|
||||||
|
* @return 4 - System
|
||||||
|
*/
|
||||||
|
protected int get_AccessLevel()
|
||||||
|
{
|
||||||
|
return accessLevel.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
protected POInfo initPO (Properties ctx)
|
||||||
|
{
|
||||||
|
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||||
|
return poi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer ("X_WS_WebService[")
|
||||||
|
.append(get_ID()).append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Description.
|
||||||
|
@param Description
|
||||||
|
Optional short description of the record
|
||||||
|
*/
|
||||||
|
public void setDescription (String Description)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Description, Description);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Description.
|
||||||
|
@return Optional short description of the record
|
||||||
|
*/
|
||||||
|
public String getDescription ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Description);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Comment/Help.
|
||||||
|
@param Help
|
||||||
|
Comment or Hint
|
||||||
|
*/
|
||||||
|
public void setHelp (String Help)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Help, Help);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Comment/Help.
|
||||||
|
@return Comment or Hint
|
||||||
|
*/
|
||||||
|
public String getHelp ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Help);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Name.
|
||||||
|
@param Name
|
||||||
|
Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public void setName (String Name)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Name, Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Name.
|
||||||
|
@return Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public String getName ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Record ID/ColumnName
|
||||||
|
@return ID/ColumnName pair
|
||||||
|
*/
|
||||||
|
public KeyNamePair getKeyNamePair()
|
||||||
|
{
|
||||||
|
return new KeyNamePair(get_ID(), getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Search Key.
|
||||||
|
@param Value
|
||||||
|
Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public void setValue (String Value)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Value, Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Search Key.
|
||||||
|
@return Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public String getValue ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Web Service.
|
||||||
|
@param WS_WebService_ID Web Service */
|
||||||
|
public void setWS_WebService_ID (int WS_WebService_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebService_ID < 1)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, Integer.valueOf(WS_WebService_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service.
|
||||||
|
@return Web Service */
|
||||||
|
public int getWS_WebService_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,154 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
/** Generated Model - DO NOT CHANGE */
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.Properties;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Model for WS_WebServiceFieldInput
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS - $Id$ */
|
||||||
|
public class X_WS_WebServiceFieldInput extends PO implements I_WS_WebServiceFieldInput, I_Persistent
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 20100713L;
|
||||||
|
|
||||||
|
/** Standard Constructor */
|
||||||
|
public X_WS_WebServiceFieldInput (Properties ctx, int WS_WebServiceFieldInput_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, WS_WebServiceFieldInput_ID, trxName);
|
||||||
|
/** if (WS_WebServiceFieldInput_ID == 0)
|
||||||
|
{
|
||||||
|
setWS_WebServiceFieldInput_ID (0);
|
||||||
|
setWS_WebServiceType_ID (0);
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Constructor */
|
||||||
|
public X_WS_WebServiceFieldInput (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, rs, trxName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** AccessLevel
|
||||||
|
* @return 6 - System - Client
|
||||||
|
*/
|
||||||
|
protected int get_AccessLevel()
|
||||||
|
{
|
||||||
|
return accessLevel.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
protected POInfo initPO (Properties ctx)
|
||||||
|
{
|
||||||
|
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||||
|
return poi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer ("X_WS_WebServiceFieldInput[")
|
||||||
|
.append(get_ID()).append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_AD_Column getAD_Column() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_AD_Column)MTable.get(getCtx(), I_AD_Column.Table_Name)
|
||||||
|
.getPO(getAD_Column_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Column.
|
||||||
|
@param AD_Column_ID
|
||||||
|
Column in the table
|
||||||
|
*/
|
||||||
|
public void setAD_Column_ID (int AD_Column_ID)
|
||||||
|
{
|
||||||
|
if (AD_Column_ID < 1)
|
||||||
|
set_Value (COLUMNNAME_AD_Column_ID, null);
|
||||||
|
else
|
||||||
|
set_Value (COLUMNNAME_AD_Column_ID, Integer.valueOf(AD_Column_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Column.
|
||||||
|
@return Column in the table
|
||||||
|
*/
|
||||||
|
public int getAD_Column_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Column_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Web Service Field Input.
|
||||||
|
@param WS_WebServiceFieldInput_ID Web Service Field Input */
|
||||||
|
public void setWS_WebServiceFieldInput_ID (int WS_WebServiceFieldInput_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebServiceFieldInput_ID < 1)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldInput_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldInput_ID, Integer.valueOf(WS_WebServiceFieldInput_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service Field Input.
|
||||||
|
@return Web Service Field Input */
|
||||||
|
public int getWS_WebServiceFieldInput_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceFieldInput_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Record ID/ColumnName
|
||||||
|
@return ID/ColumnName pair
|
||||||
|
*/
|
||||||
|
public KeyNamePair getKeyNamePair()
|
||||||
|
{
|
||||||
|
return new KeyNamePair(get_ID(), String.valueOf(getWS_WebServiceFieldInput_ID()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name)
|
||||||
|
.getPO(getWS_WebServiceType_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Web Service Type.
|
||||||
|
@param WS_WebServiceType_ID Web Service Type */
|
||||||
|
public void setWS_WebServiceType_ID (int WS_WebServiceType_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebServiceType_ID < 1)
|
||||||
|
set_Value (COLUMNNAME_WS_WebServiceType_ID, null);
|
||||||
|
else
|
||||||
|
set_Value (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service Type.
|
||||||
|
@return Web Service Type */
|
||||||
|
public int getWS_WebServiceType_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,154 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
/** Generated Model - DO NOT CHANGE */
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.Properties;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Model for WS_WebServiceFieldOutput
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS - $Id$ */
|
||||||
|
public class X_WS_WebServiceFieldOutput extends PO implements I_WS_WebServiceFieldOutput, I_Persistent
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 20100713L;
|
||||||
|
|
||||||
|
/** Standard Constructor */
|
||||||
|
public X_WS_WebServiceFieldOutput (Properties ctx, int WS_WebServiceFieldOutput_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, WS_WebServiceFieldOutput_ID, trxName);
|
||||||
|
/** if (WS_WebServiceFieldOutput_ID == 0)
|
||||||
|
{
|
||||||
|
setWS_WebServiceFieldOutput_ID (0);
|
||||||
|
setWS_WebServiceType_ID (0);
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Constructor */
|
||||||
|
public X_WS_WebServiceFieldOutput (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, rs, trxName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** AccessLevel
|
||||||
|
* @return 6 - System - Client
|
||||||
|
*/
|
||||||
|
protected int get_AccessLevel()
|
||||||
|
{
|
||||||
|
return accessLevel.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
protected POInfo initPO (Properties ctx)
|
||||||
|
{
|
||||||
|
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||||
|
return poi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer ("X_WS_WebServiceFieldOutput[")
|
||||||
|
.append(get_ID()).append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_AD_Column getAD_Column() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_AD_Column)MTable.get(getCtx(), I_AD_Column.Table_Name)
|
||||||
|
.getPO(getAD_Column_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Column.
|
||||||
|
@param AD_Column_ID
|
||||||
|
Column in the table
|
||||||
|
*/
|
||||||
|
public void setAD_Column_ID (int AD_Column_ID)
|
||||||
|
{
|
||||||
|
if (AD_Column_ID < 1)
|
||||||
|
set_Value (COLUMNNAME_AD_Column_ID, null);
|
||||||
|
else
|
||||||
|
set_Value (COLUMNNAME_AD_Column_ID, Integer.valueOf(AD_Column_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Column.
|
||||||
|
@return Column in the table
|
||||||
|
*/
|
||||||
|
public int getAD_Column_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Column_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Web Service Field Output.
|
||||||
|
@param WS_WebServiceFieldOutput_ID Web Service Field Output */
|
||||||
|
public void setWS_WebServiceFieldOutput_ID (int WS_WebServiceFieldOutput_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebServiceFieldOutput_ID < 1)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldOutput_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebServiceFieldOutput_ID, Integer.valueOf(WS_WebServiceFieldOutput_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service Field Output.
|
||||||
|
@return Web Service Field Output */
|
||||||
|
public int getWS_WebServiceFieldOutput_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceFieldOutput_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Record ID/ColumnName
|
||||||
|
@return ID/ColumnName pair
|
||||||
|
*/
|
||||||
|
public KeyNamePair getKeyNamePair()
|
||||||
|
{
|
||||||
|
return new KeyNamePair(get_ID(), String.valueOf(getWS_WebServiceFieldOutput_ID()));
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name)
|
||||||
|
.getPO(getWS_WebServiceType_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Web Service Type.
|
||||||
|
@param WS_WebServiceType_ID Web Service Type */
|
||||||
|
public void setWS_WebServiceType_ID (int WS_WebServiceType_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebServiceType_ID < 1)
|
||||||
|
set_Value (COLUMNNAME_WS_WebServiceType_ID, null);
|
||||||
|
else
|
||||||
|
set_Value (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service Type.
|
||||||
|
@return Web Service Type */
|
||||||
|
public int getWS_WebServiceType_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,195 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
/** Generated Model - DO NOT CHANGE */
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.Properties;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Model for WS_WebServiceMethod
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS - $Id$ */
|
||||||
|
public class X_WS_WebServiceMethod extends PO implements I_WS_WebServiceMethod, I_Persistent
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 20100713L;
|
||||||
|
|
||||||
|
/** Standard Constructor */
|
||||||
|
public X_WS_WebServiceMethod (Properties ctx, int WS_WebServiceMethod_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, WS_WebServiceMethod_ID, trxName);
|
||||||
|
/** if (WS_WebServiceMethod_ID == 0)
|
||||||
|
{
|
||||||
|
setName (null);
|
||||||
|
setValue (null);
|
||||||
|
setWS_WebServiceMethod_ID (0);
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Constructor */
|
||||||
|
public X_WS_WebServiceMethod (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, rs, trxName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** AccessLevel
|
||||||
|
* @return 4 - System
|
||||||
|
*/
|
||||||
|
protected int get_AccessLevel()
|
||||||
|
{
|
||||||
|
return accessLevel.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
protected POInfo initPO (Properties ctx)
|
||||||
|
{
|
||||||
|
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||||
|
return poi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer ("X_WS_WebServiceMethod[")
|
||||||
|
.append(get_ID()).append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Description.
|
||||||
|
@param Description
|
||||||
|
Optional short description of the record
|
||||||
|
*/
|
||||||
|
public void setDescription (String Description)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Description, Description);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Description.
|
||||||
|
@return Optional short description of the record
|
||||||
|
*/
|
||||||
|
public String getDescription ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Description);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Comment/Help.
|
||||||
|
@param Help
|
||||||
|
Comment or Hint
|
||||||
|
*/
|
||||||
|
public void setHelp (String Help)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Help, Help);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Comment/Help.
|
||||||
|
@return Comment or Hint
|
||||||
|
*/
|
||||||
|
public String getHelp ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Help);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Name.
|
||||||
|
@param Name
|
||||||
|
Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public void setName (String Name)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Name, Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Name.
|
||||||
|
@return Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public String getName ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Search Key.
|
||||||
|
@param Value
|
||||||
|
Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public void setValue (String Value)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Value, Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Search Key.
|
||||||
|
@return Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public String getValue ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_WS_WebService getWS_WebService() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_WS_WebService)MTable.get(getCtx(), I_WS_WebService.Table_Name)
|
||||||
|
.getPO(getWS_WebService_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Web Service.
|
||||||
|
@param WS_WebService_ID Web Service */
|
||||||
|
public void setWS_WebService_ID (int WS_WebService_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebService_ID < 1)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebService_ID, Integer.valueOf(WS_WebService_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service.
|
||||||
|
@return Web Service */
|
||||||
|
public int getWS_WebService_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Record ID/ColumnName
|
||||||
|
@return ID/ColumnName pair
|
||||||
|
*/
|
||||||
|
public KeyNamePair getKeyNamePair()
|
||||||
|
{
|
||||||
|
return new KeyNamePair(get_ID(), String.valueOf(getWS_WebService_ID()));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Web Service Method.
|
||||||
|
@param WS_WebServiceMethod_ID Web Service Method */
|
||||||
|
public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebServiceMethod_ID < 1)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebServiceMethod_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebServiceMethod_ID, Integer.valueOf(WS_WebServiceMethod_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service Method.
|
||||||
|
@return Web Service Method */
|
||||||
|
public int getWS_WebServiceMethod_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceMethod_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,250 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
/** Generated Model - DO NOT CHANGE */
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.Properties;
|
||||||
|
import org.compiere.util.KeyNamePair;
|
||||||
|
|
||||||
|
/** Generated Model for WS_WebServiceType
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS - $Id$ */
|
||||||
|
public class X_WS_WebServiceType extends PO implements I_WS_WebServiceType, I_Persistent
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 20100713L;
|
||||||
|
|
||||||
|
/** Standard Constructor */
|
||||||
|
public X_WS_WebServiceType (Properties ctx, int WS_WebServiceType_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, WS_WebServiceType_ID, trxName);
|
||||||
|
/** if (WS_WebServiceType_ID == 0)
|
||||||
|
{
|
||||||
|
setName (null);
|
||||||
|
setValue (null);
|
||||||
|
setWS_WebService_ID (0);
|
||||||
|
setWS_WebServiceMethod_ID (0);
|
||||||
|
setWS_WebServiceType_ID (0);
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Constructor */
|
||||||
|
public X_WS_WebServiceType (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, rs, trxName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** AccessLevel
|
||||||
|
* @return 6 - System - Client
|
||||||
|
*/
|
||||||
|
protected int get_AccessLevel()
|
||||||
|
{
|
||||||
|
return accessLevel.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
protected POInfo initPO (Properties ctx)
|
||||||
|
{
|
||||||
|
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||||
|
return poi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer ("X_WS_WebServiceType[")
|
||||||
|
.append(get_ID()).append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_AD_Table getAD_Table() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_AD_Table)MTable.get(getCtx(), I_AD_Table.Table_Name)
|
||||||
|
.getPO(getAD_Table_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Table.
|
||||||
|
@param AD_Table_ID
|
||||||
|
Database Table information
|
||||||
|
*/
|
||||||
|
public void setAD_Table_ID (int AD_Table_ID)
|
||||||
|
{
|
||||||
|
if (AD_Table_ID < 1)
|
||||||
|
set_Value (COLUMNNAME_AD_Table_ID, null);
|
||||||
|
else
|
||||||
|
set_Value (COLUMNNAME_AD_Table_ID, Integer.valueOf(AD_Table_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Table.
|
||||||
|
@return Database Table information
|
||||||
|
*/
|
||||||
|
public int getAD_Table_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Table_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Description.
|
||||||
|
@param Description
|
||||||
|
Optional short description of the record
|
||||||
|
*/
|
||||||
|
public void setDescription (String Description)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Description, Description);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Description.
|
||||||
|
@return Optional short description of the record
|
||||||
|
*/
|
||||||
|
public String getDescription ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Description);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Comment/Help.
|
||||||
|
@param Help
|
||||||
|
Comment or Hint
|
||||||
|
*/
|
||||||
|
public void setHelp (String Help)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Help, Help);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Comment/Help.
|
||||||
|
@return Comment or Hint
|
||||||
|
*/
|
||||||
|
public String getHelp ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Help);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Name.
|
||||||
|
@param Name
|
||||||
|
Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public void setName (String Name)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Name, Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Name.
|
||||||
|
@return Alphanumeric identifier of the entity
|
||||||
|
*/
|
||||||
|
public String getName ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Name);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Record ID/ColumnName
|
||||||
|
@return ID/ColumnName pair
|
||||||
|
*/
|
||||||
|
public KeyNamePair getKeyNamePair()
|
||||||
|
{
|
||||||
|
return new KeyNamePair(get_ID(), getName());
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Search Key.
|
||||||
|
@param Value
|
||||||
|
Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public void setValue (String Value)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_Value, Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Search Key.
|
||||||
|
@return Search key for the record in the format required - must be unique
|
||||||
|
*/
|
||||||
|
public String getValue ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_WS_WebService getWS_WebService() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_WS_WebService)MTable.get(getCtx(), I_WS_WebService.Table_Name)
|
||||||
|
.getPO(getWS_WebService_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Web Service.
|
||||||
|
@param WS_WebService_ID Web Service */
|
||||||
|
public void setWS_WebService_ID (int WS_WebService_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebService_ID < 1)
|
||||||
|
set_Value (COLUMNNAME_WS_WebService_ID, null);
|
||||||
|
else
|
||||||
|
set_Value (COLUMNNAME_WS_WebService_ID, Integer.valueOf(WS_WebService_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service.
|
||||||
|
@return Web Service */
|
||||||
|
public int getWS_WebService_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_WS_WebServiceMethod getWS_WebServiceMethod() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_WS_WebServiceMethod)MTable.get(getCtx(), I_WS_WebServiceMethod.Table_Name)
|
||||||
|
.getPO(getWS_WebServiceMethod_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Web Service Method.
|
||||||
|
@param WS_WebServiceMethod_ID Web Service Method */
|
||||||
|
public void setWS_WebServiceMethod_ID (int WS_WebServiceMethod_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebServiceMethod_ID < 1)
|
||||||
|
set_Value (COLUMNNAME_WS_WebServiceMethod_ID, null);
|
||||||
|
else
|
||||||
|
set_Value (COLUMNNAME_WS_WebServiceMethod_ID, Integer.valueOf(WS_WebServiceMethod_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service Method.
|
||||||
|
@return Web Service Method */
|
||||||
|
public int getWS_WebServiceMethod_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceMethod_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Web Service Type.
|
||||||
|
@param WS_WebServiceType_ID Web Service Type */
|
||||||
|
public void setWS_WebServiceType_ID (int WS_WebServiceType_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebServiceType_ID < 1)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service Type.
|
||||||
|
@return Web Service Type */
|
||||||
|
public int getWS_WebServiceType_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,151 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
/** Generated Model - DO NOT CHANGE */
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
/** Generated Model for WS_WebServiceTypeAccess
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS - $Id$ */
|
||||||
|
public class X_WS_WebServiceTypeAccess extends PO implements I_WS_WebServiceTypeAccess, I_Persistent
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 20100713L;
|
||||||
|
|
||||||
|
/** Standard Constructor */
|
||||||
|
public X_WS_WebServiceTypeAccess (Properties ctx, int WS_WebServiceTypeAccess_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, WS_WebServiceTypeAccess_ID, trxName);
|
||||||
|
/** if (WS_WebServiceTypeAccess_ID == 0)
|
||||||
|
{
|
||||||
|
setAD_Role_ID (0);
|
||||||
|
setIsReadWrite (true);
|
||||||
|
// Y
|
||||||
|
setWS_WebServiceType_ID (0);
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Constructor */
|
||||||
|
public X_WS_WebServiceTypeAccess (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, rs, trxName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** AccessLevel
|
||||||
|
* @return 6 - System - Client
|
||||||
|
*/
|
||||||
|
protected int get_AccessLevel()
|
||||||
|
{
|
||||||
|
return accessLevel.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
protected POInfo initPO (Properties ctx)
|
||||||
|
{
|
||||||
|
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||||
|
return poi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer ("X_WS_WebServiceTypeAccess[")
|
||||||
|
.append(get_ID()).append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_AD_Role getAD_Role() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_AD_Role)MTable.get(getCtx(), I_AD_Role.Table_Name)
|
||||||
|
.getPO(getAD_Role_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Role.
|
||||||
|
@param AD_Role_ID
|
||||||
|
Responsibility Role
|
||||||
|
*/
|
||||||
|
public void setAD_Role_ID (int AD_Role_ID)
|
||||||
|
{
|
||||||
|
if (AD_Role_ID < 0)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_AD_Role_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_AD_Role_ID, Integer.valueOf(AD_Role_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Role.
|
||||||
|
@return Responsibility Role
|
||||||
|
*/
|
||||||
|
public int getAD_Role_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_AD_Role_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Read Write.
|
||||||
|
@param IsReadWrite
|
||||||
|
Field is read / write
|
||||||
|
*/
|
||||||
|
public void setIsReadWrite (boolean IsReadWrite)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_IsReadWrite, Boolean.valueOf(IsReadWrite));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Read Write.
|
||||||
|
@return Field is read / write
|
||||||
|
*/
|
||||||
|
public boolean isReadWrite ()
|
||||||
|
{
|
||||||
|
Object oo = get_Value(COLUMNNAME_IsReadWrite);
|
||||||
|
if (oo != null)
|
||||||
|
{
|
||||||
|
if (oo instanceof Boolean)
|
||||||
|
return ((Boolean)oo).booleanValue();
|
||||||
|
return "Y".equals(oo);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name)
|
||||||
|
.getPO(getWS_WebServiceType_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Web Service Type.
|
||||||
|
@param WS_WebServiceType_ID Web Service Type */
|
||||||
|
public void setWS_WebServiceType_ID (int WS_WebServiceType_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebServiceType_ID < 1)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service Type.
|
||||||
|
@return Web Service Type */
|
||||||
|
public int getWS_WebServiceType_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,170 @@
|
||||||
|
/******************************************************************************
|
||||||
|
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||||
|
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||||
|
* This program is free software, you can redistribute it and/or modify it *
|
||||||
|
* under the terms version 2 of the GNU General Public License as published *
|
||||||
|
* by the Free Software Foundation. This program is distributed in the hope *
|
||||||
|
* that it will be useful, but WITHOUT ANY WARRANTY, without even the implied *
|
||||||
|
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||||
|
* See the GNU General Public License for more details. *
|
||||||
|
* You should have received a copy of the GNU General Public License along *
|
||||||
|
* with this program, if not, write to the Free Software Foundation, Inc., *
|
||||||
|
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||||
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
*****************************************************************************/
|
||||||
|
/** Generated Model - DO NOT CHANGE */
|
||||||
|
package org.compiere.model;
|
||||||
|
|
||||||
|
import java.sql.ResultSet;
|
||||||
|
import java.util.Properties;
|
||||||
|
|
||||||
|
/** Generated Model for WS_WebService_Para
|
||||||
|
* @author Adempiere (generated)
|
||||||
|
* @version Release 3.6.0LTS - $Id$ */
|
||||||
|
public class X_WS_WebService_Para extends PO implements I_WS_WebService_Para, I_Persistent
|
||||||
|
{
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = 20100713L;
|
||||||
|
|
||||||
|
/** Standard Constructor */
|
||||||
|
public X_WS_WebService_Para (Properties ctx, int WS_WebService_Para_ID, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, WS_WebService_Para_ID, trxName);
|
||||||
|
/** if (WS_WebService_Para_ID == 0)
|
||||||
|
{
|
||||||
|
setParameterType (null);
|
||||||
|
setWS_WebService_Para_ID (0);
|
||||||
|
setWS_WebServiceType_ID (0);
|
||||||
|
} */
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Constructor */
|
||||||
|
public X_WS_WebService_Para (Properties ctx, ResultSet rs, String trxName)
|
||||||
|
{
|
||||||
|
super (ctx, rs, trxName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** AccessLevel
|
||||||
|
* @return 6 - System - Client
|
||||||
|
*/
|
||||||
|
protected int get_AccessLevel()
|
||||||
|
{
|
||||||
|
return accessLevel.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Load Meta Data */
|
||||||
|
protected POInfo initPO (Properties ctx)
|
||||||
|
{
|
||||||
|
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||||
|
return poi;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
StringBuffer sb = new StringBuffer ("X_WS_WebService_Para[")
|
||||||
|
.append(get_ID()).append("]");
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Constant Value.
|
||||||
|
@param ConstantValue
|
||||||
|
Constant value
|
||||||
|
*/
|
||||||
|
public void setConstantValue (String ConstantValue)
|
||||||
|
{
|
||||||
|
set_Value (COLUMNNAME_ConstantValue, ConstantValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Constant Value.
|
||||||
|
@return Constant value
|
||||||
|
*/
|
||||||
|
public String getConstantValue ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_ConstantValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Parameter Name.
|
||||||
|
@param ParameterName Parameter Name */
|
||||||
|
public void setParameterName (String ParameterName)
|
||||||
|
{
|
||||||
|
set_ValueNoCheck (COLUMNNAME_ParameterName, ParameterName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Parameter Name.
|
||||||
|
@return Parameter Name */
|
||||||
|
public String getParameterName ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_ParameterName);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** ParameterType AD_Reference_ID=53288 */
|
||||||
|
public static final int PARAMETERTYPE_AD_Reference_ID=53288;
|
||||||
|
/** Constant = C */
|
||||||
|
public static final String PARAMETERTYPE_Constant = "C";
|
||||||
|
/** Free = F */
|
||||||
|
public static final String PARAMETERTYPE_Free = "F";
|
||||||
|
/** Set Parameter Type.
|
||||||
|
@param ParameterType Parameter Type */
|
||||||
|
public void setParameterType (String ParameterType)
|
||||||
|
{
|
||||||
|
|
||||||
|
set_Value (COLUMNNAME_ParameterType, ParameterType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Parameter Type.
|
||||||
|
@return Parameter Type */
|
||||||
|
public String getParameterType ()
|
||||||
|
{
|
||||||
|
return (String)get_Value(COLUMNNAME_ParameterType);
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Set Web Service Parameters.
|
||||||
|
@param WS_WebService_Para_ID Web Service Parameters */
|
||||||
|
public void setWS_WebService_Para_ID (int WS_WebService_Para_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebService_Para_ID < 1)
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebService_Para_ID, null);
|
||||||
|
else
|
||||||
|
set_ValueNoCheck (COLUMNNAME_WS_WebService_Para_ID, Integer.valueOf(WS_WebService_Para_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service Parameters.
|
||||||
|
@return Web Service Parameters */
|
||||||
|
public int getWS_WebService_Para_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebService_Para_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
public I_WS_WebServiceType getWS_WebServiceType() throws RuntimeException
|
||||||
|
{
|
||||||
|
return (I_WS_WebServiceType)MTable.get(getCtx(), I_WS_WebServiceType.Table_Name)
|
||||||
|
.getPO(getWS_WebServiceType_ID(), get_TrxName()); }
|
||||||
|
|
||||||
|
/** Set Web Service Type.
|
||||||
|
@param WS_WebServiceType_ID Web Service Type */
|
||||||
|
public void setWS_WebServiceType_ID (int WS_WebServiceType_ID)
|
||||||
|
{
|
||||||
|
if (WS_WebServiceType_ID < 1)
|
||||||
|
set_Value (COLUMNNAME_WS_WebServiceType_ID, null);
|
||||||
|
else
|
||||||
|
set_Value (COLUMNNAME_WS_WebServiceType_ID, Integer.valueOf(WS_WebServiceType_ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
/** Get Web Service Type.
|
||||||
|
@return Web Service Type */
|
||||||
|
public int getWS_WebServiceType_ID ()
|
||||||
|
{
|
||||||
|
Integer ii = (Integer)get_Value(COLUMNNAME_WS_WebServiceType_ID);
|
||||||
|
if (ii == null)
|
||||||
|
return 0;
|
||||||
|
return ii.intValue();
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,28 @@
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,27 @@
|
||||||
|
package org.idempiere.webservices.fault;
|
||||||
|
|
||||||
|
import javax.xml.namespace.QName;
|
||||||
|
import javax.xml.ws.WebFault;
|
||||||
|
|
||||||
|
@WebFault(name="IdempiereServiceFault")
|
||||||
|
public class IdempiereServiceFault extends RuntimeException{
|
||||||
|
|
||||||
|
public IdempiereServiceFault(String string, QName qName) {
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public IdempiereServiceFault(String string, Throwable cause, QName qName) {
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
public IdempiereServiceFault(Exception exception) {
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
private static final long serialVersionUID = -5899509711372844325L;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="ISO-8859-1"?>
|
||||||
|
<!-- START SNIPPET: webxml -->
|
||||||
|
<!DOCTYPE web-app
|
||||||
|
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
|
||||||
|
"http://java.sun.com/dtd/web-app_2_3.dtd">
|
||||||
|
|
||||||
|
<web-app>
|
||||||
|
<servlet>
|
||||||
|
<servlet-name>CXFServlet</servlet-name>
|
||||||
|
<display-name>CXF Servlet</display-name>
|
||||||
|
<servlet-class>
|
||||||
|
org.apache.cxf.transport.servlet.CXFServlet
|
||||||
|
</servlet-class>
|
||||||
|
<init-param>
|
||||||
|
<param-name>config-location</param-name>
|
||||||
|
<param-value>/META-INF/cxf/services.xml</param-value>
|
||||||
|
</init-param>
|
||||||
|
<load-on-startup>1</load-on-startup>
|
||||||
|
</servlet>
|
||||||
|
|
||||||
|
<servlet-mapping>
|
||||||
|
<servlet-name>CXFServlet</servlet-name>
|
||||||
|
<url-pattern>/services/*</url-pattern>
|
||||||
|
</servlet-mapping>
|
||||||
|
|
||||||
|
<session-config>
|
||||||
|
<session-timeout>15</session-timeout>
|
||||||
|
</session-config>
|
||||||
|
|
||||||
|
</web-app>
|
||||||
|
<!-- END SNIPPET: webxml -->
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||||
|
targetNamespace="http://bizidium.com/WebInterface"
|
||||||
|
xmlns:tns="http://bizidium.com/WebInterface"
|
||||||
|
xmlns:ens="http://3e.pl/ADInterface" elementFormDefault="qualified">
|
||||||
|
|
||||||
|
|
||||||
|
<xsd:import schemaLocation="schema.xsd" namespace="http://3e.pl/ADInterface"></xsd:import>
|
||||||
|
|
||||||
|
<xsd:complexType name="operations">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="operation" type="tns:operation" minOccurs="1" maxOccurs="unbounded"></xsd:element>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="operation">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="TargetPort">
|
||||||
|
<xsd:simpleType>
|
||||||
|
<xsd:restriction base="xsd:string">
|
||||||
|
<xsd:enumeration value="createData"></xsd:enumeration>
|
||||||
|
<xsd:enumeration value="readData"></xsd:enumeration>
|
||||||
|
<xsd:enumeration value="updateData"></xsd:enumeration>
|
||||||
|
<xsd:enumeration value="deleteData"></xsd:enumeration>
|
||||||
|
<xsd:enumeration value="getList"></xsd:enumeration>
|
||||||
|
<xsd:enumeration value="queryData"></xsd:enumeration>
|
||||||
|
<xsd:enumeration value="runProcess"></xsd:enumeration>
|
||||||
|
<xsd:enumeration value="setDocAction"></xsd:enumeration>
|
||||||
|
</xsd:restriction>
|
||||||
|
</xsd:simpleType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="ModelCRUD" type="ens:ModelCRUD" ></xsd:element>
|
||||||
|
<xsd:element name="operations" type="tns:operations" minOccurs="0" maxOccurs="1"></xsd:element>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="preCommit" type="xsd:boolean" default="false"></xsd:attribute>
|
||||||
|
<xsd:attribute name="postCommit" type="xsd:boolean" default="false"></xsd:attribute>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="CompositeCRUDRequest" type="tns:CompositeCRUDRequest"></xsd:element>
|
||||||
|
<xsd:complexType name="CompositeCRUDRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ADLoginRequest" type="ens:ADLoginRequest"></xsd:element>
|
||||||
|
<xsd:element name="serviceType" type="xsd:string"/>
|
||||||
|
<xsd:element name="operation" type="tns:operation" minOccurs="1" maxOccurs="unbounded"></xsd:element>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:schema>
|
|
@ -0,0 +1,58 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||||
|
targetNamespace="http://adaxa.com/ws" xmlns:tns="http://adaxa.com/ws"
|
||||||
|
elementFormDefault="qualified">
|
||||||
|
|
||||||
|
<xsd:complexType name="LoginRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="user" type="xsd:string" />
|
||||||
|
<xsd:element name="pass" type="xsd:string" />
|
||||||
|
<xsd:element name="lang" type="xsd:string" />
|
||||||
|
<xsd:element name="ClientID" type="xsd:int" />
|
||||||
|
<xsd:element name="RoleID" type="xsd:int" />
|
||||||
|
<xsd:element name="OrgID" type="xsd:int" />
|
||||||
|
<xsd:element name="WarehouseID" type="xsd:int" />
|
||||||
|
<xsd:element name="stage" type="xsd:int" />
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:element name="ProcessRequest" type="tns:ProcessRequest" />
|
||||||
|
<xsd:element name="ProcessResponse" type="tns:ProcessResponse" />
|
||||||
|
|
||||||
|
<xsd:complexType name="parameter">
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="value" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="ProcessData">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="parameter" type="tns:parameter"
|
||||||
|
minOccurs="1" maxOccurs="unbounded" />
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="ProcessRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ProcessData" type="tns:ProcessData"
|
||||||
|
minOccurs="1" maxOccurs="1" />
|
||||||
|
<xsd:element name="serviceType" type="xsd:string" minOccurs="1" maxOccurs="1"/>
|
||||||
|
<xsd:element name="LoginRequest" type="tns:LoginRequest"
|
||||||
|
minOccurs="1" maxOccurs="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="outputData">
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
<xsd:attribute name="value" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="ProcessResponse">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Error" type="xsd:string" />
|
||||||
|
<xsd:element name="ouptutData" type="tns:outputData" minOccurs="0"
|
||||||
|
maxOccurs="unbounded" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="IsError" type="xsd:boolean" />
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
</xsd:schema>
|
|
@ -0,0 +1,239 @@
|
||||||
|
<xsd:schema targetNamespace="http://externalSales.ws.erpCommon.openbravo.org" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://externalSales.ws.erpCommon.openbravo.org" xmlns:wsdl="wsdl">
|
||||||
|
<xsd:complexType name="Category">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="description" type="xsd:string"/>
|
||||||
|
<xsd:element name="id" type="xsd:int"/>
|
||||||
|
<xsd:element name="name" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="Tax">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="id" type="xsd:int"/>
|
||||||
|
<xsd:element name="name" type="xsd:string"/>
|
||||||
|
<xsd:element name="percentage" type="xsd:double"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="Product">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="category" type="tns:Category"/>
|
||||||
|
<xsd:element name="description" type="xsd:string"/>
|
||||||
|
<xsd:element name="ean" type="xsd:string"/>
|
||||||
|
<xsd:element name="id" type="xsd:int"/>
|
||||||
|
<xsd:element name="imageUrl" type="xsd:string"/>
|
||||||
|
<xsd:element name="listPrice" type="xsd:double"/>
|
||||||
|
<xsd:element name="name" type="xsd:string"/>
|
||||||
|
<xsd:element name="number" type="xsd:string"/>
|
||||||
|
<xsd:element name="purchasePrice" type="xsd:double"/>
|
||||||
|
<xsd:element name="tax" type="tns:Tax"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ProductPlus">
|
||||||
|
<xsd:complexContent>
|
||||||
|
<xsd:extension base="tns:Product">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="qtyonhand" type="xsd:double"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:extension>
|
||||||
|
</xsd:complexContent>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="BPartner">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="address1" type="xsd:string"/>
|
||||||
|
<xsd:element name="address2" type="xsd:string"/>
|
||||||
|
<xsd:element name="city" type="xsd:string"/>
|
||||||
|
<xsd:element name="country" type="xsd:string"/>
|
||||||
|
<xsd:element name="id" type="xsd:string"/>
|
||||||
|
<xsd:element name="name" type="xsd:string"/>
|
||||||
|
<xsd:element name="postal" type="xsd:string"/>
|
||||||
|
<xsd:element name="region" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="OrderLine">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="orderLineId" type="xsd:int"/>
|
||||||
|
<xsd:element name="price" type="xsd:double"/>
|
||||||
|
<xsd:element name="productId" type="xsd:int"/>
|
||||||
|
<xsd:element name="taxId" type="xsd:int"/>
|
||||||
|
<xsd:element name="units" type="xsd:double"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="OrderIdentifier">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="dateNew" type="xsd:dateTime"/>
|
||||||
|
<xsd:element name="documentNo" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="Payment">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="amount" type="xsd:double"/>
|
||||||
|
<xsd:element name="paymentType" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="Order">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="businessPartner" type="tns:BPartner"/>
|
||||||
|
<xsd:element name="lines" type="tns:ArrayOf_tns1_OrderLine"/>
|
||||||
|
<xsd:element name="orderId" type="tns:OrderIdentifier"/>
|
||||||
|
<xsd:element name="payment" type="tns:ArrayOf_tns1_Payment"/>
|
||||||
|
<xsd:element name="state" type="xsd:int"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ArrayOf_tns1_Product">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="products" type="tns:Product" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ArrayOf_tns1_ProductPlus">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="products" type="tns:ProductPlus" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ArrayOf_tns1_OrderLine">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="orderlines" type="tns:OrderLine" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ArrayOf_tns1_Payment">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="payments" type="tns:Payment" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ArrayOf_tns1_Order">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="orders" type="tns:Order" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ArrayOf_tns1_OrderIdentifier">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="orderidentifiers" type="tns:OrderIdentifier" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="Contact">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="businessPartnerId" type="xsd:int"/>
|
||||||
|
<xsd:element name="clientId" type="xsd:int"/>
|
||||||
|
<xsd:element name="email" type="xsd:string"/>
|
||||||
|
<xsd:element name="fax" type="xsd:string"/>
|
||||||
|
<xsd:element name="firstName" type="xsd:string"/>
|
||||||
|
<xsd:element name="id" type="xsd:int"/>
|
||||||
|
<xsd:element name="lastName" type="xsd:string"/>
|
||||||
|
<xsd:element name="phone" type="xsd:string"/>
|
||||||
|
<xsd:element name="phone2" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="Location">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="address1" type="xsd:string"/>
|
||||||
|
<xsd:element name="address2" type="xsd:string"/>
|
||||||
|
<xsd:element name="businessPartnerId" type="xsd:int"/>
|
||||||
|
<xsd:element name="city" type="xsd:string"/>
|
||||||
|
<xsd:element name="clientId" type="xsd:int"/>
|
||||||
|
<xsd:element name="country" type="xsd:string"/>
|
||||||
|
<xsd:element name="id" type="xsd:int"/>
|
||||||
|
<xsd:element name="postal" type="xsd:string"/>
|
||||||
|
<xsd:element name="region" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="BusinessPartner">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="clientId" type="xsd:int"/>
|
||||||
|
<xsd:element name="complete" type="xsd:boolean"/>
|
||||||
|
<xsd:element name="contacts" type="tns:ArrayOf_tns1_Contact"/>
|
||||||
|
<xsd:element name="customer" type="xsd:boolean"/>
|
||||||
|
<xsd:element name="description" type="xsd:string"/>
|
||||||
|
<xsd:element name="id" type="xsd:int"/>
|
||||||
|
<xsd:element name="locations" type="tns:ArrayOf_tns1_Location"/>
|
||||||
|
<xsd:element name="name" type="xsd:string"/>
|
||||||
|
<xsd:element name="searchKey" type="xsd:string"/>
|
||||||
|
<xsd:element name="vendor" type="xsd:boolean"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="Customer">
|
||||||
|
<xsd:complexContent>
|
||||||
|
<xsd:extension base="tns:BusinessPartner">
|
||||||
|
<xsd:sequence/>
|
||||||
|
</xsd:extension>
|
||||||
|
</xsd:complexContent>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ArrayOf_tns1_Contact">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="contacts" type="tns:Contact" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ArrayOf_tns1_Location">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="locations" type="tns:Location" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ArrayOf_tns1_Customer">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="customers" type="tns:Customer" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ArrayOf_xsd_int">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ints" type="xsd:int" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="ProductsPlusCatalogRequest" type="tns:ProductsPlusCatalogRequest"/>
|
||||||
|
<xsd:complexType name="ProductsPlusCatalogRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="entityId" type="xsd:int"/>
|
||||||
|
<xsd:element name="OrganizationId" type="xsd:int"/>
|
||||||
|
<xsd:element name="salesChannel" type="xsd:int"/>
|
||||||
|
<xsd:element name="username" type="xsd:string"/>
|
||||||
|
<xsd:element name="password" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="ProductsPlusCatalogResponse" type="tns:ProductsPlusCatalogResponse"/>
|
||||||
|
<xsd:complexType name="ProductsPlusCatalogResponse">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ArrayOf_tns1_ProductPlus" type="tns:ArrayOf_tns1_ProductPlus"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="ProductsCatalogRequest" type="tns:ProductsCatalogRequest"/>
|
||||||
|
<xsd:complexType name="ProductsCatalogRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="entityId" type="xsd:int"/>
|
||||||
|
<xsd:element name="OrganizationId" type="xsd:int"/>
|
||||||
|
<xsd:element name="salesChannel" type="xsd:int"/>
|
||||||
|
<xsd:element name="username" type="xsd:string"/>
|
||||||
|
<xsd:element name="password" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="ProductsCatalogResponse" type="tns:ProductsCatalogResponse"/>
|
||||||
|
<xsd:complexType name="ProductsCatalogResponse">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ArrayOf_tns1_Product" type="tns:ArrayOf_tns1_Product"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="GetCustomersRequest" type="tns:GetCustomersRequest"/>
|
||||||
|
<xsd:complexType name="GetCustomersRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="clientId" type="xsd:int"/>
|
||||||
|
<xsd:element name="username" type="xsd:string"/>
|
||||||
|
<xsd:element name="password" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="GetCustomersResponse" type="tns:GetCustomersResponse"/>
|
||||||
|
<xsd:complexType name="GetCustomersResponse">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ArrayOf_tns1_Customer" type="tns:ArrayOf_tns1_Customer"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="UploadOrdersRequest" type="tns:UploadOrdersRequest"/>
|
||||||
|
<xsd:complexType name="UploadOrdersRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="entityId" type="xsd:int"/>
|
||||||
|
<xsd:element name="OrganizationId" type="xsd:int"/>
|
||||||
|
<xsd:element name="salesChannel" type="xsd:int"/>
|
||||||
|
<xsd:element name="newOrders" type="tns:ArrayOf_tns1_Order"/>
|
||||||
|
<xsd:element name="username" type="xsd:string"/>
|
||||||
|
<xsd:element name="password" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="UploadOrdersResponse" type="tns:UploadOrdersResponse"/>
|
||||||
|
<xsd:complexType name="UploadOrdersResponse">
|
||||||
|
<xsd:sequence></xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:schema>
|
|
@ -0,0 +1,482 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||||
|
targetNamespace="http://3e.pl/ADInterface"
|
||||||
|
xmlns:tns="http://3e.pl/ADInterface"
|
||||||
|
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:complexType name="WindowTabData">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="DataSet" type="tns:DataSet" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xsd:element name="RowCount" type="xsd:int" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xsd:element name="Success" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xsd:element name="Error" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xsd:element name="ErrorInfo" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xsd:element name="Status" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xsd:element name="StatusError" type="xsd:boolean" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="NumRows" type="xsd:int" />
|
||||||
|
<xsd:attribute name="TotalRows" type="xsd:int" />
|
||||||
|
<xsd:attribute name="StartRow" type="xsd:int" />
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="DataSet">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="DataRow" type="tns:DataRow" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
|
||||||
|
<xsd:complexType name="DataRow">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="field" type="tns:DataField" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="DataField">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="val" type="xsd:string" />
|
||||||
|
<xsd:element name="lookup" type="tns:LookupValues" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="type" type="xsd:string" use="optional"/>
|
||||||
|
<xsd:attribute name="column" type="xsd:string" />
|
||||||
|
<xsd:attribute name="lval" type="xsd:string" use="optional"/>
|
||||||
|
<xsd:attribute name="disp" type="xsd:boolean" use="optional"/>
|
||||||
|
<xsd:attribute name="edit" type="xsd:boolean" use="optional"/>
|
||||||
|
<xsd:attribute name="error" type="xsd:boolean" use="optional"/>
|
||||||
|
<xsd:attribute name="errorVal" type="xsd:string" use="optional"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="LookupValues">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="lv" type="tns:LookupValue" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="LookupValue">
|
||||||
|
<xsd:sequence>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="val" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="key" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:element name="GetProcessParams" type="tns:GetProcessParams"/>
|
||||||
|
<xsd:element name="ProcessParams" type="tns:ProcessParams"/>
|
||||||
|
<xsd:element name="RunProcess" type="tns:RunProcess"/>
|
||||||
|
<xsd:element name="RunProcessResponse" type="tns:RunProcessResponse"/>
|
||||||
|
|
||||||
|
<xsd:complexType name="ProcessParams">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Params" type="tns:ProcessParamList" />
|
||||||
|
<xsd:element name="Description" type="xsd:string"/>
|
||||||
|
<xsd:element name="Name" type="xsd:string"/>
|
||||||
|
<xsd:element name="Help" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="AD_Process_ID" type="xsd:int"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="GetProcessParams">
|
||||||
|
<xsd:sequence>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="AD_Process_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Menu_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Record_ID" type="xsd:int"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="RunProcess">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ParamValues" type="tns:DataRow"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="AD_Process_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Menu_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Record_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="DocAction" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="RunProcessResponse">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Error" type="xsd:string"/>
|
||||||
|
<xsd:element name="Summary" type="xsd:string"/>
|
||||||
|
<xsd:element name="LogInfo" type="xsd:string"/>
|
||||||
|
<xsd:element name="Data" type="xsd:hexBinary"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="IsError" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="IsReport" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="ReportFormat" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
|
||||||
|
<xsd:complexType name="ProcessParamList">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Param" type="tns:ProcessParam" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="ProcessParam">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Description" type="xsd:string"/>
|
||||||
|
<xsd:element name="Help" 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="DefaultValue" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="DefaultValue2" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="IsMandatory" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="IsRange" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="FieldLength" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="DisplayType" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="ColumnName" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
int WindowNo, int AD_Window_ID, int AD_Menu_ID, int TabNo, int PrevTabNo, int PrevRecNo, boolean getData, int RowStart, int RowCount)
|
||||||
|
-->
|
||||||
|
<xsd:element name="WindowTabDataReq" type="tns:WindowTabDataReq"/>
|
||||||
|
<xsd:complexType name="WindowTabDataReq">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="FindCriteria" type="tns:DataRow"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="WindowNo" type="xsd:int" />
|
||||||
|
<xsd:attribute name="AD_Window_ID" type="xsd:int" />
|
||||||
|
<xsd:attribute name="AD_Menu_ID" type="xsd:int" />
|
||||||
|
<xsd:attribute name="TabNo" type="xsd:int" />
|
||||||
|
<xsd:attribute name="PrevTabNo" type="xsd:int" />
|
||||||
|
<xsd:attribute name="PrevRecNo" type="xsd:int" />
|
||||||
|
<xsd:attribute name="getData" type="xsd:boolean" />
|
||||||
|
<xsd:attribute name="RowStart" type="xsd:int" />
|
||||||
|
<xsd:attribute name="RowCount" type="xsd:int" />
|
||||||
|
|
||||||
|
<xsd:attribute name="fromZoom" type="xsd:boolean" />
|
||||||
|
<xsd:attribute name="fromZoom_Window_ID" type="xsd:int" />
|
||||||
|
<xsd:attribute name="fromZoom_Tab_ID" type="xsd:int" />
|
||||||
|
<xsd:attribute name="fromZoom_Row_ID" type="xsd:int" />
|
||||||
|
<xsd:attribute name="fromZoom_ColumnName" type="xsd:string" />
|
||||||
|
<xsd:attribute name="fromZoom_ColumnValue" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
|
||||||
|
<xsd:element name="ADMenu" type="tns:ADMenuItem"/>
|
||||||
|
|
||||||
|
|
||||||
|
<xsd:complexType name="ADMenuItemList">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Item" type="tns:ADMenuItem" minOccurs="0" maxOccurs="unbounded"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="ADMenuItem">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="items" type="tns:ADMenuItemList"/>
|
||||||
|
<xsd:element name="description" type="xsd:string"/>
|
||||||
|
<xsd:element name="url" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="AD_Menu_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="type" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="name" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
|
||||||
|
<xsd:element name="ADLoginRequest" type="tns:ADLoginRequest"/>
|
||||||
|
<xsd:element name="ADLoginResponse" type="tns:ADLoginResponse"/>
|
||||||
|
|
||||||
|
<xsd:complexType name="ADLoginRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="user" type="xsd:string"/>
|
||||||
|
<xsd:element name="pass" type="xsd:string"/>
|
||||||
|
<xsd:element name="lang" type="xsd:string"/>
|
||||||
|
<xsd:element name="ClientID" type="xsd:int"/>
|
||||||
|
<xsd:element name="RoleID" type="xsd:int"/>
|
||||||
|
<xsd:element name="OrgID" type="xsd:int"/>
|
||||||
|
<xsd:element name="WarehouseID" type="xsd:int"/>
|
||||||
|
<xsd:element name="stage" type="xsd:int" />
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="ADLoginResponse">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="status" type="xsd:int"/>
|
||||||
|
<xsd:element name="roles" type="tns:LookupValues"/>
|
||||||
|
<xsd:element name="langs" type="tns:LookupValues"/>
|
||||||
|
<xsd:element name="orgs" type="tns:LookupValues"/>
|
||||||
|
<xsd:element name="clients" type="tns:LookupValues"/>
|
||||||
|
<xsd:element name="warehouses" type="tns:LookupValues"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="Location">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="C_Location_ID" type="xsd:int"/>
|
||||||
|
<xsd:element name="Name" type="xsd:string"/>
|
||||||
|
<xsd:element name="Address1" type="xsd:string"/>
|
||||||
|
<xsd:element name="Address2" type="xsd:string"/>
|
||||||
|
<xsd:element name="City" type="xsd:string"/>
|
||||||
|
<xsd:element name="PostalCode" type="xsd:string"/>
|
||||||
|
<xsd:element name="C_Country_ID" type="xsd:int"/>
|
||||||
|
<xsd:element name="C_Region_ID" type="xsd:int"/>
|
||||||
|
<xsd:element name="Countries" type="tns:LookupValues" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<!-- <xsd:element name="Regions" type="tns:LookupValues" minOccurs="0" maxOccurs="1" /> -->
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="StandardResponse">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Error" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="IsError" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="RecordID" type="xsd:int"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
|
||||||
|
<xsd:element name="Location" type="tns:Location"/>
|
||||||
|
<xsd:element name="StandardResponse" type="tns:StandardResponse"/>
|
||||||
|
|
||||||
|
<xsd:element name="DocAction" type="tns:DocAction"/>
|
||||||
|
|
||||||
|
<xsd:complexType name="DocAction">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Action" type="tns:LookupValues" minOccurs="0" maxOccurs="1"/>
|
||||||
|
<xsd:element name="Error" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="IsError" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="RecordID" type="xsd:int"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:element name="getLookupSearchDataReq" type="tns:getLookupSearchDataReq"/>
|
||||||
|
<xsd:complexType name="getLookupSearchDataReq">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Params" type="tns:DataRow" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="WindowNo" type="xsd:int" />
|
||||||
|
<xsd:attribute name="TabNo" type="xsd:int" />
|
||||||
|
<xsd:attribute name="RowNo" type="xsd:int" />
|
||||||
|
<xsd:attribute name="ColumnName" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
|
||||||
|
<!-- Elements added for model web services -->
|
||||||
|
|
||||||
|
<xsd:element name="ModelSetDocActionRequest" type="tns:ModelSetDocActionRequest"/>
|
||||||
|
|
||||||
|
<xsd:complexType name="ModelSetDocAction">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="serviceType" type="xsd:string"/>
|
||||||
|
<xsd:element name="tableName" type="xsd:string"/>
|
||||||
|
<xsd:element name="recordID" type="xsd:int"/>
|
||||||
|
<xsd:element name="docAction" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="ModelSetDocActionRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ModelSetDocAction" type="tns:ModelSetDocAction" minOccurs="1" maxOccurs="1"/>
|
||||||
|
<xsd:element name="ADLoginRequest" type="tns:ADLoginRequest" minOccurs="1" maxOccurs="1"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:element name="ModelRunProcess" type="tns:ModelRunProcess"/>
|
||||||
|
|
||||||
|
<xsd:complexType name="ModelRunProcess">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="serviceType" type="xsd:string"/>
|
||||||
|
<xsd:element name="ParamValues" type="tns:DataRow"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="AD_Process_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Menu_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Record_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="DocAction" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:element name="ModelRunProcessRequest" type="tns:ModelRunProcessRequest"/>
|
||||||
|
|
||||||
|
<xsd:complexType name="ModelRunProcessRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ModelRunProcess" type="tns:ModelRunProcess" minOccurs="1" maxOccurs="1"/>
|
||||||
|
<xsd:element name="ADLoginRequest" type="tns:ADLoginRequest" minOccurs="1" maxOccurs="1"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:element name="ModelGetListRequest" type="tns:ModelGetListRequest"/>
|
||||||
|
|
||||||
|
<xsd:complexType name="ModelGetList">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="serviceType" type="xsd:string"/>
|
||||||
|
<xsd:element name="AD_Reference_ID" type="xsd:int"/>
|
||||||
|
<xsd:element name="Filter" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="ModelGetListRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ModelGetList" type="tns:ModelGetList" minOccurs="1" maxOccurs="1"/>
|
||||||
|
<xsd:element name="ADLoginRequest" type="tns:ADLoginRequest" minOccurs="1" maxOccurs="1"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:element name="ModelCRUDRequest" type="tns:ModelCRUDRequest"/>
|
||||||
|
|
||||||
|
<xsd:complexType name="ModelCRUD">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="serviceType" type="xsd:string"/>
|
||||||
|
<xsd:element name="TableName" type="xsd:string"/>
|
||||||
|
<xsd:element name="RecordID" type="xsd:int"/>
|
||||||
|
<xsd:element name="Filter" type="xsd:string"/>
|
||||||
|
<xsd:element name="Action">
|
||||||
|
<xsd:simpleType>
|
||||||
|
<xsd:restriction base="xsd:string">
|
||||||
|
<xsd:enumeration value="Create"></xsd:enumeration>
|
||||||
|
<xsd:enumeration value="Read"></xsd:enumeration>
|
||||||
|
<xsd:enumeration value="Update"></xsd:enumeration>
|
||||||
|
<xsd:enumeration value="Delete"></xsd:enumeration>
|
||||||
|
</xsd:restriction>
|
||||||
|
</xsd:simpleType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="DataRow" type="tns:DataRow" minOccurs="0" maxOccurs="1"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
<xsd:complexType name="ModelCRUDRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ModelCRUD" type="tns:ModelCRUD" minOccurs="1" maxOccurs="1"/>
|
||||||
|
<xsd:element name="ADLoginRequest" type="tns:ADLoginRequest" minOccurs="1" maxOccurs="1"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
|
||||||
|
</xsd:schema>
|
|
@ -0,0 +1,28 @@
|
||||||
|
source.. = src/,\
|
||||||
|
WEB-INF/src/
|
||||||
|
output.. = WEB-INF/classes/
|
||||||
|
bin.includes = META-INF/,\
|
||||||
|
.,\
|
||||||
|
WEB-INF/classes/,\
|
||||||
|
WEB-INF/web.xml,\
|
||||||
|
WEB-INF/xsd/,\
|
||||||
|
WEB-INF/lib/spring-web-3.0.7.RELEASE.jar,\
|
||||||
|
WEB-INF/lib/spring-context-3.0.7.RELEASE.jar,\
|
||||||
|
WEB-INF/lib/spring-beans-3.0.7.RELEASE.jar,\
|
||||||
|
WEB-INF/lib/spring-core-3.0.7.RELEASE.jar,\
|
||||||
|
WEB-INF/lib/spring-asm-3.0.7.RELEASE.jar,\
|
||||||
|
WEB-INF/lib/spring-expression-3.0.7.RELEASE.jar,\
|
||||||
|
WEB-INF/lib/wsdl4j-1.6.2.jar,\
|
||||||
|
WEB-INF/lib/cxf-2.6.2.jar,\
|
||||||
|
WEB-INF/lib/neethi-3.0.2.jar,\
|
||||||
|
WEB-INF/lib/xmlschema-core-2.0.3.jar,\
|
||||||
|
WEB-INF/lib/stax2-api-3.1.1.jar,\
|
||||||
|
WEB-INF/lib/spring-aop-3.0.7.RELEASE.jar,\
|
||||||
|
WEB-INF/lib/cxf-rt-frontend-jaxws-2.6.1.jar,\
|
||||||
|
WEB-INF/lib/generated_xbeans.jar,\
|
||||||
|
WEB-INF/lib/xmlbeans-2.5.0.jar,\
|
||||||
|
WEB-INF/lib/composite_XMLSBean.jar
|
||||||
|
src.includes = WEB-INF/classes/,\
|
||||||
|
WEB-INF/lib/,\
|
||||||
|
WEB-INF/web.xml,\
|
||||||
|
WEB-INF/xsd/
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,145 @@
|
||||||
|
-- Jan 30, 2009 7:13:26 PM COT
|
||||||
|
-- Web Service Definition and Security
|
||||||
|
INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.3e.pl/ - intended to enable work of clients like ADClient.exe','WARNING! This is disabled by default as security is not implemented yet','Y','UI Oriented Adempiere Web Services',TO_DATE('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'ADService',50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADWindow',TO_DATE('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'getADWindow',50000,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'Y','getWindowTabData',TO_DATE('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'getWindowTabData',50000,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDataRow',TO_DATE('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'getDataRow',50000,50002)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','updateDataRow',TO_DATE('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'updateDataRow',50000,50003)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveDataRow',TO_DATE('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'saveDataRow',50000,50004)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'Y','addNewDataRow',TO_DATE('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'addNewDataRow',50000,50005)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','deleteDataRow',TO_DATE('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'deleteDataRow',50000,50006)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','ignoreDataRow',TO_DATE('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'ignoreDataRow',50000,50007)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','refreshDataRow',TO_DATE('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'refreshDataRow',50000,50008)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupSearchData',TO_DATE('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'getLookupSearchData',50000,50009)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupData',TO_DATE('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'getLookupData',50000,50010)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADMenu',TO_DATE('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'getADMenu',50000,50011)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','login',TO_DATE('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'login',50000,50012)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProcessParams',TO_DATE('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'getProcessParams',50000,50013)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','runProcess',TO_DATE('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50000,50014)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveLocation',TO_DATE('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'saveLocation',50000,50015)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLocation',TO_DATE('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'getLocation',50000,50016)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDocAction',TO_DATE('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'getDocAction',50000,50017)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','setDocAction',TO_DATE('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50000,50018)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','getVersion',TO_DATE('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'getVersion',50000,50019)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'Y','isLoggedIn',TO_DATE('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'isLoggedIn',50000,50020)
|
||||||
|
;
|
||||||
|
|
||||||
|
UPDATE WS_WebService SET IsActive='N',Updated=TO_DATE('2009-01-30 19:16:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebService_ID=50000
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.globalqss.com - implemented security','This web services are very generic - so it''s necessary to configure the security layer in the web services security window to make them work. You can take a look to GardenWorld samples.','Y','Model Oriented Web Services',TO_DATE('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'ModelADService',50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'To invoke corresponding methods of documents when changing document action.','Change DocAction for documents, i.e. Complete a Material Receipt
|
||||||
|
WARNING! This web service complete documents not via workflow, so it jump over any approval step considered in document workflow.
|
||||||
|
To complete documents using workflow it''s better to use the runProcess web service','Y','Set Document Action',TO_DATE('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50001,50021)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'Run a process or report - if the process is a document workflow a document action can be configured','Y','Run Process',TO_DATE('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50001,50022)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','Get Reference Lists or Reference Tables',TO_DATE('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'getList',50001,50023)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to create data following the persistence model of Adempiere','Web Service to create data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Create Data',TO_DATE('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'createData',50001,50024)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to modify data following the persistence model of Adempiere','Web Service to modify data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Update Data',TO_DATE('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'updateData',50001,50025)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to delete data following the persistence model of Adempiere','Web Service to delete data following the persistence model of Adempiere, this is calling properly before/afterDelete methods - and configured model validators.','Y','Delete Data',TO_DATE('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'deleteData',50001,50026)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'Access a record via its ID and return the corresponding data','Y','Read Data',TO_DATE('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'readData',50001,50027)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'Access records via conditions on columns - return data rows','Y','Query Data',TO_DATE('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'queryData',50001,50028)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','External Sales - web service',TO_DATE('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'ExternalSales',50002)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsPlusCatalog',TO_DATE('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'getProductsPlusCatalog',50002,50029)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'Y','uploadOrders',TO_DATE('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'uploadOrders',50002,50030)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsCatalog',TO_DATE('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'getProductsCatalog',50002,50031)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','getOrders',TO_DATE('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'getOrders',50002,50032)
|
||||||
|
;
|
||||||
|
|
||||||
|
UPDATE WS_WebServiceMethod SET IsActive='N',Updated=TO_DATE('2009-01-30 19:24:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebServiceMethod_ID=50032
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','WebService - web service',TO_DATE('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'WebService',50003)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'Y','getCustomers',TO_DATE('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'getCustomers',50003,50033)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomer',TO_DATE('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'getCustomer',50003,50034)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'N','updateCustomer',TO_DATE('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'updateCustomer',50003,50035)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerAddresses',TO_DATE('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerAddresses',50003,50036)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerLocation',TO_DATE('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerLocation',50003,50037)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'N','updateAddress',TO_DATE('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'updateAddress',50003,50038)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerContact',TO_DATE('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerContact',50003,50039)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_DATE('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'N','updateContact',TO_DATE('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'updateContact',50003,50040)
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
-- Jan 30, 2009 7:44:20 PM COT
|
||||||
|
-- Web Service Definition and Security
|
||||||
|
INSERT INTO AD_Role (AD_Client_ID,AD_Org_ID,AD_Role_ID,Allow_Info_Account,Allow_Info_Asset,Allow_Info_BPartner,Allow_Info_CashJournal,Allow_Info_InOut,Allow_Info_Invoice,Allow_Info_Order,Allow_Info_Payment,Allow_Info_Product,Allow_Info_Resource,Allow_Info_Schedule,AmtApproval,C_Currency_ID,ConfirmQueryRecords,Created,CreatedBy,IsAccessAllOrgs,IsActive,IsCanApproveOwnDoc,IsCanExport,IsCanReport,IsChangeLog,IsManual,IsPersonalAccess,IsPersonalLock,IsShowAcct,IsUseUserOrgAccess,MaxQueryRecords,Name,OverwritePriceLimit,PreferenceType,Supervisor_ID,Updated,UpdatedBy,UserDiscount,UserLevel) VALUES (11,0,50004,'N','N','N','N','N','N','N','N','N','N','N',0,100,0,TO_DATE('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','N','Y','Y','N','N','N','N',0,'Web Service Execution','N','N',101,TO_DATE('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,0.00,' CO')
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,11,50004,100,TO_DATE('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,0,50004,TO_DATE('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_DATE('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,11,50004,TO_DATE('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_DATE('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,12,50004,TO_DATE('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_DATE('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_User (AD_Client_ID,AD_Org_ID,AD_User_ID,Created,CreatedBy,IsActive,IsFullBPAccess,Name,NotificationType,Password,Processing,Updated,UpdatedBy,Value) VALUES (11,0,50001,TO_DATE('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','WebService','X','WebService','N',TO_DATE('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'webserv')
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,0,50004,50001,TO_DATE('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_Process_Access (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy) VALUES (11,0,111,50004,TO_DATE('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_DATE('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,TO_DATE('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of run process web service to process invoices','Y','Process Invoice',TO_DATE('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'ProcessInvoice',50001,50022,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'111',TO_DATE('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Process_ID','C',TO_DATE('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,50000,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'CO',TO_DATE('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','DocAction','C',TO_DATE('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,50001,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'0',TO_DATE('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Menu_ID','C',TO_DATE('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,50002,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_DATE('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Record_ID','F',TO_DATE('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,50003,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_DATE('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_DATE('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,291,TO_DATE('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of Create Data web service to create business partners','Y','Create BPartner',TO_DATE('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'CreateBPartner',50001,50024,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'C_BPartner',TO_DATE('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,'Y','TableName','C',TO_DATE('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_DATE('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','RecordID','F',TO_DATE('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'Create',TO_DATE('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','Action','C',TO_DATE('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,50006,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2901,0,TO_DATE('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,50000,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2902,0,TO_DATE('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,50001,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2909,0,TO_DATE('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,50002,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2915,0,TO_DATE('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,50003,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2916,0,TO_DATE('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,3082,0,TO_DATE('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4216,0,TO_DATE('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,50006,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4940,0,TO_DATE('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_DATE('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,50007,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_DATE('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_DATE('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,50001)
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
update AD_Column set SeqNo=2 WHERE AD_Column_ID=56714;
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,143 @@
|
||||||
|
INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.3e.pl/ - intended to enable work of clients like ADClient.exe','WARNING! This is disabled by default as security is not implemented yet','Y','UI Oriented Adempiere Web Services',TO_TIMESTAMP('2009-01-30 19:13:25','YYYY-MM-DD HH24:MI:SS'),100,'ADService',50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADWindow',TO_TIMESTAMP('2009-01-30 19:13:41','YYYY-MM-DD HH24:MI:SS'),100,'getADWindow',50000,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'Y','getWindowTabData',TO_TIMESTAMP('2009-01-30 19:13:54','YYYY-MM-DD HH24:MI:SS'),100,'getWindowTabData',50000,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDataRow',TO_TIMESTAMP('2009-01-30 19:14:02','YYYY-MM-DD HH24:MI:SS'),100,'getDataRow',50000,50002)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'Y','updateDataRow',TO_TIMESTAMP('2009-01-30 19:14:08','YYYY-MM-DD HH24:MI:SS'),100,'updateDataRow',50000,50003)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveDataRow',TO_TIMESTAMP('2009-01-30 19:14:13','YYYY-MM-DD HH24:MI:SS'),100,'saveDataRow',50000,50004)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'Y','addNewDataRow',TO_TIMESTAMP('2009-01-30 19:14:19','YYYY-MM-DD HH24:MI:SS'),100,'addNewDataRow',50000,50005)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'Y','deleteDataRow',TO_TIMESTAMP('2009-01-30 19:14:24','YYYY-MM-DD HH24:MI:SS'),100,'deleteDataRow',50000,50006)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','ignoreDataRow',TO_TIMESTAMP('2009-01-30 19:14:43','YYYY-MM-DD HH24:MI:SS'),100,'ignoreDataRow',50000,50007)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','refreshDataRow',TO_TIMESTAMP('2009-01-30 19:14:51','YYYY-MM-DD HH24:MI:SS'),100,'refreshDataRow',50000,50008)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupSearchData',TO_TIMESTAMP('2009-01-30 19:14:57','YYYY-MM-DD HH24:MI:SS'),100,'getLookupSearchData',50000,50009)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLookupData',TO_TIMESTAMP('2009-01-30 19:15:02','YYYY-MM-DD HH24:MI:SS'),100,'getLookupData',50000,50010)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'Y','getADMenu',TO_TIMESTAMP('2009-01-30 19:15:07','YYYY-MM-DD HH24:MI:SS'),100,'getADMenu',50000,50011)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','login',TO_TIMESTAMP('2009-01-30 19:15:12','YYYY-MM-DD HH24:MI:SS'),100,'login',50000,50012)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProcessParams',TO_TIMESTAMP('2009-01-30 19:15:17','YYYY-MM-DD HH24:MI:SS'),100,'getProcessParams',50000,50013)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','runProcess',TO_TIMESTAMP('2009-01-30 19:15:22','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50000,50014)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'Y','saveLocation',TO_TIMESTAMP('2009-01-30 19:15:30','YYYY-MM-DD HH24:MI:SS'),100,'saveLocation',50000,50015)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'Y','getLocation',TO_TIMESTAMP('2009-01-30 19:15:36','YYYY-MM-DD HH24:MI:SS'),100,'getLocation',50000,50016)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','getDocAction',TO_TIMESTAMP('2009-01-30 19:15:41','YYYY-MM-DD HH24:MI:SS'),100,'getDocAction',50000,50017)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','setDocAction',TO_TIMESTAMP('2009-01-30 19:15:46','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50000,50018)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','getVersion',TO_TIMESTAMP('2009-01-30 19:15:51','YYYY-MM-DD HH24:MI:SS'),100,'getVersion',50000,50019)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'Y','isLoggedIn',TO_TIMESTAMP('2009-01-30 19:15:56','YYYY-MM-DD HH24:MI:SS'),100,'isLoggedIn',50000,50020)
|
||||||
|
;
|
||||||
|
|
||||||
|
UPDATE WS_WebService SET IsActive='N',Updated=TO_TIMESTAMP('2009-01-30 19:16:00','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebService_ID=50000
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'Contributed by http://www.globalqss.com - implemented security','This web services are very generic - so it''s necessary to configure the security layer in the web services security window to make them work. You can take a look to GardenWorld samples.','Y','Model Oriented Web Services',TO_TIMESTAMP('2009-01-30 19:17:43','YYYY-MM-DD HH24:MI:SS'),100,'ModelADService',50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'To invoke corresponding methods of documents when changing document action.','Change DocAction for documents, i.e. Complete a Material Receipt
|
||||||
|
WARNING! This web service complete documents not via workflow, so it jump over any approval step considered in document workflow.
|
||||||
|
To complete documents using workflow it''s better to use the runProcess web service','Y','Set Document Action',TO_TIMESTAMP('2009-01-30 19:19:03','YYYY-MM-DD HH24:MI:SS'),100,'setDocAction',50001,50021)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'Run a process or report - if the process is a document workflow a document action can be configured','Y','Run Process',TO_TIMESTAMP('2009-01-30 19:19:47','YYYY-MM-DD HH24:MI:SS'),100,'runProcess',50001,50022)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'Y','Get Reference Lists or Reference Tables',TO_TIMESTAMP('2009-01-30 19:20:02','YYYY-MM-DD HH24:MI:SS'),100,'getList',50001,50023)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to create data following the persistence model of Adempiere','Web Service to create data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Create Data',TO_TIMESTAMP('2009-01-30 19:21:02','YYYY-MM-DD HH24:MI:SS'),100,'createData',50001,50024)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to modify data following the persistence model of Adempiere','Web Service to modify data following the persistence model of Adempiere, this is calling properly before/afterSave methods - and configured model validators.','Y','Update Data',TO_TIMESTAMP('2009-01-30 19:21:27','YYYY-MM-DD HH24:MI:SS'),100,'updateData',50001,50025)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,Help,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'Web Service to delete data following the persistence model of Adempiere','Web Service to delete data following the persistence model of Adempiere, this is calling properly before/afterDelete methods - and configured model validators.','Y','Delete Data',TO_TIMESTAMP('2009-01-30 19:21:52','YYYY-MM-DD HH24:MI:SS'),100,'deleteData',50001,50026)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'Access a record via its ID and return the corresponding data','Y','Read Data',TO_TIMESTAMP('2009-01-30 19:22:22','YYYY-MM-DD HH24:MI:SS'),100,'readData',50001,50027)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'Access records via conditions on columns - return data rows','Y','Query Data',TO_TIMESTAMP('2009-01-30 19:22:50','YYYY-MM-DD HH24:MI:SS'),100,'queryData',50001,50028)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','External Sales - web service',TO_TIMESTAMP('2009-01-30 19:24:05','YYYY-MM-DD HH24:MI:SS'),100,'ExternalSales',50002)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsPlusCatalog',TO_TIMESTAMP('2009-01-30 19:24:27','YYYY-MM-DD HH24:MI:SS'),100,'getProductsPlusCatalog',50002,50029)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'Y','uploadOrders',TO_TIMESTAMP('2009-01-30 19:24:34','YYYY-MM-DD HH24:MI:SS'),100,'uploadOrders',50002,50030)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'Y','getProductsCatalog',TO_TIMESTAMP('2009-01-30 19:24:39','YYYY-MM-DD HH24:MI:SS'),100,'getProductsCatalog',50002,50031)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'Y','getOrders',TO_TIMESTAMP('2009-01-30 19:24:46','YYYY-MM-DD HH24:MI:SS'),100,'getOrders',50002,50032)
|
||||||
|
;
|
||||||
|
|
||||||
|
UPDATE WS_WebServiceMethod SET IsActive='N',Updated=TO_TIMESTAMP('2009-01-30 19:24:48','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE WS_WebServiceMethod_ID=50032
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'Web services needed for integration with Openbravo POS','Y','WebService - web service',TO_TIMESTAMP('2009-01-30 19:25:04','YYYY-MM-DD HH24:MI:SS'),100,'WebService',50003)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'Y','getCustomers',TO_TIMESTAMP('2009-01-30 19:25:14','YYYY-MM-DD HH24:MI:SS'),100,'getCustomers',50003,50033)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomer',TO_TIMESTAMP('2009-01-30 19:25:21','YYYY-MM-DD HH24:MI:SS'),100,'getCustomer',50003,50034)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'N','updateCustomer',TO_TIMESTAMP('2009-01-30 19:25:31','YYYY-MM-DD HH24:MI:SS'),100,'updateCustomer',50003,50035)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerAddresses',TO_TIMESTAMP('2009-01-30 19:25:38','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerAddresses',50003,50036)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerLocation',TO_TIMESTAMP('2009-01-30 19:25:44','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerLocation',50003,50037)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'N','updateAddress',TO_TIMESTAMP('2009-01-30 19:25:51','YYYY-MM-DD HH24:MI:SS'),100,'updateAddress',50003,50038)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'N','getCustomerContact',TO_TIMESTAMP('2009-01-30 19:25:58','YYYY-MM-DD HH24:MI:SS'),100,'getCustomerContact',50003,50039)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceMethod (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID) VALUES (0,0,TO_TIMESTAMP('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'N','updateContact',TO_TIMESTAMP('2009-01-30 19:26:07','YYYY-MM-DD HH24:MI:SS'),100,'updateContact',50003,50040)
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
-- Jan 30, 2009 7:44:20 PM COT
|
||||||
|
-- Web Service Definition and Security
|
||||||
|
INSERT INTO AD_Role (AD_Client_ID,AD_Org_ID,AD_Role_ID,Allow_Info_Account,Allow_Info_Asset,Allow_Info_BPartner,Allow_Info_CashJournal,Allow_Info_InOut,Allow_Info_Invoice,Allow_Info_Order,Allow_Info_Payment,Allow_Info_Product,Allow_Info_Resource,Allow_Info_Schedule,AmtApproval,C_Currency_ID,ConfirmQueryRecords,Created,CreatedBy,IsAccessAllOrgs,IsActive,IsCanApproveOwnDoc,IsCanExport,IsCanReport,IsChangeLog,IsManual,IsPersonalAccess,IsPersonalLock,IsShowAcct,IsUseUserOrgAccess,MaxQueryRecords,Name,OverwritePriceLimit,PreferenceType,Supervisor_ID,Updated,UpdatedBy,UserDiscount,UserLevel) VALUES (11,0,50004,'N','N','N','N','N','N','N','N','N','N','N',0,100,0,TO_TIMESTAMP('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','N','N','N','Y','Y','N','N','N','N',0,'Web Service Execution','N','N',101,TO_TIMESTAMP('2009-01-30 19:44:19','YYYY-MM-DD HH24:MI:SS'),100,0.00,' CO')
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,11,50004,100,TO_TIMESTAMP('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:44:20','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,0,50004,TO_TIMESTAMP('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_TIMESTAMP('2009-01-30 19:44:28','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,11,50004,TO_TIMESTAMP('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_TIMESTAMP('2009-01-30 19:44:33','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_Role_OrgAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadOnly,Updated,UpdatedBy) VALUES (11,12,50004,TO_TIMESTAMP('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100,'Y','N',TO_TIMESTAMP('2009-01-30 19:44:37','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_User (AD_Client_ID,AD_Org_ID,AD_User_ID,Created,CreatedBy,IsActive,IsFullBPAccess,Name,NotificationType,Password,Processing,Updated,UpdatedBy,Value) VALUES (11,0,50001,TO_TIMESTAMP('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y','WebService','X','WebService','N',TO_TIMESTAMP('2009-01-30 19:44:55','YYYY-MM-DD HH24:MI:SS'),100,'webserv')
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_User_Roles (AD_Client_ID,AD_Org_ID,AD_Role_ID,AD_User_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy) VALUES (11,0,50004,50001,TO_TIMESTAMP('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:45:11','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO AD_Process_Access (AD_Client_ID,AD_Org_ID,AD_Process_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy) VALUES (11,0,111,50004,TO_TIMESTAMP('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_TIMESTAMP('2009-01-30 19:45:27','YYYY-MM-DD HH24:MI:SS'),100)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,TO_TIMESTAMP('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of run process web service to process invoices','Y','Process Invoice',TO_TIMESTAMP('2009-01-30 19:46:34','YYYY-MM-DD HH24:MI:SS'),100,'ProcessInvoice',50001,50022,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'111',TO_TIMESTAMP('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Process_ID','C',TO_TIMESTAMP('2009-01-30 19:47:23','YYYY-MM-DD HH24:MI:SS'),100,50000,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'CO',TO_TIMESTAMP('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,'Y','DocAction','C',TO_TIMESTAMP('2009-01-30 19:47:43','YYYY-MM-DD HH24:MI:SS'),100,50001,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'0',TO_TIMESTAMP('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Menu_ID','C',TO_TIMESTAMP('2009-01-30 19:47:51','YYYY-MM-DD HH24:MI:SS'),100,50002,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_TIMESTAMP('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,'Y','AD_Record_ID','F',TO_TIMESTAMP('2009-01-30 19:47:59','YYYY-MM-DD HH24:MI:SS'),100,50003,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_TIMESTAMP('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_TIMESTAMP('2009-01-30 19:48:12','YYYY-MM-DD HH24:MI:SS'),100,50000)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceType (AD_Client_ID,AD_Org_ID,AD_Table_ID,Created,CreatedBy,Description,IsActive,Name,Updated,UpdatedBy,Value,WS_WebService_ID,WS_WebServiceMethod_ID,WS_WebServiceType_ID) VALUES (11,0,291,TO_TIMESTAMP('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'Configuration of Create Data web service to create business partners','Y','Create BPartner',TO_TIMESTAMP('2009-01-30 19:48:50','YYYY-MM-DD HH24:MI:SS'),100,'CreateBPartner',50001,50024,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'C_BPartner',TO_TIMESTAMP('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,'Y','TableName','C',TO_TIMESTAMP('2009-01-30 19:49:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,TO_TIMESTAMP('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,'Y','RecordID','F',TO_TIMESTAMP('2009-01-30 19:49:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebService_Para (AD_Client_ID,AD_Org_ID,ConstantValue,Created,CreatedBy,IsActive,ParameterName,ParameterType,Updated,UpdatedBy,WS_WebService_Para_ID,WS_WebServiceType_ID) VALUES (11,0,'Create',TO_TIMESTAMP('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,'Y','Action','C',TO_TIMESTAMP('2009-01-30 19:49:22','YYYY-MM-DD HH24:MI:SS'),100,50006,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2901,0,TO_TIMESTAMP('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:49:39','YYYY-MM-DD HH24:MI:SS'),100,50000,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2902,0,TO_TIMESTAMP('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:49:46','YYYY-MM-DD HH24:MI:SS'),100,50001,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2909,0,TO_TIMESTAMP('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:49:53','YYYY-MM-DD HH24:MI:SS'),100,50002,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2915,0,TO_TIMESTAMP('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:00','YYYY-MM-DD HH24:MI:SS'),100,50003,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,2916,0,TO_TIMESTAMP('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:05','YYYY-MM-DD HH24:MI:SS'),100,50004,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,3082,0,TO_TIMESTAMP('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:12','YYYY-MM-DD HH24:MI:SS'),100,50005,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4216,0,TO_TIMESTAMP('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:17','YYYY-MM-DD HH24:MI:SS'),100,50006,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceFieldInput (AD_Client_ID,AD_Column_ID,AD_Org_ID,Created,CreatedBy,IsActive,Updated,UpdatedBy,WS_WebServiceFieldInput_ID,WS_WebServiceType_ID) VALUES (11,4940,0,TO_TIMESTAMP('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,'Y',TO_TIMESTAMP('2009-01-30 19:50:24','YYYY-MM-DD HH24:MI:SS'),100,50007,50001)
|
||||||
|
;
|
||||||
|
|
||||||
|
INSERT INTO WS_WebServiceTypeAccess (AD_Client_ID,AD_Org_ID,AD_Role_ID,Created,CreatedBy,IsActive,IsReadWrite,Updated,UpdatedBy,WS_WebServiceType_ID) VALUES (11,0,50004,TO_TIMESTAMP('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,'Y','Y',TO_TIMESTAMP('2009-01-30 19:50:41','YYYY-MM-DD HH24:MI:SS'),100,50001)
|
||||||
|
;
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
update AD_Column set SeqNo=2 WHERE AD_Column_ID=56714;
|
|
@ -0,0 +1,30 @@
|
||||||
|
package org.idempiere.webservices;
|
||||||
|
|
||||||
|
import org.osgi.framework.BundleActivator;
|
||||||
|
import org.osgi.framework.BundleContext;
|
||||||
|
|
||||||
|
public class Activator implements BundleActivator {
|
||||||
|
|
||||||
|
private static BundleContext context;
|
||||||
|
|
||||||
|
static BundleContext getContext() {
|
||||||
|
return context;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
|
||||||
|
*/
|
||||||
|
public void start(BundleContext bundleContext) throws Exception {
|
||||||
|
Activator.context = bundleContext;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* (non-Javadoc)
|
||||||
|
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
|
||||||
|
*/
|
||||||
|
public void stop(BundleContext bundleContext) throws Exception {
|
||||||
|
Activator.context = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,849 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<con:soapui-project name="AdempiereWebServices" resourceRoot="" soapui-version="2.5" xmlns:con="http://eviware.com/soapui/config"><con:settings><con:setting id="ProjectSettings@projectRoot">/home/carlos/srcAdempiere/branches/3E_WebServices/testScripts</con:setting></con:settings><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="ModelADServiceHttpBinding" type="wsdl" bindingName="{http://3e.pl/ADInterface}ModelADServiceHttpBinding" soapVersion="1_1" anonymous="optional" definition="https://localhost:8443/ADInterface/services/ModelADService?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="https://localhost:8443/ADInterface/services/ModelADService?wsdl"><con:part><con:url>https://localhost:8443/ADInterface/services/ModelADService?wsdl</con:url><con:content><![CDATA[<wsdl:definitions targetNamespace="http://3e.pl/ADInterface" xmlns:tns="http://3e.pl/ADInterface" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding" xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
|
||||||
|
<wsdl:types>
|
||||||
|
<xsd:schema elementFormDefault="qualified" targetNamespace="http://3e.pl/ADInterface">
|
||||||
|
<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 maxOccurs="unbounded" minOccurs="1" name="Tab" type="tns:Tab"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="FieldList">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="unbounded" minOccurs="1" name="Field" type="tns:Field"/>
|
||||||
|
</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 maxOccurs="1" minOccurs="0" name="lookup" type="tns:LookupValues"/>
|
||||||
|
</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:complexType name="WindowTabData">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="DataSet" type="tns:DataSet"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="RowCount" type="xsd:int"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="Success" type="xsd:boolean"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="Error" type="xsd:string"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="ErrorInfo" type="xsd:string"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="Status" type="xsd:string"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="StatusError" type="xsd:boolean"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="NumRows" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="TotalRows" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="StartRow" type="xsd:int"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="DataSet">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="unbounded" minOccurs="0" name="DataRow" type="tns:DataRow"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="DataRow">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="unbounded" minOccurs="0" name="field" type="tns:DataField"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="DataField">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="val" type="xsd:string"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="lookup" type="tns:LookupValues"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="type" type="xsd:string" use="optional"/>
|
||||||
|
<xsd:attribute name="column" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="lval" type="xsd:string" use="optional"/>
|
||||||
|
<xsd:attribute name="disp" type="xsd:boolean" use="optional"/>
|
||||||
|
<xsd:attribute name="edit" type="xsd:boolean" use="optional"/>
|
||||||
|
<xsd:attribute name="error" type="xsd:boolean" use="optional"/>
|
||||||
|
<xsd:attribute name="errorVal" type="xsd:string" use="optional"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="LookupValues">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="unbounded" minOccurs="0" name="lv" type="tns:LookupValue"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="LookupValue">
|
||||||
|
<xsd:sequence></xsd:sequence>
|
||||||
|
<xsd:attribute name="val" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="key" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="GetProcessParams" type="tns:GetProcessParams"/>
|
||||||
|
<xsd:element name="ProcessParams" type="tns:ProcessParams"/>
|
||||||
|
<xsd:element name="RunProcess" type="tns:RunProcess"/>
|
||||||
|
<xsd:element name="RunProcessResponse" type="tns:RunProcessResponse"/>
|
||||||
|
<xsd:complexType name="ProcessParams">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Params" type="tns:ProcessParamList"/>
|
||||||
|
<xsd:element name="Description" type="xsd:string"/>
|
||||||
|
<xsd:element name="Name" type="xsd:string"/>
|
||||||
|
<xsd:element name="Help" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="AD_Process_ID" type="xsd:int"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="GetProcessParams">
|
||||||
|
<xsd:sequence></xsd:sequence>
|
||||||
|
<xsd:attribute name="AD_Process_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Menu_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Record_ID" type="xsd:int"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="RunProcess">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="ParamValues" type="tns:DataRow"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="AD_Process_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Menu_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Record_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="DocAction" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="RunProcessResponse">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Error" type="xsd:string"/>
|
||||||
|
<xsd:element name="Summary" type="xsd:string"/>
|
||||||
|
<xsd:element name="LogInfo" type="xsd:string"/>
|
||||||
|
<xsd:element name="Data" type="xsd:hexBinary"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="IsError" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="IsReport" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="ReportFormat" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ProcessParamList">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="unbounded" minOccurs="0" name="Param" type="tns:ProcessParam"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ProcessParam">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Description" type="xsd:string"/>
|
||||||
|
<xsd:element name="Help" type="xsd:string"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="lookup" type="tns:LookupValues"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="Name" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="DefaultValue" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="DefaultValue2" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="IsMandatory" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="IsRange" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="FieldLength" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="DisplayType" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="ColumnName" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<!--int WindowNo, int AD_Window_ID, int AD_Menu_ID, int TabNo, int PrevTabNo, int PrevRecNo, boolean getData, int RowStart, int RowCount)-->
|
||||||
|
<xsd:element name="WindowTabDataReq" type="tns:WindowTabDataReq"/>
|
||||||
|
<xsd:complexType name="WindowTabDataReq">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="FindCriteria" type="tns:DataRow"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="WindowNo" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Window_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Menu_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="TabNo" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="PrevTabNo" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="PrevRecNo" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="getData" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="RowStart" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="RowCount" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="fromZoom" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="fromZoom_Window_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="fromZoom_Tab_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="fromZoom_Row_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="fromZoom_ColumnName" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="fromZoom_ColumnValue" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="ADMenu" type="tns:ADMenuItem"/>
|
||||||
|
<xsd:complexType name="ADMenuItemList">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="unbounded" minOccurs="0" name="Item" type="tns:ADMenuItem"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ADMenuItem">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="items" type="tns:ADMenuItemList"/>
|
||||||
|
<xsd:element name="description" type="xsd:string"/>
|
||||||
|
<xsd:element name="url" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="AD_Menu_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="type" type="xsd:string"/>
|
||||||
|
<xsd:attribute name="name" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="ADLoginRequest" type="tns:ADLoginRequest"/>
|
||||||
|
<xsd:element name="ADLoginResponse" type="tns:ADLoginResponse"/>
|
||||||
|
<xsd:complexType name="ADLoginRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="user" type="xsd:string"/>
|
||||||
|
<xsd:element name="pass" type="xsd:string"/>
|
||||||
|
<xsd:element name="lang" type="xsd:string"/>
|
||||||
|
<xsd:element name="ClientID" type="xsd:int"/>
|
||||||
|
<xsd:element name="RoleID" type="xsd:int"/>
|
||||||
|
<xsd:element name="OrgID" type="xsd:int"/>
|
||||||
|
<xsd:element name="WarehouseID" type="xsd:int"/>
|
||||||
|
<xsd:element name="stage" type="xsd:int"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ADLoginResponse">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="status" type="xsd:int"/>
|
||||||
|
<xsd:element name="roles" type="tns:LookupValues"/>
|
||||||
|
<xsd:element name="langs" type="tns:LookupValues"/>
|
||||||
|
<xsd:element name="orgs" type="tns:LookupValues"/>
|
||||||
|
<xsd:element name="clients" type="tns:LookupValues"/>
|
||||||
|
<xsd:element name="warehouses" type="tns:LookupValues"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="Location">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="C_Location_ID" type="xsd:int"/>
|
||||||
|
<xsd:element name="Name" type="xsd:string"/>
|
||||||
|
<xsd:element name="Address1" type="xsd:string"/>
|
||||||
|
<xsd:element name="Address2" type="xsd:string"/>
|
||||||
|
<xsd:element name="City" type="xsd:string"/>
|
||||||
|
<xsd:element name="PostalCode" type="xsd:string"/>
|
||||||
|
<xsd:element name="C_Country_ID" type="xsd:int"/>
|
||||||
|
<xsd:element name="C_Region_ID" type="xsd:int"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="Countries" type="tns:LookupValues"/>
|
||||||
|
<!--<xsd:element name="Regions" type="tns:LookupValues" minOccurs="0" maxOccurs="1" />-->
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="StandardResponse">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="Error" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="IsError" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="RecordID" type="xsd:int"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="Location" type="tns:Location"/>
|
||||||
|
<xsd:element name="StandardResponse" type="tns:StandardResponse"/>
|
||||||
|
<xsd:element name="DocAction" type="tns:DocAction"/>
|
||||||
|
<xsd:complexType name="DocAction">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="Action" type="tns:LookupValues"/>
|
||||||
|
<xsd:element name="Error" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="IsError" type="xsd:boolean"/>
|
||||||
|
<xsd:attribute name="RecordID" type="xsd:int"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="getLookupSearchDataReq" type="tns:getLookupSearchDataReq"/>
|
||||||
|
<xsd:complexType name="getLookupSearchDataReq">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="Params" type="tns:DataRow"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="WindowNo" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="TabNo" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="RowNo" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="ColumnName" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<!--Elements added for model web services-->
|
||||||
|
<xsd:element name="ModelSetDocActionRequest" type="tns:ModelSetDocActionRequest"/>
|
||||||
|
<xsd:complexType name="ModelSetDocAction">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="serviceType" type="xsd:string"/>
|
||||||
|
<xsd:element name="tableName" type="xsd:string"/>
|
||||||
|
<xsd:element name="recordID" type="xsd:int"/>
|
||||||
|
<xsd:element name="docAction" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ModelSetDocActionRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="1" name="ModelSetDocAction" type="tns:ModelSetDocAction"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="1" name="ADLoginRequest" type="tns:ADLoginRequest"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="ModelRunProcess" type="tns:ModelRunProcess"/>
|
||||||
|
<xsd:complexType name="ModelRunProcess">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="serviceType" type="xsd:string"/>
|
||||||
|
<xsd:element name="ParamValues" type="tns:DataRow"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="AD_Process_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Menu_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="AD_Record_ID" type="xsd:int"/>
|
||||||
|
<xsd:attribute name="DocAction" type="xsd:string"/>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="ModelRunProcessRequest" type="tns:ModelRunProcessRequest"/>
|
||||||
|
<xsd:complexType name="ModelRunProcessRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="1" name="ModelRunProcess" type="tns:ModelRunProcess"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="1" name="ADLoginRequest" type="tns:ADLoginRequest"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="ModelGetListRequest" type="tns:ModelGetListRequest"/>
|
||||||
|
<xsd:complexType name="ModelGetList">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="serviceType" type="xsd:string"/>
|
||||||
|
<xsd:element name="AD_Reference_ID" type="xsd:int"/>
|
||||||
|
<xsd:element name="Filter" type="xsd:string"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ModelGetListRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="1" name="ModelGetList" type="tns:ModelGetList"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="1" name="ADLoginRequest" type="tns:ADLoginRequest"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:element name="ModelCRUDRequest" type="tns:ModelCRUDRequest"/>
|
||||||
|
<xsd:complexType name="ModelCRUD">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="serviceType" type="xsd:string"/>
|
||||||
|
<xsd:element name="TableName" type="xsd:string"/>
|
||||||
|
<xsd:element name="RecordID" type="xsd:int"/>
|
||||||
|
<xsd:element name="Filter" type="xsd:string"/>
|
||||||
|
<xsd:element name="Action">
|
||||||
|
<xsd:simpleType>
|
||||||
|
<xsd:restriction base="xsd:string">
|
||||||
|
<xsd:enumeration value="Create"/>
|
||||||
|
<xsd:enumeration value="Read"/>
|
||||||
|
<xsd:enumeration value="Update"/>
|
||||||
|
<xsd:enumeration value="Delete"/>
|
||||||
|
</xsd:restriction>
|
||||||
|
</xsd:simpleType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="0" name="DataRow" type="tns:DataRow"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
<xsd:complexType name="ModelCRUDRequest">
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="1" name="ModelCRUD" type="tns:ModelCRUD"/>
|
||||||
|
<xsd:element maxOccurs="1" minOccurs="1" name="ADLoginRequest" type="tns:ADLoginRequest"/>
|
||||||
|
</xsd:sequence>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:schema>
|
||||||
|
</wsdl:types>
|
||||||
|
<wsdl:message name="queryDataResponse">
|
||||||
|
<wsdl:part name="WindowTabData" element="tns:WindowTabData"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="runProcessResponse">
|
||||||
|
<wsdl:part name="RunProcessResponse" element="tns:RunProcessResponse"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getListResponse">
|
||||||
|
<wsdl:part name="WindowTabData" element="tns:WindowTabData"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="getListRequest">
|
||||||
|
<wsdl:part name="ModelGetListRequest" element="tns:ModelGetListRequest"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="setDocActionResponse">
|
||||||
|
<wsdl:part name="StandardResponse" element="tns:StandardResponse"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="readDataRequest">
|
||||||
|
<wsdl:part name="ModelCRUDRequest" element="tns:ModelCRUDRequest"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="createDataRequest">
|
||||||
|
<wsdl:part name="ModelCRUDRequest" element="tns:ModelCRUDRequest"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="updateDataResponse">
|
||||||
|
<wsdl:part name="StandardResponse" element="tns:StandardResponse"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="setDocActionRequest">
|
||||||
|
<wsdl:part name="ModelSetDocActionRequest" element="tns:ModelSetDocActionRequest"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="queryDataRequest">
|
||||||
|
<wsdl:part name="ModelCRUDRequest" element="tns:ModelCRUDRequest"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="deleteDataResponse">
|
||||||
|
<wsdl:part name="StandardResponse" element="tns:StandardResponse"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="deleteDataRequest">
|
||||||
|
<wsdl:part name="ModelCRUDRequest" element="tns:ModelCRUDRequest"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="createDataResponse">
|
||||||
|
<wsdl:part name="StandardResponse" element="tns:StandardResponse"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="readDataResponse">
|
||||||
|
<wsdl:part name="WindowTabData" element="tns:WindowTabData"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="runProcessRequest">
|
||||||
|
<wsdl:part name="ModelRunProcessRequest" element="tns:ModelRunProcessRequest"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:message name="updateDataRequest">
|
||||||
|
<wsdl:part name="ModelCRUDRequest" element="tns:ModelCRUDRequest"/>
|
||||||
|
</wsdl:message>
|
||||||
|
<wsdl:portType name="ModelADServicePortType">
|
||||||
|
<wsdl:operation name="runProcess">
|
||||||
|
<wsdl:input name="runProcessRequest" message="tns:runProcessRequest"/>
|
||||||
|
<wsdl:output name="runProcessResponse" message="tns:runProcessResponse"/>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="createData">
|
||||||
|
<wsdl:input name="createDataRequest" message="tns:createDataRequest"/>
|
||||||
|
<wsdl:output name="createDataResponse" message="tns:createDataResponse"/>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="updateData">
|
||||||
|
<wsdl:input name="updateDataRequest" message="tns:updateDataRequest"/>
|
||||||
|
<wsdl:output name="updateDataResponse" message="tns:updateDataResponse"/>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="readData">
|
||||||
|
<wsdl:input name="readDataRequest" message="tns:readDataRequest"/>
|
||||||
|
<wsdl:output name="readDataResponse" message="tns:readDataResponse"/>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getList">
|
||||||
|
<wsdl:input name="getListRequest" message="tns:getListRequest"/>
|
||||||
|
<wsdl:output name="getListResponse" message="tns:getListResponse"/>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="setDocAction">
|
||||||
|
<wsdl:input name="setDocActionRequest" message="tns:setDocActionRequest"/>
|
||||||
|
<wsdl:output name="setDocActionResponse" message="tns:setDocActionResponse"/>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="deleteData">
|
||||||
|
<wsdl:input name="deleteDataRequest" message="tns:deleteDataRequest"/>
|
||||||
|
<wsdl:output name="deleteDataResponse" message="tns:deleteDataResponse"/>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="queryData">
|
||||||
|
<wsdl:input name="queryDataRequest" message="tns:queryDataRequest"/>
|
||||||
|
<wsdl:output name="queryDataResponse" message="tns:queryDataResponse"/>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:portType>
|
||||||
|
<wsdl:binding name="ModelADServiceHttpBinding" type="tns:ModelADServicePortType">
|
||||||
|
<wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
|
||||||
|
<wsdl:operation name="runProcess">
|
||||||
|
<wsdlsoap:operation soapAction=""/>
|
||||||
|
<wsdl:input name="runProcessRequest">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output name="runProcessResponse">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="createData">
|
||||||
|
<wsdlsoap:operation soapAction=""/>
|
||||||
|
<wsdl:input name="createDataRequest">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output name="createDataResponse">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="updateData">
|
||||||
|
<wsdlsoap:operation soapAction=""/>
|
||||||
|
<wsdl:input name="updateDataRequest">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output name="updateDataResponse">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="readData">
|
||||||
|
<wsdlsoap:operation soapAction=""/>
|
||||||
|
<wsdl:input name="readDataRequest">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output name="readDataResponse">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="getList">
|
||||||
|
<wsdlsoap:operation soapAction=""/>
|
||||||
|
<wsdl:input name="getListRequest">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output name="getListResponse">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="setDocAction">
|
||||||
|
<wsdlsoap:operation soapAction=""/>
|
||||||
|
<wsdl:input name="setDocActionRequest">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output name="setDocActionResponse">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="deleteData">
|
||||||
|
<wsdlsoap:operation soapAction=""/>
|
||||||
|
<wsdl:input name="deleteDataRequest">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output name="deleteDataResponse">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
<wsdl:operation name="queryData">
|
||||||
|
<wsdlsoap:operation soapAction=""/>
|
||||||
|
<wsdl:input name="queryDataRequest">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:input>
|
||||||
|
<wsdl:output name="queryDataResponse">
|
||||||
|
<wsdlsoap:body use="literal" namespace="http://3e.pl/ADInterface"/>
|
||||||
|
</wsdl:output>
|
||||||
|
</wsdl:operation>
|
||||||
|
</wsdl:binding>
|
||||||
|
<wsdl:service name="ModelADService">
|
||||||
|
<wsdl:port name="ModelADServiceHttpPort" binding="tns:ModelADServiceHttpBinding">
|
||||||
|
<wsdlsoap:address location="https://localhost:8443/ADInterface/services/ModelADService"/>
|
||||||
|
</wsdl:port>
|
||||||
|
</wsdl:service>
|
||||||
|
</wsdl:definitions>]]></con:content><con:type>http://schemas.xmlsoap.org/wsdl/</con:type></con:part></con:definitionCache><con:endpoints><con:endpoint>https://localhost:8443/ADInterface/services/ModelADService</con:endpoint></con:endpoints><con:operation isOneWay="false" action="" name="createData" bindingOperationName="createData" type="Request-Response" outputName="createDataResponse" inputName="createDataRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Create BP GlobalQSS (GW Working)"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/ModelADService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adin="http://3e.pl/ADInterface">
|
||||||
|
<soapenv:Header/>
|
||||||
|
<soapenv:Body>
|
||||||
|
<adin:createData>
|
||||||
|
<adin:ModelCRUDRequest>
|
||||||
|
<adin:ModelCRUD>
|
||||||
|
<adin:serviceType>CreateBPartner</adin:serviceType>
|
||||||
|
<adin:TableName>C_BPartner</adin:TableName>
|
||||||
|
<adin:RecordID>0</adin:RecordID>
|
||||||
|
<adin:Action>Create</adin:Action>
|
||||||
|
<adin:DataRow>
|
||||||
|
<adin:field column="Value">
|
||||||
|
<adin:val>GlobalQSS</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
<adin:field column="Name">
|
||||||
|
<adin:val>Quality Systems & Solutions</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
<adin:field column="TaxID">
|
||||||
|
<adin:val>830.085.359-4</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
<adin:field column="IsVendor">
|
||||||
|
<adin:val>Y</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
<adin:field column="IsCustomer">
|
||||||
|
<adin:val>N</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
<adin:field column="IsTaxExempt">
|
||||||
|
<adin:val>N</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
<adin:field column="Name2">
|
||||||
|
<adin:val>QSS Ltda. - http://www.globalqss.com</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
<adin:field column="C_BP_Group_ID">
|
||||||
|
<adin:val>104</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
</adin:DataRow>
|
||||||
|
</adin:ModelCRUD>
|
||||||
|
<adin:ADLoginRequest>
|
||||||
|
<adin:user>WebService</adin:user>
|
||||||
|
<adin:pass>WebService</adin:pass>
|
||||||
|
<adin:lang>en_US</adin:lang>
|
||||||
|
<adin:ClientID>11</adin:ClientID>
|
||||||
|
<adin:RoleID>50004</adin:RoleID>
|
||||||
|
<adin:OrgID>11</adin:OrgID>
|
||||||
|
<adin:WarehouseID>103</adin:WarehouseID>
|
||||||
|
<adin:stage>9</adin:stage>
|
||||||
|
</adin:ADLoginRequest>
|
||||||
|
</adin:ModelCRUDRequest>
|
||||||
|
</adin:createData>
|
||||||
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://3e.pl/ADInterface/ModelADServicePortType/createDataRequest"/></con:call></con:operation><con:operation isOneWay="false" action="" name="deleteData" bindingOperationName="deleteData" type="Request-Response" outputName="deleteDataResponse" inputName="deleteDataRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Delete BP TreeFarm (must fail)"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/ModelADService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adin="http://3e.pl/ADInterface">
|
||||||
|
<soapenv:Header/>
|
||||||
|
<soapenv:Body>
|
||||||
|
<adin:deleteData>
|
||||||
|
<adin:ModelCRUDRequest>
|
||||||
|
<adin:ModelCRUD>
|
||||||
|
<adin:serviceType>DeleteBPartner</adin:serviceType>
|
||||||
|
<adin:TableName>C_BPartner</adin:TableName>
|
||||||
|
<adin:RecordID>114</adin:RecordID>
|
||||||
|
<adin:Action>Delete</adin:Action>
|
||||||
|
</adin:ModelCRUD>
|
||||||
|
<adin:ADLoginRequest>
|
||||||
|
<adin:user>WebService</adin:user>
|
||||||
|
<adin:pass>WebService</adin:pass>
|
||||||
|
<adin:lang>en_US</adin:lang>
|
||||||
|
<adin:ClientID>11</adin:ClientID>
|
||||||
|
<adin:RoleID>50004</adin:RoleID>
|
||||||
|
<adin:OrgID>11</adin:OrgID>
|
||||||
|
<adin:WarehouseID>103</adin:WarehouseID>
|
||||||
|
<adin:stage>9</adin:stage>
|
||||||
|
</adin:ADLoginRequest>
|
||||||
|
</adin:ModelCRUDRequest>
|
||||||
|
</adin:deleteData>
|
||||||
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://3e.pl/ADInterface/ModelADServicePortType/deleteDataRequest"/></con:call></con:operation><con:operation isOneWay="false" action="" name="getList" bindingOperationName="getList" type="Request-Response" outputName="getListResponse" inputName="getListRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Get List Sales Region"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/ModelADService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adin="http://3e.pl/ADInterface">
|
||||||
|
<soapenv:Header/>
|
||||||
|
<soapenv:Body>
|
||||||
|
<adin:getList>
|
||||||
|
<adin:ModelGetListRequest>
|
||||||
|
<adin:ModelGetList>
|
||||||
|
<adin:serviceType>GetListSalesRegions</adin:serviceType>
|
||||||
|
<adin:AD_Reference_ID>144</adin:AD_Reference_ID>
|
||||||
|
<adin:Filter></adin:Filter>
|
||||||
|
</adin:ModelGetList>
|
||||||
|
<adin:ADLoginRequest>
|
||||||
|
<adin:user>WebService</adin:user>
|
||||||
|
<adin:pass>WebService</adin:pass>
|
||||||
|
<adin:lang>en_US</adin:lang>
|
||||||
|
<adin:ClientID>11</adin:ClientID>
|
||||||
|
<adin:RoleID>50004</adin:RoleID>
|
||||||
|
<adin:OrgID>11</adin:OrgID>
|
||||||
|
<adin:WarehouseID>103</adin:WarehouseID>
|
||||||
|
<adin:stage>9</adin:stage>
|
||||||
|
</adin:ADLoginRequest>
|
||||||
|
</adin:ModelGetListRequest>
|
||||||
|
</adin:getList>
|
||||||
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://3e.pl/ADInterface/ModelADServicePortType/getListRequest"/></con:call></con:operation><con:operation isOneWay="false" action="" name="queryData" bindingOperationName="queryData" type="Request-Response" outputName="queryDataResponse" inputName="queryDataRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample get BP Standard < S"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/ModelADService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adin="http://3e.pl/ADInterface">
|
||||||
|
<soapenv:Header/>
|
||||||
|
<soapenv:Body>
|
||||||
|
<adin:queryData>
|
||||||
|
<adin:ModelCRUDRequest>
|
||||||
|
<adin:ModelCRUD>
|
||||||
|
<adin:serviceType>QueryBPartner</adin:serviceType>
|
||||||
|
<adin:TableName>C_BPartner</adin:TableName>
|
||||||
|
<adin:Filter>name<'S'</adin:Filter>
|
||||||
|
<adin:Action>Read</adin:Action>
|
||||||
|
<adin:DataRow>
|
||||||
|
<adin:field column="C_BP_Group_ID">
|
||||||
|
<adin:val>103</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
</adin:DataRow>
|
||||||
|
</adin:ModelCRUD>
|
||||||
|
<adin:ADLoginRequest>
|
||||||
|
<adin:user>WebService</adin:user>
|
||||||
|
<adin:pass>WebService</adin:pass>
|
||||||
|
<adin:lang>en_US</adin:lang>
|
||||||
|
<adin:ClientID>11</adin:ClientID>
|
||||||
|
<adin:RoleID>50004</adin:RoleID>
|
||||||
|
<adin:OrgID>11</adin:OrgID>
|
||||||
|
<adin:WarehouseID>103</adin:WarehouseID>
|
||||||
|
<adin:stage>9</adin:stage>
|
||||||
|
</adin:ADLoginRequest>
|
||||||
|
</adin:ModelCRUDRequest>
|
||||||
|
</adin:queryData>
|
||||||
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://3e.pl/ADInterface/ModelADServicePortType/queryDataRequest"/></con:call></con:operation><con:operation isOneWay="false" action="" name="readData" bindingOperationName="readData" type="Request-Response" outputName="readDataResponse" inputName="readDataRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Read TreeFarm"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/ModelADService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adin="http://3e.pl/ADInterface">
|
||||||
|
<soapenv:Header/>
|
||||||
|
<soapenv:Body>
|
||||||
|
<adin:readData>
|
||||||
|
<adin:ModelCRUDRequest>
|
||||||
|
<adin:ModelCRUD>
|
||||||
|
<adin:serviceType>ReadBPartner</adin:serviceType>
|
||||||
|
<adin:TableName>C_BPartner</adin:TableName>
|
||||||
|
<adin:RecordID>114</adin:RecordID>
|
||||||
|
<adin:Action>Read</adin:Action>
|
||||||
|
</adin:ModelCRUD>
|
||||||
|
<adin:ADLoginRequest>
|
||||||
|
<adin:user>WebService</adin:user>
|
||||||
|
<adin:pass>WebService</adin:pass>
|
||||||
|
<adin:lang>en_US</adin:lang>
|
||||||
|
<adin:ClientID>11</adin:ClientID>
|
||||||
|
<adin:RoleID>50004</adin:RoleID>
|
||||||
|
<adin:OrgID>11</adin:OrgID>
|
||||||
|
<adin:WarehouseID>103</adin:WarehouseID>
|
||||||
|
<adin:stage>9</adin:stage>
|
||||||
|
</adin:ADLoginRequest>
|
||||||
|
</adin:ModelCRUDRequest>
|
||||||
|
</adin:readData>
|
||||||
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://3e.pl/ADInterface/ModelADServicePortType/readDataRequest"/></con:call></con:operation><con:operation isOneWay="false" action="" name="runProcess" bindingOperationName="runProcess" type="Request-Response" outputName="runProcessResponse" inputName="runProcessRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Process Invoice (GW Working)"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/ModelADService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adin="http://3e.pl/ADInterface">
|
||||||
|
<soapenv:Header/>
|
||||||
|
<soapenv:Body>
|
||||||
|
<adin:runProcess>
|
||||||
|
<adin:ModelRunProcessRequest>
|
||||||
|
<adin:ModelRunProcess AD_Process_ID="111" AD_Menu_ID="0" AD_Record_ID="103" DocAction="CO">
|
||||||
|
<adin:serviceType>ProcessInvoice</adin:serviceType>
|
||||||
|
<adin:ParamValues>
|
||||||
|
</adin:ParamValues>
|
||||||
|
</adin:ModelRunProcess>
|
||||||
|
<adin:ADLoginRequest>
|
||||||
|
<adin:user>WebService</adin:user>
|
||||||
|
<adin:pass>WebService</adin:pass>
|
||||||
|
<adin:lang>en_US</adin:lang>
|
||||||
|
<adin:ClientID>11</adin:ClientID>
|
||||||
|
<adin:RoleID>50004</adin:RoleID>
|
||||||
|
<adin:OrgID>11</adin:OrgID>
|
||||||
|
<adin:WarehouseID>103</adin:WarehouseID>
|
||||||
|
<adin:stage>9</adin:stage>
|
||||||
|
</adin:ADLoginRequest>
|
||||||
|
</adin:ModelRunProcessRequest>
|
||||||
|
</adin:runProcess>
|
||||||
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://3e.pl/ADInterface/ModelADServicePortType/runProcessRequest"/></con:call><con:call name="Run Storage Detail"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/ModelADService</con:endpoint><con:request><![CDATA[<!--
|
||||||
|
Example on how to run report Storage Detail with HQ Warehouse and Patio Chair as parameters
|
||||||
|
You need to define web service security for:
|
||||||
|
Web Service Type: RunStorageDetail
|
||||||
|
Web Service Parameters:
|
||||||
|
AD_Process_ID Constant 236
|
||||||
|
AD_Menu_ID Constant 0
|
||||||
|
AD_Record_ID Constant 0
|
||||||
|
And allow execution to the WebService role on the report.
|
||||||
|
-->
|
||||||
|
|
||||||
|
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adin="http://3e.pl/ADInterface">
|
||||||
|
<soapenv:Header/>
|
||||||
|
<soapenv:Body>
|
||||||
|
<adin:runProcess>
|
||||||
|
<adin:ModelRunProcessRequest>
|
||||||
|
<adin:ModelRunProcess AD_Process_ID="236">
|
||||||
|
<adin:serviceType>RunStorageDetail</adin:serviceType>
|
||||||
|
<adin:ParamValues>
|
||||||
|
<adin:field column="M_Warehouse_ID">
|
||||||
|
<adin:val>103</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
<adin:field column="M_Product_ID">
|
||||||
|
<adin:val>133</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
</adin:ParamValues>
|
||||||
|
</adin:ModelRunProcess>
|
||||||
|
<adin:ADLoginRequest>
|
||||||
|
<adin:user>WebService</adin:user>
|
||||||
|
<adin:pass>WebService</adin:pass>
|
||||||
|
<adin:lang>en_US</adin:lang>
|
||||||
|
<adin:ClientID>11</adin:ClientID>
|
||||||
|
<adin:RoleID>50004</adin:RoleID>
|
||||||
|
<adin:OrgID>11</adin:OrgID>
|
||||||
|
<adin:WarehouseID>103</adin:WarehouseID>
|
||||||
|
<adin:stage>9</adin:stage>
|
||||||
|
</adin:ADLoginRequest>
|
||||||
|
</adin:ModelRunProcessRequest>
|
||||||
|
</adin:runProcess>
|
||||||
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://3e.pl/ADInterface/ModelADServicePortType/runProcessRequest"/></con:call></con:operation><con:operation isOneWay="false" action="" name="setDocAction" bindingOperationName="setDocAction" type="Request-Response" outputName="setDocActionResponse" inputName="setDocActionRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Complete Order"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/ModelADService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adin="http://3e.pl/ADInterface">
|
||||||
|
<soapenv:Header/>
|
||||||
|
<soapenv:Body>
|
||||||
|
<adin:setDocAction>
|
||||||
|
<adin:ModelSetDocActionRequest>
|
||||||
|
<adin:ModelSetDocAction>
|
||||||
|
<adin:serviceType>ActionCompleteOrder</adin:serviceType>
|
||||||
|
<adin:tableName>C_Order</adin:tableName>
|
||||||
|
<adin:recordID>102</adin:recordID>
|
||||||
|
<adin:docAction>CO</adin:docAction>
|
||||||
|
</adin:ModelSetDocAction>
|
||||||
|
<adin:ADLoginRequest>
|
||||||
|
<adin:user>WebService</adin:user>
|
||||||
|
<adin:pass>WebService</adin:pass>
|
||||||
|
<adin:lang>en_US</adin:lang>
|
||||||
|
<adin:ClientID>11</adin:ClientID>
|
||||||
|
<adin:RoleID>50004</adin:RoleID>
|
||||||
|
<adin:OrgID>11</adin:OrgID>
|
||||||
|
<adin:WarehouseID>103</adin:WarehouseID>
|
||||||
|
<adin:stage>9</adin:stage>
|
||||||
|
</adin:ADLoginRequest>
|
||||||
|
</adin:ModelSetDocActionRequest>
|
||||||
|
</adin:setDocAction>
|
||||||
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://3e.pl/ADInterface/ModelADServicePortType/setDocActionRequest"/></con:call></con:operation><con:operation isOneWay="false" action="" name="updateData" bindingOperationName="updateData" type="Request-Response" outputName="updateDataResponse" inputName="updateDataRequest" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Update TreeFarm URL"><con:settings/><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/ModelADService</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:adin="http://3e.pl/ADInterface">
|
||||||
|
<soapenv:Header/>
|
||||||
|
<soapenv:Body>
|
||||||
|
<adin:updateData>
|
||||||
|
<adin:ModelCRUDRequest>
|
||||||
|
<adin:ModelCRUD>
|
||||||
|
<adin:serviceType>UpdateBPartner</adin:serviceType>
|
||||||
|
<adin:TableName>C_BPartner</adin:TableName>
|
||||||
|
<adin:RecordID>114</adin:RecordID>
|
||||||
|
<adin:Action>Update</adin:Action>
|
||||||
|
<adin:DataRow>
|
||||||
|
<adin:field column="URL">
|
||||||
|
<adin:val>http://www.treefarm.com</adin:val>
|
||||||
|
</adin:field>
|
||||||
|
</adin:DataRow>
|
||||||
|
</adin:ModelCRUD>
|
||||||
|
<adin:ADLoginRequest>
|
||||||
|
<adin:user>WebService</adin:user>
|
||||||
|
<adin:pass>WebService</adin:pass>
|
||||||
|
<adin:lang>en_US</adin:lang>
|
||||||
|
<adin:ClientID>11</adin:ClientID>
|
||||||
|
<adin:RoleID>50004</adin:RoleID>
|
||||||
|
<adin:OrgID>11</adin:OrgID>
|
||||||
|
<adin:WarehouseID>103</adin:WarehouseID>
|
||||||
|
<adin:stage>9</adin:stage>
|
||||||
|
</adin:ADLoginRequest>
|
||||||
|
</adin:ModelCRUDRequest>
|
||||||
|
</adin:updateData>
|
||||||
|
</soapenv:Body>
|
||||||
|
</soapenv:Envelope>]]></con:request><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://3e.pl/ADInterface/ModelADServicePortType/updateDataRequest"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/></con:soapui-project>
|
|
@ -0,0 +1,23 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<SOAP-ENV:Body>
|
||||||
|
<runProcess xmlns="http://3e.pl/ADInterface">
|
||||||
|
<ModelRunProcessRequest>
|
||||||
|
<ModelRunProcess AD_Process_ID="111" AD_Menu_ID="0" AD_Record_ID="103" DocAction="CO">
|
||||||
|
<serviceType>ProcessInvoice</serviceType>
|
||||||
|
<ParamValues/>
|
||||||
|
</ModelRunProcess>
|
||||||
|
<ADLoginRequest>
|
||||||
|
<user>WebService</user>
|
||||||
|
<pass>WebService</pass>
|
||||||
|
<lang>en_US</lang>
|
||||||
|
<ClientID>11</ClientID>
|
||||||
|
<RoleID>50004</RoleID>
|
||||||
|
<OrgID>11</OrgID>
|
||||||
|
<WarehouseID>103</WarehouseID>
|
||||||
|
<stage/>
|
||||||
|
</ADLoginRequest>
|
||||||
|
</ModelRunProcessRequest>
|
||||||
|
</runProcess>
|
||||||
|
</SOAP-ENV:Body>
|
||||||
|
</SOAP-ENV:Envelope>
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
|
<SOAP-ENV:Body>
|
||||||
|
<setDocAction xmlns="http://3e.pl/ADInterface">
|
||||||
|
<ModelSetDocActionRequest>
|
||||||
|
<ModelSetDocAction>
|
||||||
|
<serviceType>ActionCompleteOrder</serviceType>
|
||||||
|
<tableName>C_Order</tableName>
|
||||||
|
<recordID>102</recordID>
|
||||||
|
<docAction>CO</docAction>
|
||||||
|
</ModelSetDocAction>
|
||||||
|
<ADLoginRequest>
|
||||||
|
<user>WebService</user>
|
||||||
|
<pass>WebService</pass>
|
||||||
|
<lang>en_US</lang>
|
||||||
|
<ClientID>11</ClientID>
|
||||||
|
<RoleID>50004</RoleID>
|
||||||
|
<OrgID>11</OrgID>
|
||||||
|
<WarehouseID>103</WarehouseID>
|
||||||
|
<stage/>
|
||||||
|
</ADLoginRequest>
|
||||||
|
</ModelSetDocActionRequest>
|
||||||
|
</setDocAction>
|
||||||
|
</SOAP-ENV:Body>
|
||||||
|
</SOAP-ENV:Envelope>
|
|
@ -0,0 +1,18 @@
|
||||||
|
:
|
||||||
|
if [ $# -ne 1 ]
|
||||||
|
then
|
||||||
|
echo "Usage: $0 Message_File
|
||||||
|
echo " i.e.: $0 MsgModelSetDocAction
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
FILENAME=ModelADService.wsdl.$$
|
||||||
|
wget \
|
||||||
|
--no-check-certificate \
|
||||||
|
--post-file=$1 \
|
||||||
|
--save-headers \
|
||||||
|
https://localhost:8443/ADInterface/services/ModelADService \
|
||||||
|
-O $FILENAME
|
||||||
|
ls -l $FILENAME
|
||||||
|
cat $FILENAME
|
||||||
|
echo
|
||||||
|
rm -f $FILENAME
|
Loading…
Reference in New Issue