Search in sources :

Example 1 with ByteInputStream

use of com.sun.xml.messaging.saaj.util.ByteInputStream in project Payara by payara.

the class EjbWebServiceDispatcher method createSOAPMessage.

protected SOAPMessage createSOAPMessage(HttpServletRequest request, MimeHeaders headers) throws IOException {
    InputStream is = request.getInputStream();
    byte[] bytes = readFully(is);
    int length = request.getContentLength() == -1 ? bytes.length : request.getContentLength();
    ByteInputStream in = new ByteInputStream(bytes, length);
    SOAPMessageContext msgContext = rpcFactory.createSOAPMessageContext();
    SOAPMessage message = msgContext.createMessage(headers, in);
    return message;
}
Also used : ByteInputStream(com.sun.xml.messaging.saaj.util.ByteInputStream) SOAPMessageContext(com.sun.xml.rpc.spi.runtime.SOAPMessageContext) ByteInputStream(com.sun.xml.messaging.saaj.util.ByteInputStream) InputStream(java.io.InputStream) SOAPMessage(javax.xml.soap.SOAPMessage)

Aggregations

ByteInputStream (com.sun.xml.messaging.saaj.util.ByteInputStream)1 SOAPMessageContext (com.sun.xml.rpc.spi.runtime.SOAPMessageContext)1 InputStream (java.io.InputStream)1 SOAPMessage (javax.xml.soap.SOAPMessage)1