@Autowired public HolidayEndpoint(HumanResourceService humanResourceService){ this.humanResourceService = humanResourceService; Namespace namespace = Namespace.getNamespace("hr", NAMESPACE_URI); XPathFactory xPathFactory = XPathFactory.instance(); startDateExpression =xPathFactory.compile("//hr:StartDate", Filters.element(), null,namespace); endDateExpression = xPathFactory.compile("//hr:EndDate", Filters.element(), null,namespace); nameExpression = xPathFactory.compile( "concat(//hr:FirstName,' ',//hr:LastName)", Filters.fstring(), null,namespace); }