Examples of newInputStream()


Examples of com.sun.xml.internal.messaging.saaj.util.ByteOutputStream.newInputStream()

                ByteOutputStream baos = new ByteOutputStream(in.available());
                baos.write(in);
                baos.writeTo(os);
                // reset the inputstream so that we can support a
                //getAttachment later
                in = baos.newInputStream();
            }

            // this will endup writing the end boundary
        } else {
        // put out last boundary
View Full Code Here

Examples of com.sun.xml.internal.ws.util.ByteArrayBuffer.newInputStream()

        try {
            writeTo(bab);
        } catch (IOException e) {
            throw new WebServiceException(e);
        }
        return bab.newInputStream();
    }

    public void writeTo(OutputStream os) throws IOException {
        try {
            bridge.marshal(jaxbObject, os, null);
View Full Code Here

Examples of com.sun.xml.internal.ws.util.ByteArrayBuffer.newInputStream()

                            try {
                                doc.writeTo(null, resolver, bab);
                            } catch (IOException ioe) {
                                throw new WebServiceException(ioe);
                            }
                            return bab.newInputStream();
                        }

                        public void setByteStream(InputStream byteStream) {
                            throw new UnsupportedOperationException();
                        }
View Full Code Here

Examples of com.sun.xml.internal.ws.util.ByteArrayBuffer.newInputStream()

                p.getMessage().getAttachments();
                codec.getStaticContentType(p);

                ByteArrayBuffer bos = new ByteArrayBuffer();
                ContentType ct = codec.encode(p, bos);
                return XMLMessage.createDataSource(ct.getContentType(), bos.newInputStream());
            } else if (!isFastInfoset && useFastInfoset) {
                // Convert from XML to Fast Infoset
                Codec codec = new XMLHTTPBindingCodec(binding);
                Packet p = new Packet();
                codec.decode(in.getInputStream(), in.getContentType(), p);
View Full Code Here

Examples of com.sun.xml.internal.ws.util.ByteArrayBuffer.newInputStream()

                p.getMessage().getAttachments();
                codec.getStaticContentType(p);

                ByteArrayBuffer bos = new ByteArrayBuffer();
                com.sun.xml.internal.ws.api.pipe.ContentType ct = codec.encode(p, bos);
                return XMLMessage.createDataSource(ct.getContentType(), bos.newInputStream());
            }
        } catch(Exception ex) {
            throw new WebServiceException(ex);
        }
View Full Code Here

Examples of com.sun.xml.internal.ws.util.ByteArrayBuffer.newInputStream()

                final ByteArrayBuffer bos = new ByteArrayBuffer();
                try {
                    Codec codec = new XMLHTTPBindingCodec(binding);
                    com.sun.xml.internal.ws.api.pipe.ContentType ct = codec.getStaticContentType(new Packet(msg));
                    codec.encode(new Packet(msg), bos);
                    return createDataSource(ct.getContentType(), bos.newInputStream());
                } catch(IOException ioe) {
                    throw new WebServiceException(ioe);
                }

            } else {
View Full Code Here

Examples of com.sun.xml.internal.ws.util.ByteArrayBuffer.newInputStream()

                    msg.writePayloadTo(writer);
                    writer.flush();
                } catch (XMLStreamException e) {
                    throw new WebServiceException(e);
                }
                return XMLMessage.createDataSource("text/xml", bos.newInputStream());
            }
        }
    }

    public static DataSource createDataSource(final String contentType, final InputStream is) {
View Full Code Here

Examples of com.sun.xml.internal.ws.util.ByteArrayBuffer.newInputStream()

            throw new WebServiceException(ioe);
        }

        // Convert infoset to DOM
        Transformer trans = XmlUtil.newTransformer();
        Source source = new StreamSource(bab.newInputStream(), null); //doc.getURL().toExternalForm());
        DOMResult result = new DOMResult();
        try {
            trans.transform(source, result);
        } catch(TransformerException te) {
            throw new WebServiceException(te);
View Full Code Here

Examples of com.sun.xml.messaging.saaj.util.ByteOutputStream.newInputStream()

                ByteOutputStream baos = new ByteOutputStream(in.available());
                baos.write(in);
                baos.writeTo(os);
                // reset the inputstream so that we can support a
                //getAttachment later
                in = baos.newInputStream();
            }
    
            // this will endup writing the end boundary
        } else {
        // put out last boundary
View Full Code Here

Examples of com.sun.xml.messaging.saaj.util.ByteOutputStream.newInputStream()

                ByteOutputStream baos = new ByteOutputStream(in.available());
                baos.write(in);
                baos.writeTo(os);
                // reset the inputstream so that we can support a
                //getAttachment later
                in = baos.newInputStream();
            }
    
            // this will endup writing the end boundary
        } else {
        // put out last boundary
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.