public
String getMessage(){
SOAPMessage message = messageFactory.createMessage();(line1)
............................some more code.....
//Save the message
message.saveChanges();(line 2)
message.writeTo(System.out);(line 3)
return String;}(line 4)
It prints the
soap message to the console from line 3. I want the whole soap message as String as my function should return a String on line 4 which should be the whole soap message.