Search in sources :

Example 6 with StandardResponseDocument

use of pl.x3E.adInterface.StandardResponseDocument in project adempiere by adempiere.

the class ADServiceImpl method saveLocation.

public StandardResponseDocument saveLocation(LocationDocument req) throws XFireFault {
    authenticate(webServiceName, "saveLocation");
    StandardResponseDocument ret = StandardResponseDocument.Factory.newInstance();
    StandardResponse resp = ret.addNewStandardResponse();
    Location rloc = req.getLocation();
    MLocation location = new MLocation(m_cs.getM_ctx(), rloc.getCLocationID(), null);
    //log.fine("doPost updating C_Location_ID=" + C_Location_ID + " - " + targetBase);
    location.setAddress1(rloc.getAddress1());
    location.setAddress2(rloc.getAddress2());
    location.setCity(rloc.getCity());
    location.setPostal(rloc.getPostalCode());
    location.setC_Country_ID(rloc.getCCountryID());
    location.setC_Region_ID(rloc.getCRegionID());
    //  Save Location
    location.save();
    resp.setRecordID(location.getC_Location_ID());
    return ret;
}
Also used : StandardResponse(pl.x3E.adInterface.StandardResponse) MLocation(org.compiere.model.MLocation) StandardResponseDocument(pl.x3E.adInterface.StandardResponseDocument) MLocation(org.compiere.model.MLocation) Location(pl.x3E.adInterface.Location)

Aggregations

StandardResponse (pl.x3E.adInterface.StandardResponse)6 StandardResponseDocument (pl.x3E.adInterface.StandardResponseDocument)6 Properties (java.util.Properties)4 MTable (org.compiere.model.MTable)4 PO (org.compiere.model.PO)4 Trx (org.compiere.util.Trx)4 ADLoginRequest (pl.x3E.adInterface.ADLoginRequest)4 ModelCRUD (pl.x3E.adInterface.ModelCRUD)3 XFireFault (org.codehaus.xfire.fault.XFireFault)2 POInfo (org.compiere.model.POInfo)2 DataField (pl.x3E.adInterface.DataField)2 DataRow (pl.x3E.adInterface.DataRow)2 SQLException (java.sql.SQLException)1 MLocation (org.compiere.model.MLocation)1 Location (pl.x3E.adInterface.Location)1 ModelSetDocAction (pl.x3E.adInterface.ModelSetDocAction)1