hg merge release-2.1 (merge release2.1 into release3.1)

This commit is contained in:
Carlos Ruiz 2015-11-18 08:12:19 -05:00
parent 5d853ce776
commit 0439b499c7
4 changed files with 824 additions and 671 deletions

View File

@ -16,9 +16,13 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.HashMap;
import java.util.Map;
import java.util.Properties;
import java.util.logging.Level;
import javax.servlet.http.HttpServletRequest;
import org.adempiere.util.ServerContext;
import org.compiere.model.MSession;
import org.compiere.model.MUser;
@ -29,6 +33,7 @@ import org.compiere.util.Env;
import org.compiere.util.KeyNamePair;
import org.compiere.util.Language;
import org.compiere.util.Login;
import org.idempiere.adInterface.x10.ADLoginRequest;
/**
* @author deepak
@ -46,6 +51,12 @@ public class CompiereService {
private int m_M_Warehouse_ID;
private String m_locale;
private String m_userName;
private String m_password;
private int m_expiryMinutes;
private long m_lastAuthorizationTime;
private String m_IPAddress;
private static Map<String,CompiereService> csMap = new HashMap<String, CompiereService>();
private static Map<String,Properties> ctxMap = new HashMap<String, Properties>();
private boolean m_loggedin = false;
@ -131,12 +142,23 @@ public class CompiereService {
*/
public void disconnect()
{
if (m_connected)
{
Env.logout();
ServerContext.dispose();
m_loggedin = false;
m_connected = false;
// TODO: create a thread that checks expired connected compiereservices and log them out
if (! isExpired()) {
// do not close, save session in cache
if (! csMap.containsValue(this)) {
String key = getKey(m_AD_Client_ID,
m_AD_Org_ID,
m_userName,
m_AD_Role_ID,
m_M_Warehouse_ID,
m_locale,
m_password,
m_IPAddress);
csMap.put(key.toString(), this);
Properties savedCache = new Properties();
savedCache.putAll(Env.getCtx());
ctxMap.put(key.toString(), savedCache);
}
}
}
@ -328,4 +350,101 @@ public class CompiereService {
return m_userName;
}
/**
* @return set password
*/
public void setPassword(String pass) {
m_password = pass;
}
/**
* @return logged in password of current request
*/
public String getPassword() {
return m_password;
}
/**
* @return set expiry minutes
*/
public void setExpiryMinutes(int expiryMinutes) {
m_expiryMinutes = expiryMinutes;
}
/**
* @return logged in expiry minutes of current request
*/
public int getExpiryMinutes() {
return m_expiryMinutes;
}
public void refreshLastAuthorizationTime() {
m_lastAuthorizationTime = System.currentTimeMillis();
}
public void setIPAddress(String remoteAddr) {
m_IPAddress = remoteAddr;
}
public static CompiereService get(HttpServletRequest req, ADLoginRequest loginRequest) {
String key = getKey(loginRequest.getClientID(),
loginRequest.getOrgID(),
loginRequest.getUser(),
loginRequest.getRoleID(),
loginRequest.getWarehouseID(),
loginRequest.getLang(),
loginRequest.getPass(),
req.getRemoteAddr());
CompiereService l_cs = null;
if (csMap.containsKey(key)) {
l_cs = csMap.get(key);
if (l_cs != null) {
if (l_cs.isExpired()) {
l_cs = null;
} else {
Properties cachedCtx = ctxMap.get(key);
Env.getCtx().putAll(cachedCtx);
}
}
}
return l_cs;
}
private static String getKey(
int aD_Client_ID,
int aD_Org_ID,
String userName,
int aD_Role_ID,
int m_Warehouse_ID,
String locale,
String password,
String iPAddress) {
StringBuilder key = new StringBuilder()
.append(aD_Client_ID).append("|")
.append(aD_Org_ID).append("|")
.append(userName).append("|")
.append(aD_Role_ID).append("|")
.append(m_Warehouse_ID).append("|")
.append(locale).append("|")
.append(password).append("|")
.append(iPAddress);
return key.toString();
}
private boolean isExpired() {
boolean expired =
(
(getExpiryMinutes() <= 0)
|| (m_lastAuthorizationTime + (getExpiryMinutes() * 60000) <= System.currentTimeMillis())
);
if (m_connected && expired)
{
Env.logout();
ServerContext.dispose();
m_loggedin = false;
m_connected = false;
}
return expired;
}
}

View File

@ -85,6 +85,16 @@ public class AbstractService {
protected String login(ADLoginRequest loginRequest, String webService, String method, String serviceType) {
CompiereService m_cs = getCompiereService();
if (m_cs.getUserName() == null) {
HttpServletRequest req = getHttpServletRequest();
// search for a non-expired CompiereService with same login data
CompiereService cachedCs = CompiereService.get(req, loginRequest);
if (cachedCs != null) {
m_cs = cachedCs;
req.setAttribute(COMPIERE_SERVICE, cachedCs);
return authenticate(webService, method, serviceType, cachedCs); // already logged with same data
}
}
if (m_cs.isLoggedIn() && m_cs.getAD_Client_ID() == loginRequest.getClientID() && loginRequest.getClientID() == Env.getAD_Client_ID(Env.getCtx())
&& m_cs.getAD_Org_ID() == loginRequest.getOrgID() && m_cs.getAD_Role_ID() == loginRequest.getRoleID()
@ -99,6 +109,9 @@ public class AbstractService {
KeyNamePair[] clients = login.getClients(loginRequest.getUser(), loginRequest.getPass());
if (clients == null)
return "Error login - User invalid";
m_cs.setPassword(loginRequest.getPass());
m_cs.setExpiryMinutes(loginRequest.getStage());
m_cs.setIPAddress(getHttpServletRequest().getRemoteAddr());
boolean okclient = false;
KeyNamePair selectedClient = null;
@ -249,6 +262,8 @@ public class AbstractService {
if(ret!=null && ret.length()>0)
return ret;
m_cs.refreshLastAuthorizationTime();
return null;
}

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project activeEnvironment="Default" name="iDempiereWebServices" resourceRoot="" soapui-version="4.5.1" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="ModelADServiceSoapBinding" type="wsdl" bindingName="{http://idempiere.org/ADInterface/1_0}ModelADServiceSoapBinding" 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 name="ModelADService" targetNamespace="http://idempiere.org/ADInterface/1_0" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://idempiere.org/ADInterface/1_0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<con:soapui-project activeEnvironment="Default" name="iDempiereWebServices" resourceRoot="" soapui-version="5.2.0" id="c74e8d3a-4667-448a-b934-57e47e02b513" abortOnError="false" runType="SEQUENTIAL" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="ModelADServiceSoapBinding" type="wsdl" bindingName="{http://idempiere.org/ADInterface/1_0}ModelADServiceSoapBinding" soapVersion="1_1" anonymous="optional" definition="https://localhost:8443/ADInterface/services/ModelADService?wsdl" id="636ca04b-14ca-4f21-a33f-d6db380eb889" 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 name="ModelADService" targetNamespace="http://idempiere.org/ADInterface/1_0" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://idempiere.org/ADInterface/1_0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://idempiere.org/ADInterface/1_0">
<xsd:element name="WindowTabData" type="tns:WindowTabData"/>
@ -461,7 +461,7 @@
<soap: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="createData" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Create BP GlobalQSS (GW Working)"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
</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="createData" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="b1a8aa17-872b-480c-82c5-b7eb52461448"><con:settings/><con:call name="Sample Create BP GlobalQSS (GW Working)" id="79a381a1-28bd-4b82-bff4-0e11ca9ec485"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:createData>
@ -473,7 +473,7 @@
<_0:Action>Create</_0:Action>
<_0:DataRow>
<_0:field column="Value">
<_0:val>GlobalQSS</_0:val>
<_0:val>GlobalQSS3</_0:val>
</_0:field>
<_0:field column="Name">
<_0:val>Quality Systems &amp; Solutions</_0:val>
@ -511,7 +511,7 @@
</_0:ModelCRUDRequest>
</_0:createData>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/createData"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="createUpdateData" bindingOperationName="createUpdateData" type="Request-Response" outputName="createUpdateDataResponse" inputName="createUpdateData" receivesAttachments="false" sendsAttachments="false"><con:settings/></con:operation><con:operation isOneWay="false" action="" name="deleteData" bindingOperationName="deleteData" type="Request-Response" outputName="deleteDataResponse" inputName="deleteData" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Delete BP TreeFarm (must fail)"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
</soapenv:Envelope>]]></con:request><con:credentials><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/createData"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="createUpdateData" bindingOperationName="createUpdateData" type="Request-Response" outputName="createUpdateDataResponse" inputName="createUpdateData" receivesAttachments="false" sendsAttachments="false" id="74f22761-09da-4e08-a6d7-07895193a4b4"><con:settings/></con:operation><con:operation isOneWay="false" action="" name="deleteData" bindingOperationName="deleteData" type="Request-Response" outputName="deleteDataResponse" inputName="deleteData" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="260aa155-2bd4-49ca-b090-9ee544ae3448"><con:settings/><con:call name="Sample Delete BP TreeFarm (must fail)" id="ae9dfb1d-829f-4aa8-b7c1-1e456e1febdf"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:deleteData>
@ -535,7 +535,7 @@
</_0:ModelCRUDRequest>
</_0:deleteData>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/deleteData"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="getList" bindingOperationName="getList" type="Request-Response" outputName="getListResponse" inputName="getList" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Get List Sales Region"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/deleteData"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="getList" bindingOperationName="getList" type="Request-Response" outputName="getListResponse" inputName="getList" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="114ae40e-bd46-43f7-ba67-90d8ce910a09"><con:settings/><con:call name="Sample Get List Sales Region" id="fb1227c9-40ec-40df-a69a-7303b6ef060c"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:getList>
@ -558,7 +558,7 @@
</_0:ModelGetListRequest>
</_0:getList>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/getList"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="queryData" bindingOperationName="queryData" type="Request-Response" outputName="queryDataResponse" inputName="queryData" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample get BP Standard &lt; S"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/getList"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="queryData" bindingOperationName="queryData" type="Request-Response" outputName="queryDataResponse" inputName="queryData" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="89241412-dbae-4e50-900f-1bbf15a2cdc1"><con:settings/><con:call name="Sample get BP Standard &lt; S" id="86238272-82d6-4633-abf7-3331fe49924f"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:queryData>
@ -587,7 +587,7 @@
</_0:ModelCRUDRequest>
</_0:queryData>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/queryData"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="readData" bindingOperationName="readData" type="Request-Response" outputName="readDataResponse" inputName="readData" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Read TreeFarm"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/queryData"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="readData" bindingOperationName="readData" type="Request-Response" outputName="readDataResponse" inputName="readData" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="cf8588aa-2f6a-403a-bf4e-d25366e6ceaf"><con:settings/><con:call name="Sample Read TreeFarm" id="bc8c007f-6a26-4e27-9ccb-72f1e71ac020"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:readData>
@ -611,7 +611,7 @@
</_0:ModelCRUDRequest>
</_0:readData>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/readData"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="runProcess" bindingOperationName="runProcess" type="Request-Response" outputName="runProcessResponse" inputName="runProcess" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Run Storage Detail"><con:description>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. </con:description><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/readData"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="runProcess" bindingOperationName="runProcess" type="Request-Response" outputName="runProcessResponse" inputName="runProcess" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="c2828880-9129-4974-a3d9-011669bf30a4"><con:settings/><con:call name="Run Storage Detail" id="74fe3335-0fd2-4dc0-89e6-d36c42f84cc2"><con:description>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. </con:description><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:runProcess>
@ -637,7 +637,7 @@
</_0:ModelRunProcessRequest>
</_0:runProcess>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/runProcess"/><con:wsrmConfig version="1.2"/></con:call><con:call name="Sample Process Invoice (GW Working)"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/runProcess"/><con:wsrmConfig version="1.2"/></con:call><con:call name="Sample Process Invoice (GW Working)" id="12dd32a2-b4e1-4e35-ae3c-3b8d30a8afcc"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:runProcess>
@ -658,7 +658,7 @@
</_0:ModelRunProcessRequest>
</_0:runProcess>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/runProcess"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="setDocAction" bindingOperationName="setDocAction" type="Request-Response" outputName="setDocActionResponse" inputName="setDocAction" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Complete Order"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/runProcess"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="setDocAction" bindingOperationName="setDocAction" type="Request-Response" outputName="setDocActionResponse" inputName="setDocAction" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="f8129fb1-59dd-4e74-92ff-5533874f0ce9"><con:settings/><con:call name="Sample Complete Order" id="8533047e-0377-4554-b16d-12bdd921a3c0"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:setDocAction>
@ -682,7 +682,7 @@
</_0:ModelSetDocActionRequest>
</_0:setDocAction>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/setDocAction"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="updateData" bindingOperationName="updateData" type="Request-Response" outputName="updateDataResponse" inputName="updateData" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Sample Update TreeFarm URL"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/setDocAction"/><con:wsrmConfig version="1.2"/></con:call></con:operation><con:operation isOneWay="false" action="" name="updateData" bindingOperationName="updateData" type="Request-Response" outputName="updateDataResponse" inputName="updateData" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="92fe010b-2d30-4570-ab35-d98712b65de6"><con:settings/><con:call name="Sample Update TreeFarm URL" id="f11f6c58-a293-4eb5-ba04-55f6f3d035fd"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></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:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:updateData>
@ -711,4 +711,4 @@
</_0:ModelCRUDRequest>
</_0:updateData>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/updateData"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/></con:soapui-project>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/ModelADService/updateData"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/><con:oAuth2ProfileContainer/><con:sensitiveInformation/></con:soapui-project>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project name="idempiere-composite2" soapui-version="4.5.1" activeEnvironment="Default" abortOnError="false" runType="SEQUENTIAL" resourceRoot="" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="compositeInterfaceSoapBinding" type="wsdl" bindingName="{http://idempiere.org/ADInterface/1_0}compositeInterfaceSoapBinding" soapVersion="1_1" anonymous="optional" definition="https://localhost:8443/ADInterface/services/compositeInterface?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="https://localhost:8443/ADInterface/services/compositeInterface?wsdl"><con:part><con:url>https://localhost:8443/ADInterface/services/compositeInterface?wsdl</con:url><con:content><![CDATA[<wsdl:definitions name="compositeInterface" targetNamespace="http://idempiere.org/ADInterface/1_0" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://idempiere.org/ADInterface/1_0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<con:soapui-project name="idempiere-composite2" soapui-version="5.2.0" activeEnvironment="Default" abortOnError="false" runType="SEQUENTIAL" resourceRoot="" id="deb80e74-01a5-45f8-bcca-3c8252c7e825" xmlns:con="http://eviware.com/soapui/config"><con:settings/><con:interface xsi:type="con:WsdlInterface" wsaVersion="NONE" name="compositeInterfaceSoapBinding" type="wsdl" bindingName="{http://idempiere.org/ADInterface/1_0}compositeInterfaceSoapBinding" soapVersion="1_1" anonymous="optional" definition="https://localhost:8443/ADInterface/services/compositeInterface?wsdl" id="5ac83ca8-1291-4121-8e1e-1ec034faf398" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="https://localhost:8443/ADInterface/services/compositeInterface?wsdl"><con:part><con:url>https://localhost:8443/ADInterface/services/compositeInterface?wsdl</con:url><con:content><![CDATA[<wsdl:definitions name="compositeInterface" targetNamespace="http://idempiere.org/ADInterface/1_0" xmlns:ns1="http://schemas.xmlsoap.org/soap/http" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://idempiere.org/ADInterface/1_0" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://idempiere.org/ADInterface/1_0">
<xsd:element name="WindowTabData" type="tns:WindowTabData"/>
@ -385,7 +385,7 @@
<soap:address location="https://localhost:8443/ADInterface/services/compositeInterface"/>
</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/compositeInterface</con:endpoint></con:endpoints><con:operation isOneWay="false" action="" name="compositeOperation" bindingOperationName="compositeOperation" type="Request-Response" outputName="compositeOperationResponse" inputName="compositeOperation" receivesAttachments="false" sendsAttachments="false" anonymous="optional"><con:settings/><con:call name="Request 1"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/compositeInterface</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:_0="http://idempiere.org/ADInterface/1_0">
</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/compositeInterface</con:endpoint></con:endpoints><con:operation isOneWay="false" action="" name="compositeOperation" bindingOperationName="compositeOperation" type="Request-Response" outputName="compositeOperationResponse" inputName="compositeOperation" receivesAttachments="false" sendsAttachments="false" anonymous="optional" id="5755b491-d433-47cf-ba9d-90387bd55ca0"><con:settings/><con:call name="Request 1" id="d95190b9-1d24-4da0-86b2-1a87a68776f4"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/compositeInterface</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:compositeOperation>
@ -648,4 +648,23 @@
</_0:CompositeRequest>
</_0:compositeOperation>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/CompositeService/compositeOperation"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/></con:soapui-project>
</soapenv:Envelope>]]></con:request><con:credentials><con:selectedAuthProfile>Basic</con:selectedAuthProfile><con:addedBasicAuthenticationTypes>Basic</con:addedBasicAuthenticationTypes><con:authType>Global HTTP Settings</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/CompositeService/compositeOperation"/><con:wsrmConfig version="1.2"/></con:call><con:call id="1c61f633-bef6-4bcd-b42d-024e77daa14e" name="OnlyLogin"><con:settings><con:setting id="com.eviware.soapui.impl.wsdl.WsdlRequest@request-headers">&lt;xml-fragment/></con:setting></con:settings><con:encoding>UTF-8</con:encoding><con:endpoint>https://localhost:8443/ADInterface/services/compositeInterface</con:endpoint><con:request><![CDATA[<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:_0="http://idempiere.org/ADInterface/1_0">
<soapenv:Header/>
<soapenv:Body>
<_0:compositeOperation>
<_0:CompositeRequest>
<_0:serviceType>TestLogin</_0:serviceType>
<_0:ADLoginRequest>
<_0:user>WebServicex</_0:user>
<_0:pass>WebService</_0:pass>
<_0:lang>en_US</_0:lang>
<_0:ClientID>11</_0:ClientID>
<_0:RoleID>50004</_0:RoleID>
<_0:OrgID>11</_0:OrgID>
<_0:WarehouseID>103</_0:WarehouseID>
<_0:stage>9</_0:stage>
</_0:ADLoginRequest>
</_0:CompositeRequest>
</_0:compositeOperation>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><con:credentials><con:authType>No Authorization</con:authType></con:credentials><con:jmsConfig JMSDeliveryMode="PERSISTENT"/><con:jmsPropertyConfig/><con:wsaConfig mustUnderstand="NONE" version="200508" action="http://idempiere.org/ADInterface/1_0/CompositeService/compositeOperation"/><con:wsrmConfig version="1.2"/></con:call></con:operation></con:interface><con:properties/><con:wssContainer/><con:oAuth2ProfileContainer/></con:soapui-project>