Java SOAP Message toByteArray(SOAPMessage soapMessage)

Here you can find the source of toByteArray(SOAPMessage soapMessage)

Description

to Byte Array

License

Apache License

Declaration

public static byte[] toByteArray(SOAPMessage soapMessage)
            throws Exception 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import javax.xml.soap.SOAPMessage;

import java.io.ByteArrayOutputStream;

public class Main {
    public static byte[] toByteArray(SOAPMessage soapMessage)
            throws Exception {
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        soapMessage.writeTo(bos);/*w  w w .  j a  v a  2  s  .co m*/
        return bos.toByteArray();
    }
}

Related

  1. printMessage(SOAPMessageContext smc)
  2. printSoapFaultException(SOAPFaultException sfe)
  3. printSOAPMessage(SOAPMessage msg, String titol)
  4. printTree(NodeList childNodes, String padding, ByteArrayOutputStream byteArrayOS)
  5. saveMimeHeaders(SOAPMessage msg, String fileName)
  6. toPrettyString(SOAPMessage response)
  7. toSOAPMessage(String msgString)
  8. toSOAPPart(String xml)
  9. toSOAPPart(String xml)