@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { ERPEndpoint erp = new ERPEndpoint(uri, this); erp.setName(remaining); return erp; }
public void process(Exchange exchange) throws Exception { String input = exchange.getIn().getBody(String.class); // if the verbose switch is turned on then log to System out if (getEndpoint().isVerbose()) { System.out.println("Calling ERP with: " + input); } // simulate calling ERP system and setting reply on the OUT body exchange.getOut().setBody("Simulated response from ERP"); // support propagating headers (by copying headers from IN -> OUT) exchange.getOut().setHeaders(exchange.getIn().getHeaders()); }
@Override protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) throws Exception { return new ERPEndpoint(uri, this); }
public void process(Exchange exchange) throws Exception { String input = exchange.getIn().getBody(String.class); // if the verbose switch is turned on then log to System out if (getEndpoint().isVerbose()) { System.out.println("Calling ERP with: " + input); } // simulate calling ERP system and setting reply on the OUT body exchange.getOut().setBody("Simulated response from ERP"); // support propagating headers (by copying headers from IN -> OUT) exchange.getOut().setHeaders(exchange.getIn().getHeaders()); }