diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/CompiereService.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/CompiereService.java index 148efc89e4..d063d53945 100644 --- a/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/CompiereService.java +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/adinterface/CompiereService.java @@ -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 csMap = new HashMap(); + private static Map ctxMap = new HashMap(); private boolean m_loggedin = false; @@ -68,7 +79,7 @@ public class CompiereService { public final String dateFormatOnlyForCtx = "yyyy-MM-dd"; private boolean m_connected; - + /** * * @return AD_Client_ID of current request @@ -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; + } + } diff --git a/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/AbstractService.java b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/AbstractService.java index 413c04dcce..48685917e1 100644 --- a/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/AbstractService.java +++ b/org.idempiere.webservices/WEB-INF/src/org/idempiere/webservices/AbstractService.java @@ -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; @@ -248,7 +261,9 @@ public class AbstractService { String ret=invokeLoginValidator(null, m_cs.getCtx(), m_webservicetype, IWSValidator.TIMING_ON_AUTHORIZATION); if(ret!=null && ret.length()>0) return ret; - + + m_cs.refreshLastAuthorizationTime(); + return null; } diff --git a/org.idempiere.webservices/testScripts/iDempiereWebServices-soapui-project.xml b/org.idempiere.webservices/testScripts/iDempiereWebServices-soapui-project.xml index 820f83227c..db0ee66919 100644 --- a/org.idempiere.webservices/testScripts/iDempiereWebServices-soapui-project.xml +++ b/org.idempiere.webservices/testScripts/iDempiereWebServices-soapui-project.xml @@ -1,5 +1,5 @@ -https://localhost:8443/ADInterface/services/ModelADService?wsdl +https://localhost:8443/ADInterface/services/ModelADService?wsdl @@ -461,7 +461,7 @@ -]]>http://schemas.xmlsoap.org/wsdl/https://localhost:8443/ADInterface/services/ModelADService<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService +]]>http://schemas.xmlsoap.org/wsdl/https://localhost:8443/ADInterface/services/ModelADService<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService <_0:createData> @@ -473,7 +473,7 @@ <_0:Action>Create <_0:DataRow> <_0:field column="Value"> - <_0:val>GlobalQSS + <_0:val>GlobalQSS3 <_0:field column="Name"> <_0:val>Quality Systems & Solutions @@ -511,7 +511,7 @@ -]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService +]]>BasicBasicGlobal HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService <_0:deleteData> @@ -535,7 +535,7 @@ -]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService <_0:getList> @@ -558,7 +558,7 @@ -]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService <_0:queryData> @@ -587,7 +587,7 @@ -]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService <_0:readData> @@ -611,7 +611,7 @@ -]]>Global HTTP SettingsExample 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. <xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService +]]>Global HTTP SettingsExample 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. <xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService <_0:runProcess> @@ -637,7 +637,7 @@ -]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService <_0:runProcess> @@ -658,7 +658,7 @@ -]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService <_0:setDocAction> @@ -682,7 +682,7 @@ -]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService +]]>Global HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/ModelADService <_0:updateData> @@ -711,4 +711,4 @@ -]]>Global HTTP Settings \ No newline at end of file +]]>Global HTTP Settings \ No newline at end of file diff --git a/org.idempiere.webservices/testScripts/idempiere-composite-soapui-project.xml b/org.idempiere.webservices/testScripts/idempiere-composite-soapui-project.xml index 7f9d6cdc94..46bde3cbba 100644 --- a/org.idempiere.webservices/testScripts/idempiere-composite-soapui-project.xml +++ b/org.idempiere.webservices/testScripts/idempiere-composite-soapui-project.xml @@ -1,651 +1,670 @@ - -https://localhost:8443/ADInterface/services/compositeInterface?wsdl - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]]>http://schemas.xmlsoap.org/wsdl/https://localhost:8443/ADInterface/services/compositeInterface<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/compositeInterface - - - <_0:compositeOperation> - <_0:CompositeRequest> - <_0:ADLoginRequest> - <_0:user>WebService - <_0:pass>WebService - <_0:lang>en_US - <_0:ClientID>11 - <_0:RoleID>50004 - <_0:OrgID>11 - <_0:WarehouseID>103 - <_0:stage>9 - - <_0:serviceType>SyncOrder - <_0:operations> - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateBPartner - <_0:TableName>C_BPartner - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="Name"> - <_0:val>Trek Global - - <_0:field column="TaxID"> - <_0:val>830.085.359-4 - - <_0:field column="IsVendor"> - <_0:val>Y - - <_0:field column="IsCustomer"> - <_0:val>N - - <_0:field column="IsTaxExempt"> - <_0:val>N - - <_0:field column="C_BP_Group_ID"> - <_0:val>104 - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateUpdateUser - <_0:TableName>AD_User - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="Name"> - <_0:val>Deepak Pansheriya - - <_0:field column="EMail"> - <_0:val>dpansheriya@trekglobal.com - - <_0:field column="C_BPartner_ID"> - <_0:val>@C_BPartner.C_BPartner_ID - - <_0:field column="Phone"> - <_0:val>9228785734 - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateUpdateLocation1 - <_0:TableName>C_Location - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="C_Country_ID" lval="United States"/> - <_0:field column="Address1"> - <_0:val>1625 Cowboy Chaps Place - - <_0:field column="Address2"> - <_0:val/> - - <_0:field column="C_Region_ID" lval="NV"/> - <_0:field column="RegionName"> - <_0:val>NV - - <_0:field column="Postal"> - <_0:val>89002 - - <_0:field column="City"> - <_0:val>Henderson - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateUpdateBPLocation - <_0:TableName>C_BPartner_Location - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="C_BPartner_ID"> - <_0:val>@C_BPartner.C_BPartner_ID - - <_0:field column="C_Location_ID"> - <_0:val>@C_Location.C_Location_ID - - <_0:field column="IsShipTo"> - <_0:val>True - - <_0:field column="IsBillTo"> - <_0:val>True - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateUpdateUser - <_0:TableName>AD_User - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="EMail"> - <_0:val>dpansheriya@trekglobal.com - - <_0:field column="C_BPartner_ID"> - <_0:val>@C_BPartner.C_BPartner_ID - - <_0:field column="C_BPartner_Location_ID"> - <_0:val>@C_BPartner_Location.C_BPartner_Location_ID - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>createOrderRecord - <_0:TableName>C_Order - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="M_Warehouse_ID"> - <_0:val>50001 - - <_0:field column="DocumentNo"> - <_0:val>DEEPTEST03 - - <_0:field column="AD_User_ID"> - <_0:val>@AD_User.AD_User_ID - - <_0:field column="C_BPartner_ID"> - <_0:val>@C_BPartner.C_BPartner_ID - - <_0:field column="C_BPartner_Location_ID"> - <_0:val>@C_BPartner_Location.C_BPartner_Location_ID - - <_0:field column="Bill_BPartner_ID"> - <_0:val>@C_BPartner.C_BPartner_ID - - <_0:field column="Bill_Location_ID"> - <_0:val>@C_BPartner_Location.C_BPartner_Location_ID - - <_0:field column="C_DocTypeTarget_ID"> - <_0:val>132 - - <_0:field column="FreightCostRule" lval="Freight included"/> - <_0:field column="FreightAmt"> - <_0:val>6 - - - - - <_0:operation preCommit="true" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateOrderLine - <_0:TableName>C_OrderLine - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="AD_Org_ID"> - <_0:val>11 - - <_0:field column="AD_Client_ID"> - <_0:val>11 - - <_0:field column="C_Order_ID"> - <_0:val>@C_Order.C_Order_ID - - <_0:field column="M_Product_ID"> - <_0:val>140 - - <_0:field column="QtyEntered"> - <_0:val>1 - - <_0:field column="QtyOrdered"> - <_0:val>1 - - <_0:field column="Line"> - <_0:val>10 - - <_0:field column="PriceEntered"> - <_0:val>12 - - <_0:field column="PriceActual"> - <_0:val>13 - - - - - <_0:operation preCommit="false" postCommit="false"> - <_0:TargetPort>createUpdateData - <_0:ModelCRUD> - <_0:serviceType>CreateOrderLine - <_0:TableName>C_OrderLine - <_0:RecordID>0 - <_0:Action>CreateUpdate - <_0:DataRow> - <_0:field column="C_Order_ID"> - <_0:val>@C_Order.C_Order_ID - - <_0:field column="M_Product_ID"> - <_0:val>123 - - <_0:field column="QtyEntered"> - <_0:val>2 - - <_0:field column="QtyOrdered"> - <_0:val>2 - - <_0:field column="Line"> - <_0:val>10 - - <_0:field column="PriceEntered"> - <_0:val>14 - - <_0:field column="PriceActual"> - <_0:val>15 - - - - - <_0:operation preCommit="true" postCommit="true"> - <_0:TargetPort>setDocAction - <_0:ModelSetDocAction> - <_0:serviceType>CompleteOrder - <_0:tableName>C_Order - <_0:recordID>0 - <_0:recordIDVariable>@C_Order.C_Order_ID - <_0:docAction>CO - - - - - - -]]>Global HTTP Settings + +https://localhost:8443/ADInterface/services/compositeInterface?wsdl + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]>http://schemas.xmlsoap.org/wsdl/https://localhost:8443/ADInterface/services/compositeInterface<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/compositeInterface + + + <_0:compositeOperation> + <_0:CompositeRequest> + <_0:ADLoginRequest> + <_0:user>WebService + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + <_0:serviceType>SyncOrder + <_0:operations> + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateBPartner + <_0:TableName>C_BPartner + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="Name"> + <_0:val>Trek Global + + <_0:field column="TaxID"> + <_0:val>830.085.359-4 + + <_0:field column="IsVendor"> + <_0:val>Y + + <_0:field column="IsCustomer"> + <_0:val>N + + <_0:field column="IsTaxExempt"> + <_0:val>N + + <_0:field column="C_BP_Group_ID"> + <_0:val>104 + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateUpdateUser + <_0:TableName>AD_User + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="Name"> + <_0:val>Deepak Pansheriya + + <_0:field column="EMail"> + <_0:val>dpansheriya@trekglobal.com + + <_0:field column="C_BPartner_ID"> + <_0:val>@C_BPartner.C_BPartner_ID + + <_0:field column="Phone"> + <_0:val>9228785734 + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateUpdateLocation1 + <_0:TableName>C_Location + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="C_Country_ID" lval="United States"/> + <_0:field column="Address1"> + <_0:val>1625 Cowboy Chaps Place + + <_0:field column="Address2"> + <_0:val/> + + <_0:field column="C_Region_ID" lval="NV"/> + <_0:field column="RegionName"> + <_0:val>NV + + <_0:field column="Postal"> + <_0:val>89002 + + <_0:field column="City"> + <_0:val>Henderson + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateUpdateBPLocation + <_0:TableName>C_BPartner_Location + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="C_BPartner_ID"> + <_0:val>@C_BPartner.C_BPartner_ID + + <_0:field column="C_Location_ID"> + <_0:val>@C_Location.C_Location_ID + + <_0:field column="IsShipTo"> + <_0:val>True + + <_0:field column="IsBillTo"> + <_0:val>True + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateUpdateUser + <_0:TableName>AD_User + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="EMail"> + <_0:val>dpansheriya@trekglobal.com + + <_0:field column="C_BPartner_ID"> + <_0:val>@C_BPartner.C_BPartner_ID + + <_0:field column="C_BPartner_Location_ID"> + <_0:val>@C_BPartner_Location.C_BPartner_Location_ID + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>createOrderRecord + <_0:TableName>C_Order + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="M_Warehouse_ID"> + <_0:val>50001 + + <_0:field column="DocumentNo"> + <_0:val>DEEPTEST03 + + <_0:field column="AD_User_ID"> + <_0:val>@AD_User.AD_User_ID + + <_0:field column="C_BPartner_ID"> + <_0:val>@C_BPartner.C_BPartner_ID + + <_0:field column="C_BPartner_Location_ID"> + <_0:val>@C_BPartner_Location.C_BPartner_Location_ID + + <_0:field column="Bill_BPartner_ID"> + <_0:val>@C_BPartner.C_BPartner_ID + + <_0:field column="Bill_Location_ID"> + <_0:val>@C_BPartner_Location.C_BPartner_Location_ID + + <_0:field column="C_DocTypeTarget_ID"> + <_0:val>132 + + <_0:field column="FreightCostRule" lval="Freight included"/> + <_0:field column="FreightAmt"> + <_0:val>6 + + + + + <_0:operation preCommit="true" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateOrderLine + <_0:TableName>C_OrderLine + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="AD_Org_ID"> + <_0:val>11 + + <_0:field column="AD_Client_ID"> + <_0:val>11 + + <_0:field column="C_Order_ID"> + <_0:val>@C_Order.C_Order_ID + + <_0:field column="M_Product_ID"> + <_0:val>140 + + <_0:field column="QtyEntered"> + <_0:val>1 + + <_0:field column="QtyOrdered"> + <_0:val>1 + + <_0:field column="Line"> + <_0:val>10 + + <_0:field column="PriceEntered"> + <_0:val>12 + + <_0:field column="PriceActual"> + <_0:val>13 + + + + + <_0:operation preCommit="false" postCommit="false"> + <_0:TargetPort>createUpdateData + <_0:ModelCRUD> + <_0:serviceType>CreateOrderLine + <_0:TableName>C_OrderLine + <_0:RecordID>0 + <_0:Action>CreateUpdate + <_0:DataRow> + <_0:field column="C_Order_ID"> + <_0:val>@C_Order.C_Order_ID + + <_0:field column="M_Product_ID"> + <_0:val>123 + + <_0:field column="QtyEntered"> + <_0:val>2 + + <_0:field column="QtyOrdered"> + <_0:val>2 + + <_0:field column="Line"> + <_0:val>10 + + <_0:field column="PriceEntered"> + <_0:val>14 + + <_0:field column="PriceActual"> + <_0:val>15 + + + + + <_0:operation preCommit="true" postCommit="true"> + <_0:TargetPort>setDocAction + <_0:ModelSetDocAction> + <_0:serviceType>CompleteOrder + <_0:tableName>C_Order + <_0:recordID>0 + <_0:recordIDVariable>@C_Order.C_Order_ID + <_0:docAction>CO + + + + + + +]]>BasicBasicGlobal HTTP Settings<xml-fragment/>UTF-8https://localhost:8443/ADInterface/services/compositeInterface + + + <_0:compositeOperation> + <_0:CompositeRequest> + <_0:serviceType>TestLogin + <_0:ADLoginRequest> + <_0:user>WebServicex + <_0:pass>WebService + <_0:lang>en_US + <_0:ClientID>11 + <_0:RoleID>50004 + <_0:OrgID>11 + <_0:WarehouseID>103 + <_0:stage>9 + + + + +]]>No Authorization \ No newline at end of file