public byte[] getBytes(MessageContext messageContext, OMOutputFormat format) throws AxisFault { return getBytes(messageContext, format, false); }
public DeferredMessageBuilder() { // first initialize with the default builders builders.put("multipart/related", new MIMEBuilder()); builders.put("application/soap+xml", new SOAPBuilder()); builders.put("text/xml", new SOAPBuilder()); builders.put("application/xop+xml", new MTOMBuilder()); builders.put("application/xml", new ApplicationXMLBuilder()); builders.put("application/x-www-form-urlencoded", new XFormURLEncodedBuilder()); // initialize the default formatters formatters.put("application/x-www-form-urlencoded", new XFormURLEncodedFormatter()); formatters.put("multipart/form-data", new MultipartFormDataFormatter()); formatters.put("application/xml", new ApplicationXMLFormatter()); formatters.put("text/xml", new SOAPMessageFormatter()); formatters.put("application/soap+xml", new SOAPMessageFormatter()); }
public String getContentType(MessageContext messageContext, OMOutputFormat format, String soapAction) { String encoding = format.getCharSetEncoding(); String contentType; contentType = (String) messageContext.getProperty(Constants.Configuration.CONTENT_TYPE); if (log.isDebugEnabled()) { log.debug("contentType set from messageContext =" + contentType); log.debug("(NOTE) contentType from format is=" + format.getContentType()); } if (contentType == null) { contentType = HTTPConstants.MEDIA_TYPE_APPLICATION_XML; } else if (isSOAPContentType(contentType)) { contentType = HTTPConstants.MEDIA_TYPE_APPLICATION_XML; if (log.isDebugEnabled()) { log.debug("contentType is set incorrectly for Application XML."); log.debug("It is changed to " + contentType); } } if (encoding != null) { contentType += "; charset=" + encoding; } if (log.isDebugEnabled()) { log.debug("contentType returned =" + contentType); } return contentType; }
return new XFormURLEncodedFormatter(); return new ApplicationXMLFormatter(); } else {
public String getContentType(MessageContext messageContext, OMOutputFormat format, String soapAction) { String encoding = format.getCharSetEncoding(); String contentType; contentType = (String) messageContext.getProperty(Constants.Configuration.CONTENT_TYPE); if (log.isDebugEnabled()) { log.debug("contentType set from messageContext =" + contentType); log.debug("(NOTE) contentType from format is=" + format.getContentType()); } if (contentType == null) { contentType = HTTPConstants.MEDIA_TYPE_APPLICATION_XML; } else if (isSOAPContentType(contentType)) { contentType = HTTPConstants.MEDIA_TYPE_APPLICATION_XML; if (log.isDebugEnabled()) { log.debug("contentType is set incorrectly for Application XML."); log.debug("It is changed to " + contentType); } } if (encoding != null) { contentType += "; charset=" + encoding; } if (log.isDebugEnabled()) { log.debug("contentType returned =" + contentType); } return contentType; }
return new XFormURLEncodedFormatter(); return new ApplicationXMLFormatter(); } else {