use of pl.x3E.adInterface.Location in project adempiere by adempiere.
the class ADServiceImpl method getLocation.
public LocationDocument getLocation(LocationDocument req) throws XFireFault {
authenticate(webServiceName, "getLocation");
LocationDocument ret = LocationDocument.Factory.newInstance();
Location loc = ret.addNewLocation();
MLocation location = new MLocation(m_cs.getM_ctx(), req.getLocation().getCLocationID(), null);
loc.setAddress1(location.getAddress1());
loc.setAddress2(location.getAddress2());
loc.setCity(location.getCity());
loc.setPostalCode(location.getPostal());
loc.setCCountryID(location.getC_Country_ID());
loc.setCRegionID(location.getC_Region_ID());
loc.setCountries(this.getCountry(location));
return ret;
}
use of pl.x3E.adInterface.Location 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