Search in sources :

Example 1 with Location

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;
}
Also used : MLocation(org.compiere.model.MLocation) LocationDocument(pl.x3E.adInterface.LocationDocument) MLocation(org.compiere.model.MLocation) Location(pl.x3E.adInterface.Location)

Example 2 with Location

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

MLocation (org.compiere.model.MLocation)2 Location (pl.x3E.adInterface.Location)2 LocationDocument (pl.x3E.adInterface.LocationDocument)1 StandardResponse (pl.x3E.adInterface.StandardResponse)1 StandardResponseDocument (pl.x3E.adInterface.StandardResponseDocument)1