public static SOAPMessage formartSoapString(String soapString) { MessageFactory msgFactory; try { msgFactory = MessageFactory.newInstance(); SOAPMessage reqMsg = msgFactory.createMessage(new MimeHeaders(), new ByteArrayInputStream(soapString.getBytes(Charset.forName("UTF-8")))); reqMsg.saveChanges(); return reqMsg; } catch (Exception e) { logger.error(EXCEPTION_NAME, e); return null; } }
|