public OutMessageDataSource(MessageContext context2, OutMessage message) throws XFireException { this.context = context2; this.msg = message; is = createInputStream(); }
public String getContentType() { String encoding = msg.getEncoding(); if (encoding == null) encoding = "UTF-8"; StringBuffer ct = new StringBuffer(); ct.append("application/xop+xml; charset=") .append(encoding) .append("; type=\"") .append(getSoapContentType()) .append("\""); return ct.toString(); }
OutMessageDataSource source = new OutMessageDataSource(context, message); DataHandler soapHandler = new DataHandler(source); atts.setSoapContentType(HttpChannel.getSoapMimeType(message, false)); atts.setSoapMessage(new SimpleAttachment(source.getName(), soapHandler)); atts.write(out); source.dispose();
source = new OutMessageDataSource(context, message); DataHandler soapHandler = new DataHandler(source); atts.setSoapContentType(HttpChannel.getSoapMimeType(message, false)); atts.setSoapMessage(new SimpleAttachment(source.getName(), soapHandler));
public void close() throws XFireException { if (msgIs != null) { try { msgIs.close(); } catch (IOException e) { throw new XFireException("Could not close connection.", e); } } if (source != null) { source.dispose(); } if (postMethod != null) postMethod.releaseConnection(); }