Created
November 21, 2016 10:04
-
-
Save Khunpisit/f423b243d08233e89424ccd641af668b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String getStringMessage(MessageContext context){ | |
String res = null; | |
try { | |
SOAPMessageContext ctx = (SOAPMessageContext) context; | |
ByteArrayOutputStream stream = new ByteArrayOutputStream(); | |
ctx.getMessage().writeTo(stream); | |
byte[] items = stream.toByteArray(); | |
res = new String(items); | |
} | |
catch(Exception e){ | |
// nothing - just ensuring the method will not throw an exception in case something is wrong. | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment