Here you can find the source of printSOAPMessage(SOAPMessage msg, String titol)
public static void printSOAPMessage(SOAPMessage msg, String titol) throws SOAPException, IOException
//package com.java2s; //License from project: Open Source License import java.io.ByteArrayOutputStream; import java.io.IOException; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPMessage; public class Main { public static void printSOAPMessage(SOAPMessage msg, String titol) throws SOAPException, IOException { ByteArrayOutputStream byteArrayOS = new ByteArrayOutputStream(); msg.writeTo(byteArrayOS);/* w w w . jav a 2s.co m*/ System.out.println("*******************************"); System.out.println(titol); System.out.println("-------------------------------"); System.out.println(new String(byteArrayOS.toByteArray())); System.out.println("*******************************"); } }