Here you can find the source of printMessage(SOAPMessageContext smc)
Parameter | Description |
---|---|
smc | a parameter |
public static void printMessage(SOAPMessageContext smc)
//package com.java2s; import javax.xml.soap.SOAPException; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPMessageContext; import java.io.IOException; public class Main { /**/* w w w . j a v a2 s .c o m*/ * Prints the SOAP Message on the console * * @param smc */ public static void printMessage(SOAPMessageContext smc) { try { System.out.println("*********Message Start********"); System.out.println( "This is a " + (((Boolean) smc.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY)).booleanValue() ? "Outbound request" : "Inbound response")); // Print out the outbound SOAP message to System.out smc.getMessage().writeTo(System.out); System.out.println("*********Message End**********"); } catch (SOAPException e) { e.printStackTrace(); throw new RuntimeException(e); } catch (IOException e) { e.printStackTrace(); throw new RuntimeException(e); } } }