cmd.setString(3, Utility.getHostName()); cmd.setString(4, Utility.getHostName()); cmd.setObject(5, Utility.EN(new String("<body>helloworld</body>")).getBytes(Constants.CHARSET)); cmd.setObject(6, Utility.EN(new String("<body>helloworld response</body>")).getBytes(Constants.CHARSET)); cmd.setString(7, System.getenv("USERNAME")); cmd.setString(8, id); cmd.setString(18, UUID.randomUUID().toString()); cmd.setString(19, UUID.randomUUID().toString()); cmd.setObject(20, Utility.EN(new String("SOAPAction: something")).getBytes(Constants.CHARSET)); cmd.setObject(21, Utility.EN(new String("Response 200 OK")).getBytes(Constants.CHARSET)); cmd.execute();
/** * serializes the request to a string, encrypts it, then stores it to disk */ protected static void StorePersist(AddMoreData req) { if (req == null || req.getReq() == null || req.getReq().isEmpty()) { return; } Init(); for (int i = 0; i < req.getReq().size(); i++) { JAXBContext jc = null; try { jc = JAXBContext.newInstance(AddDataRequestMsg.class, AddDataRequestMsg.class, AddMoreData.class, AddData.class, String.class, Duration.class, Long.class, SecurityWrapper.class, ClassificationType.class, List.class, org.miloss.fgsms.services.interfaces.common.Header.class); Marshaller m = jc.createMarshaller(); StringWriter sw = new StringWriter(); m.marshal( (req.getReq().get(i)), sw); String s = sw.toString(); s = Utility.EN(s); WriteAllText(cfg.offlinestorage + File.separator + UUID.randomUUID().toString(), s); } catch (Exception ex) { log.log(Level.WARN, "Unable to marshall or store to disk service performance record", ex); } } }
com.setNull(8, java.sql.Types.BINARY); } else { byte[] x = Utility.EN((req.getXmlRequest()).trim()).getBytes(Constants.CHARSET);// Encoding.UTF8.GetBytes(req.getXmlRequest()); ByteArrayInputStream s = new ByteArrayInputStream(x); com.setBinaryStream(8, s, (int) x.length); com.setNull(9, java.sql.Types.BINARY); } else { byte[] x = Utility.EN((req.getXmlResponse()).trim()).getBytes(Constants.CHARSET);// Encoding.UTF8.GetBytes(req.getXmlRequest()); ByteArrayInputStream s = new ByteArrayInputStream(x); com.setBinaryStream(9, s, (int) x.length); String d2 = Utility.EN(data.toString()); com.setObject(18, (d2).getBytes(Constants.CHARSET)); String d2 = Utility.EN(data.toString()); com.setObject(19, (d2).getBytes(Constants.CHARSET));