Package org.codehaus.xfire.attachments

Examples of org.codehaus.xfire.attachments.SimpleAttachment


    {
        byte[] data = (byte[]) object;
       
        ByteDataSource source = new ByteDataSource(data);
        source.setContentType(getContentType(object, null));
        SimpleAttachment att = new SimpleAttachment(id, new DataHandler(source));
        att.setXOP(true);
       
        return att;
    }
View Full Code Here


    protected Attachment createAttachment(Object object, String id)
    {
        DataSource source = (DataSource) object;
       
        DataHandler handler = new DataHandler(source);
        SimpleAttachment att = new SimpleAttachment(id, handler);
        att.setXOP(true);
        return att;
    }
View Full Code Here

            }
           
            source = new OutMessageDataSource(context, message);
            DataHandler soapHandler = new DataHandler(source);
            atts.setSoapContentType(HttpChannel.getSoapMimeType(message, false));
            atts.setSoapMessage(new SimpleAttachment(source.getName(), soapHandler));
           
            postMethod.setRequestHeader("Content-Type", atts.getContentType());
        }
        else
        {
View Full Code Here

                }
               
                OutMessageDataSource source = new OutMessageDataSource(context, message);
                DataHandler soapHandler = new DataHandler(source);
                atts.setSoapContentType(HttpChannel.getSoapMimeType(message, false));
                atts.setSoapMessage(new SimpleAttachment(source.getName(), soapHandler));
   
                response.setContentType(atts.getContentType());
               
                out = new BufferedOutputStream(response.getOutputStream());
                atts.write(out);
View Full Code Here

TOP

Related Classes of org.codehaus.xfire.attachments.SimpleAttachment

Copyright © 2018 www.massapicom. 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.