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;
}
Aggregations