异步返回WebService时在本地输出XML,用以备份
private static void writeToSoapBodyFile(String fileName, CIAsset ciAsset)throws JAXBException, IOException {File dir = new File(soapBody);if (!dir.exists()) {dir.mkdirs();}JAXBContext ctx = JAXBContext.newInstance(CIAsset.class);Marshaller m = ctx.createMarshaller();m.setProperty("jaxb.formatted.output", true);File file = new File(soapBody + fileName);OutputStream os = new FileOutputStream(file);m.marshal(ciAsset, os);os.flush();os.close();}