IDEMPIERE-460 Cleaning code

This commit is contained in:
Deepak Pansheriya 2012-12-19 22:06:49 +05:30
parent 095aa76714
commit dfee18776a
16 changed files with 671 additions and 1874 deletions

View File

@ -12,7 +12,7 @@
</jaxws:dataBinding>
</jaxws:endpoint>
<jaxws:endpoint id="compositeInterface" address="/compositeInterface" implementor="com.bizidium.ws.CompositeServiceImpl" >
<jaxws:endpoint id="compositeInterface" address="/compositeInterface" implementor="com.trekglobal.ws.CompositeServiceImpl" >
<jaxws:dataBinding>
<bean class="org.apache.cxf.xmlbeans.XmlBeansDataBinding" >
</bean>

View File

@ -1,29 +1,29 @@
How to add a new WebService in 3E_WebServices
How to add a new WebService in idempiere 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:
* ADLoginRequest - it's already defined in WEB-INF/xsd/idempiere-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
Note, if you need to define new datatypes you need to define them in WEB-INF/xsd/idempiere-schema.xsd
and generate the idempiere-xmlbeans.jar again with this command:
scomp -out ./WEB-INF/lib/idempiere-xmlbeans.jar ./WEB-INF/xsd/idempiere-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
public StandardResponseDocument modelSetDocAction(String tableName, int recordID, String newDocStatus, ADLoginRequestDocument reqlogin);
at the interface WEB-INF/src/org/idempiere/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
WEB-INF/src/org/idempiere/adinterface/ADServiceImpl.java
And add the new method and define the corresponding logic within.

View File

@ -1,42 +0,0 @@
== 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>

View File

@ -1,4 +1,4 @@
package com.bizidium.ws;
package com.trekglobal.ws;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;

View File

@ -11,7 +11,7 @@
* with this program; if not, write to the Free Software Foundation, Inc., *
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
*****************************************************************************/
package com.bizidium.ws;
package com.trekglobal.ws;
import java.util.ArrayList;
import java.util.Properties;
@ -52,7 +52,7 @@ import org.idempiere.webservices.AbstractService;
* @author Deepak Pansheriya
*
*/
@WebService(endpointInterface = "com.bizidium.ws.CompositeService", serviceName = "compositeInterface" ,targetNamespace="http://idempiere.org/ADInterface/1_0")
@WebService(endpointInterface = "com.trekglobal.ws.CompositeService", serviceName = "compositeInterface" ,targetNamespace="http://idempiere.org/ADInterface/1_0")
public class CompositeServiceImpl extends AbstractService implements CompositeService {
private static CLogger log = CLogger.getCLogger(CompositeServiceImpl.class);

View File

@ -1,87 +0,0 @@
package org.idempiere.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)
{
StringBuilder sb = new StringBuilder();
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> ";
}
}

View File

@ -1,16 +0,0 @@
package org.idempiere.adinterface;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import org.idempiere.adInterface.x10.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();
}

View File

@ -1,26 +1,9 @@
package org.idempiere.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 org.idempiere.adInterface.x10.DataField;
import org.idempiere.adInterface.x10.DataRow;
import org.idempiere.adInterface.x10.DataSet;
import org.idempiere.adInterface.x10.LookupValue;
import org.idempiere.adInterface.x10.LookupValues;
@ -31,469 +14,11 @@ import org.idempiere.adInterface.x10.LookupValues;
* 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( org.idempiere.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(), null );
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!=null ? info.getSQLCount() : "";
PreparedStatement pstmt = DB.prepareStatement(finalSQL, null);
if (info!=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�em 1 rekord wi�c szukam dla bez join. W kliencie zostanie automatycznie uzupe�niona warto�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�em wi�cej ni� 1 rekord wi�c szukam dla whereClause i z joinami. W kliencie zostanie wy�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 ...
*/
@SuppressWarnings("unused")
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, null);
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, null);
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 )
{
@ -521,8 +46,5 @@ public class ADLookup {
}
}
}
}

View File

@ -121,14 +121,10 @@ public class CompiereService {
// 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);
@ -149,48 +145,6 @@ public class CompiereService {
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

View File

@ -20,7 +20,6 @@ public class CompiereUtil {
{
if (s_initOK)
{
//log.info(context.getServletContextName());
return true;
}
@ -44,7 +43,6 @@ public class CompiereUtil {
return false;
// Logging now initiated
//log.info(info.toString());
//
Properties ctx = new Properties();
@ -53,11 +51,6 @@ public class CompiereUtil {
@SuppressWarnings("unused")
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;
}

View File

@ -1,312 +0,0 @@
package org.idempiere.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 org.idempiere.adInterface.x10.DataField;
import org.idempiere.adInterface.x10.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
StringBuilder where = new StringBuilder();
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 ?");
StringBuilder sql = new StringBuilder();
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)
{
StringBuilder sql = new StringBuilder ("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();
StringBuilder sql = new StringBuilder (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();
StringBuilder sql = new StringBuilder (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;
}
}

View File

@ -1,473 +0,0 @@
package org.idempiere.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 org.idempiere.adInterface.x10.DataField;
import org.idempiere.adInterface.x10.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
StringBuilder where = new StringBuilder();
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() {
StringBuilder where = new StringBuilder();
// 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)
{
StringBuilder sql = new StringBuilder ("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();
StringBuilder sql = new StringBuilder (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();
StringBuilder sql = new StringBuilder (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
}

View File

@ -1,143 +0,0 @@
/******************************************************************************
* 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 org.idempiere.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

View File

@ -2,8 +2,6 @@ package org.idempiere.adinterface;
import java.io.ByteArrayOutputStream;
import java.io.CharArrayWriter;
import java.io.File;
import java.io.IOException;
import java.math.BigDecimal;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
@ -16,7 +14,6 @@ import java.util.logging.Level;
import net.sf.compilo.report.ReportProcessor;
import net.sf.jasperreports.engine.JasperPrint;
import org.compiere.model.GridField;
import org.compiere.model.GridTab;
import org.compiere.model.Lookup;
import org.compiere.model.MAllocationHdr;
@ -48,7 +45,6 @@ import org.compiere.util.NamePair;
import org.compiere.util.Trx;
import org.compiere.wf.MWFProcess;
import org.compiere.wf.MWorkflow;
import org.idempiere.adInterface.x10.DataField;
import org.idempiere.adInterface.x10.DataRow;
import org.idempiere.adInterface.x10.GetProcessParamsDocument;
@ -334,7 +330,7 @@ public class Process {
ReportEngine re=null;
if (!jasperreport)
re = start(pi);
//ReportEngine.get(m_cs.getM_ctx(), pi);
if (re == null && !jasperreport)
{
//b<EFBFBD><EFBFBD>d: "Nie uda<64>o si<73> uruchomi<6D> silnika raport<72>w (ReportEngine)",
@ -344,19 +340,14 @@ public class Process {
try
{
boolean ok = false;
File file;
String file_type = "pdf";
if (!jasperreport)
{
//file = File.createTempFile("WProcess", ".pdf");
//ok = re.createPDF(file);
MPrintFormat pf = re.getPrintFormat();
if (pf.isTableBased())
{
CharArrayWriter wr = new CharArrayWriter();
//file = File.createTempFile("WProcess", ".xls");
ok = ReportEngineEx.createEXCEL_HTML_wr( re, m_cs.getM_ctx(), wr, false, re.getPrintFormat().getLanguage() );
//ok = re.createXML( file );
file_type ="xls";
String data = wr.toString();
if (data!=null)
@ -818,7 +809,6 @@ public class Process {
*/
static public ReportEngine startFinReport (ProcessInfo pi)
{
int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx());
// Create Query from Parameters
String TableName = pi.getAD_Process_ID() == 202 ? "T_Report" : "T_ReportStatement";
@ -1042,48 +1032,6 @@ public class Process {
}
/*private static void ProcessDocAction(GridField field, int record_id, WWindowStatus ws)
throws IOException
{
//select sel = new select();
LookupValues lvs = LookupValues.Factory.newInstance(); //sel.setName("SetDocAction");
renderDocActionOptions(lvs, ws.curTab);
//frm.addElement(new input("hidden", "action", "DocAction"));
//center.addElement( WebUtil.createClosePopupButton() );
}*/
public void doPost() throws IOException {
String column_name = "";//WebUtil.getParameter(request, "ColumnName");
String action = "";//WebUtil.getParameter(request, "action");
WWindowStatus ws = null; //WWindowStatus.get(request);
String DA = ""; //WebUtil.getParameter(request, "SetDocAction");
ws.curTab.setValue("DocAction", DA);
if (ws.curTab.needSave(true, false)) //slain - nie wyrzucaj bledu, jesli nie musiales zapisac
//if (! cmd_save(ws))
{
//doc.addWindowCenter(false).addElement("B<EFBFBD><EFBFBD>d zapisu..." );
//return;
}
GridField f = ws.curTab.getField( column_name );
int process_id = f.getAD_Process_ID();
int record_id = ws.curTab.getRecord_ID();
String qs =
"AD_Process_ID="+Integer.toString(process_id) +"&"+
"AD_Record_ID="+Integer.toString(record_id);
//RequestDispatcher disp = this.getServletContext().getRequestDispatcher("/WProcess?runas=get&"+qs);
//disp.forward(request, response);
return;
} // doPost

View File

@ -1,205 +0,0 @@
package org.idempiere.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 static class AD_WrongTabException extends Exception
{
/**
*
*/
private static final long serialVersionUID = -8949499217396844364L;
public AD_WrongTabException( String msg ) {
super(msg);
}
}
public static WWindowStatus get (Map<Integer,WWindowStatus> 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

View File

@ -0,0 +1,658 @@
<?xml version="1.0" encoding="UTF-8"?>
<con:soapui-project name="idempiere-composite2" soapui-version="3.5.1" 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="http://localhost:9191/ADInterface/services/compositeInterface?wsdl" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><con:settings/><con:definitionCache type="TEXT" rootPart="http://localhost:9191/ADInterface/services/compositeInterface?wsdl"><con:part><con:url>http://localhost:9191/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"/>
<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 minOccurs="0" name="Error" type="xsd:string"/>
<xsd:element minOccurs="0" name="Summary" type="xsd:string"/>
<xsd:element minOccurs="0" name="LogInfo" type="xsd:string"/>
<xsd:element minOccurs="0" name="Data" type="xsd:hexBinary"/>
<xsd:element minOccurs="0" name="outputFields" type="tns:outputFields"/>
<xsd:element minOccurs="0" name="RunProcessResponse" type="tns:RunProcessResponse"/>
<xsd:element minOccurs="0" name="WindowTabData" type="tns:WindowTabData"/>
</xsd:sequence>
<xsd:attribute name="IsError" type="xsd:boolean"/>
<xsd:attribute name="IsRolledBack" type="xsd:boolean"/>
<xsd:attribute name="RecordID" type="xsd:int"/>
<xsd:attribute name="ReportFormat" type="xsd:string" use="optional"/>
</xsd:complexType>
<xsd:complexType name="outputFields">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" name="outputField" type="tns:outputField"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="outputField">
<xsd:attribute name="column" type="xsd:string"/>
<xsd:attribute name="value" type="xsd:string"/>
<xsd:attribute name="Text" type="xsd:string"/>
</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 minOccurs="0" name="recordIDVariable" type="xsd:string"/>
<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 minOccurs="0" name="recordIDVariable" type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" 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:enumeration value="CreateUpdate"/>
</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:complexType name="operations">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="operation" type="tns:operation"/>
</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 value="readData"/>
<xsd:enumeration value="updateData"/>
<xsd:enumeration value="deleteData"/>
<xsd:enumeration value="runProcess"/>
<xsd:enumeration value="setDocAction"/>
<xsd:enumeration value="createUpdateData"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element minOccurs="0" name="ModelCRUD" type="tns:ModelCRUD"/>
<xsd:element minOccurs="0" name="ModelSetDocAction" type="tns:ModelSetDocAction"/>
<xsd:element minOccurs="0" name="ModelRunProcess" type="tns:ModelRunProcess"/>
</xsd:sequence>
<xsd:attribute default="false" name="preCommit" type="xsd:boolean"/>
<xsd:attribute default="false" name="postCommit" type="xsd:boolean"/>
</xsd:complexType>
<xsd:element name="CompositeRequest" type="tns:CompositeRequest"/>
<xsd:complexType name="CompositeRequest">
<xsd:sequence>
<xsd:element name="ADLoginRequest" type="tns:ADLoginRequest"/>
<xsd:element name="serviceType" type="xsd:string"/>
<xsd:element maxOccurs="unbounded" name="operations" type="tns:operations"/>
</xsd:sequence>
</xsd:complexType>
<xsd:element name="CompositeResponses" type="tns:CompositeResponses"/>
<xsd:complexType name="CompositeResponses">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="CompositeResponse" type="tns:CompositeResponse"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="CompositeResponse">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="1" name="StandardResponse" type="tns:StandardResponse"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="compositeOperationResponse">
<wsdl:part element="tns:CompositeResponses" name="return"></wsdl:part>
</wsdl:message>
<wsdl:message name="compositeOperation">
<wsdl:part element="tns:CompositeRequest" name="arg0"></wsdl:part>
</wsdl:message>
<wsdl:portType name="CompositeService">
<wsdl:operation name="compositeOperation">
<wsdl:input message="tns:compositeOperation" name="compositeOperation"></wsdl:input>
<wsdl:output message="tns:compositeOperationResponse" name="compositeOperationResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="compositeInterfaceSoapBinding" type="tns:CompositeService">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="compositeOperation">
<soap:operation soapAction="" style="rpc"/>
<wsdl:input name="compositeOperation">
<soap:body namespace="http://idempiere.org/ADInterface/1_0" use="literal"/>
</wsdl:input>
<wsdl:output name="compositeOperationResponse">
<soap:body namespace="http://idempiere.org/ADInterface/1_0" use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="compositeInterface">
<wsdl:port binding="tns:compositeInterfaceSoapBinding" name="CompositeServiceImplPort">
<soap:address location="http://localhost:9191/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>http://localhost:9191/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>http://localhost:9191/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:ADLoginRequest>
<_0:user>WebService</_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:serviceType>SyncOrder</_0:serviceType>
<_0:operations>
<_0:operation preCommit="false" postCommit="false">
<_0:TargetPort>createUpdateData</_0:TargetPort>
<_0:ModelCRUD>
<_0:serviceType>CreateBPartner</_0:serviceType>
<_0:TableName>C_BPartner</_0:TableName>
<_0:RecordID>0</_0:RecordID>
<_0:Action>CreateUpdate</_0:Action>
<_0:DataRow>
<_0:field column="Name">
<_0:val>Trek Global</_0:val>
</_0:field>
<_0:field column="email">
<_0:val>dpansheriya@trekglobal.com</_0:val>
</_0:field>
<_0:field column="TaxID">
<_0:val>830.085.359-4</_0:val>
</_0:field>
<_0:field column="IsVendor">
<_0:val>Y</_0:val>
</_0:field>
<_0:field column="IsCustomer">
<_0:val>N</_0:val>
</_0:field>
<_0:field column="IsTaxExempt">
<_0:val>N</_0:val>
</_0:field>
<_0:field column="C_BP_Group_ID">
<_0:val>104</_0:val>
</_0:field>
</_0:DataRow>
</_0:ModelCRUD>
</_0:operation>
<_0:operation preCommit="false" postCommit="false">
<_0:TargetPort>createUpdateData</_0:TargetPort>
<_0:ModelCRUD>
<_0:serviceType>CreateUpdateUser</_0:serviceType>
<_0:TableName>AD_User</_0:TableName>
<_0:RecordID>0</_0:RecordID>
<_0:Action>CreateUpdate</_0:Action>
<_0:DataRow>
<_0:field column="Name">
<_0:val>Deepak Pansheriya</_0:val>
</_0:field>
<_0:field column="EMail">
<_0:val>dpansheriya@trekglobal.com</_0:val>
</_0:field>
<_0:field column="C_BPartner_ID">
<_0:val>@C_BPartner.C_BPartner_ID</_0:val>
</_0:field>
<_0:field column="Phone">
<_0:val>9228785734</_0:val>
</_0:field>
</_0:DataRow>
</_0:ModelCRUD>
</_0:operation>
<_0:operation preCommit="false" postCommit="false">
<_0:TargetPort>createUpdateData</_0:TargetPort>
<_0:ModelCRUD>
<_0:serviceType>CreateUpdateLocation1</_0:serviceType>
<_0:TableName>C_Location</_0:TableName>
<_0:RecordID>0</_0:RecordID>
<_0:Action>CreateUpdate</_0:Action>
<_0:DataRow>
<_0:field column="C_Country_ID" lval="United States"/>
<_0:field column="Address1">
<_0:val>1625 Cowboy Chaps Place</_0:val>
</_0:field>
<_0:field column="Address2">
<_0:val></_0:val>
</_0:field>
<_0:field column="C_Region_ID" lval="NV"/>
<_0:field column="RegionName">
<_0:val>NV</_0:val>
</_0:field>
<_0:field column="Postal">
<_0:val>89002</_0:val>
</_0:field>
<_0:field column="City">
<_0:val>Henderson</_0:val>
</_0:field>
</_0:DataRow>
</_0:ModelCRUD>
</_0:operation>
<_0:operation preCommit="false" postCommit="false">
<_0:TargetPort>createUpdateData</_0:TargetPort>
<_0:ModelCRUD>
<_0:serviceType>CreateUpdateBPLocation</_0:serviceType>
<_0:TableName>C_BPartner_Location</_0:TableName>
<_0:RecordID>0</_0:RecordID>
<_0:Action>CreateUpdate</_0:Action>
<_0:DataRow>
<_0:field column="C_BPartner_ID">
<_0:val>@C_BPartner.C_BPartner_ID</_0:val>
</_0:field>
<_0:field column="C_Location_ID">
<_0:val>@C_Location.C_Location_ID</_0:val>
</_0:field>
<_0:field column="IsShipTo">
<_0:val>True</_0:val>
</_0:field>
<_0:field column="IsBillTo">
<_0:val>True</_0:val>
</_0:field>
</_0:DataRow>
</_0:ModelCRUD>
</_0:operation>
<_0:operation preCommit="false" postCommit="false">
<_0:TargetPort>createUpdateData</_0:TargetPort>
<_0:ModelCRUD>
<_0:serviceType>CreateUpdateUser</_0:serviceType>
<_0:TableName>AD_User</_0:TableName>
<_0:RecordID>0</_0:RecordID>
<_0:Action>CreateUpdate</_0:Action>
<_0:DataRow>
<_0:field column="EMail">
<_0:val>dpansheriya@trekglobal.com</_0:val>
</_0:field>
<_0:field column="C_BPartner_ID">
<_0:val>@C_BPartner.C_BPartner_ID</_0:val>
</_0:field>
<_0:field column="C_BPartner_Location_ID">
<_0:val>@C_BPartner_Location.C_BPartner_Location_ID</_0:val>
</_0:field>
</_0:DataRow>
</_0:ModelCRUD>
</_0:operation>
<_0:operation preCommit="false" postCommit="false">
<_0:TargetPort>createUpdateData</_0:TargetPort>
<_0:ModelCRUD>
<_0:serviceType>createOrderRecord</_0:serviceType>
<_0:TableName>C_Order</_0:TableName>
<_0:RecordID>0</_0:RecordID>
<_0:Action>CreateUpdate</_0:Action>
<_0:DataRow>
<_0:field column="M_Warehouse_ID">
<_0:val>50001</_0:val>
</_0:field>
<_0:field column="DocumentNo">
<_0:val>DEEPTEST03</_0:val>
</_0:field>
<_0:field column="AD_User_ID">
<_0:val>@AD_User.AD_User_ID</_0:val>
</_0:field>
<_0:field column="C_BPartner_ID">
<_0:val>@C_BPartner.C_BPartner_ID</_0:val>
</_0:field>
<_0:field column="C_BPartner_Location_ID">
<_0:val>@C_BPartner_Location.C_BPartner_Location_ID</_0:val>
</_0:field>
<_0:field column="Bill_BPartner_ID">
<_0:val>@C_BPartner.C_BPartner_ID</_0:val>
</_0:field>
<_0:field column="Bill_Location_ID">
<_0:val>@C_BPartner_Location.C_BPartner_Location_ID</_0:val>
</_0:field>
<_0:field column="C_DocTypeTarget_ID">
<_0:val>132</_0:val>
</_0:field>
<_0:field column="FreightCostRule" lval="Freight included"/>
<_0:field column="FreightAmt">
<_0:val>6</_0:val>
</_0:field>
</_0:DataRow>
</_0:ModelCRUD>
</_0:operation>
<_0:operation preCommit="true" postCommit="false">
<_0:TargetPort>createUpdateData</_0:TargetPort>
<_0:ModelCRUD>
<_0:serviceType>CreateOrderLine</_0:serviceType>
<_0:TableName>C_OrderLine</_0:TableName>
<_0:RecordID>0</_0:RecordID>
<_0:Action>CreateUpdate</_0:Action>
<_0:DataRow>
<_0:field column="AD_Org_ID">
<_0:val>11</_0:val>
</_0:field>
<_0:field column="AD_Client_ID">
<_0:val>11</_0:val>
</_0:field>
<_0:field column="C_Order_ID">
<_0:val>@C_Order.C_Order_ID</_0:val>
</_0:field>
<_0:field column="M_Product_ID">
<_0:val>140</_0:val>
</_0:field>
<_0:field column="QtyEntered">
<_0:val>1</_0:val>
</_0:field>
<_0:field column="QtyOrdered">
<_0:val>1</_0:val>
</_0:field>
<_0:field column="Line">
<_0:val>10</_0:val>
</_0:field>
<_0:field column="PriceEntered">
<_0:val>12</_0:val>
</_0:field>
<_0:field column="PriceActual">
<_0:val>13</_0:val>
</_0:field>
</_0:DataRow>
</_0:ModelCRUD>
</_0:operation>
<_0:operation preCommit="false" postCommit="false">
<_0:TargetPort>createUpdateData</_0:TargetPort>
<_0:ModelCRUD>
<_0:serviceType>CreateOrderLine</_0:serviceType>
<_0:TableName>C_OrderLine</_0:TableName>
<_0:RecordID>0</_0:RecordID>
<_0:Action>CreateUpdate</_0:Action>
<_0:DataRow>
<_0:field column="C_Order_ID">
<_0:val>@C_Order.C_Order_ID</_0:val>
</_0:field>
<_0:field column="M_Product_ID">
<_0:val>123</_0:val>
</_0:field>
<_0:field column="QtyEntered">
<_0:val>2</_0:val>
</_0:field>
<_0:field column="QtyOrdered">
<_0:val>2</_0:val>
</_0:field>
<_0:field column="Line">
<_0:val>10</_0:val>
</_0:field>
<_0:field column="PriceEntered">
<_0:val>14</_0:val>
</_0:field>
<_0:field column="PriceActual">
<_0:val>15</_0:val>
</_0:field>
</_0:DataRow>
</_0:ModelCRUD>
</_0:operation>
<_0:operation preCommit="true" postCommit="true">
<_0:TargetPort>setDocAction</_0:TargetPort>
<_0:ModelSetDocAction>
<_0:serviceType>CompleteOrder</_0:serviceType>
<_0:tableName>C_Order</_0:tableName>
<_0:recordID>0</_0:recordID>
<_0:recordIDVariable>@C_Order.C_Order_ID</_0:recordIDVariable>
<_0:docAction>CO</_0:docAction>
</_0:ModelSetDocAction>
</_0:operation>
</_0:operations>
</_0:CompositeRequest>
</_0:compositeOperation>
</soapenv:Body>
</soapenv:Envelope>]]></con:request><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>