public VuiBeanResponse doLosQueryService(Request request, Response response) { VuiBeanResponse losResponse = new VuiBeanResponse(); try { System.out.println("OnePointServlet : doLOSQuery : Enters"); RequestObject req = ObjectTransformer.convert(request.queryString(), RequestObject.class); String resp = new IntradoService().doLos(req); ResObject queryResponse = unmarshall(resp); losResponse = queryResponse.getPayload().getLosResponse(); if (null == losResponse || null == losResponse.getLevelOfService()) { String message = queryResponse.getPayload().getErrorResponse().getMessage(); System.out.println("Message ---> :" + message); losResponse = new VuiBeanResponse(); losResponse.setMessage(message); } System.out.println("OnePointServlet : doLOSQuery : Exits"); } catch (Exception e) { e.printStackTrace(); } return losResponse; }
public VuiBeanResponse doInsertOrDel(Request request, Response response, String action) { VuiBeanResponse updateResponse = new VuiBeanResponse(); try { System.out.println("OnePointServlet : doInsert : Enters"); RequestObject req = ObjectTransformer.convert(request.queryString(), RequestObject.class); String resp = new IntradoService().doInsertOrDel(req, action); ResObject queryResponse = unmarshall(resp); updateResponse = queryResponse.getPayload().getUpdateResponse(); System.out.println("OnePointServlet : doInsert : Exits"); } catch (Exception e) { e.printStackTrace(); } return updateResponse; }
public VuiBeanResponse doQueryService(Request request, Response response) { VuiBeanResponse queryDataResponse = new VuiBeanResponse(); System.out.println("doQueryService : Enters"); try { String stCPN = request.queryParams("CPN"); String stExternalKey = request.queryParams("ExternalKey"); String resp = new IntradoService().queryData(stCPN, stExternalKey); ResObject queryResponse = unmarshall(resp); queryDataResponse = queryResponse.getPayload().getQueryResponse(); System.out.println("OnePointServlet : doQueryService : Exits"); } catch (Exception e) { e.printStackTrace(); } return queryDataResponse; }