public static OMElement createDocumentElement(String contentType, Builder builder, MessageContext msgContext, InputStream inStream) throws AxisFault, XMLStreamException { OMElement documentElement = null; String type = null; if (contentType != null) { type = getContentType(contentType, msgContext); if (builder != null) { if (log.isDebugEnabled()) { log.debug("createSOAPEnvelope using Builder (" + builder.getClass() + ") selected from type (" + type +")"); } documentElement = builder.processDocument(inStream, contentType, msgContext); } } if (documentElement == null) { documentElement = createDefaultDocumentElement(msgContext, inStream, type); } return documentElement; }
public static OMElement createDocumentElement(String contentType, Builder builder, MessageContext msgContext, InputStream inStream) throws AxisFault, XMLStreamException { OMElement documentElement = null; String type = null; if (contentType != null) { type = getContentType(contentType, msgContext); if (builder != null) { if (log.isDebugEnabled()) { log.debug("createSOAPEnvelope using Builder (" + builder.getClass() + ") selected from type (" + type +")"); } documentElement = builder.processDocument(inStream, contentType, msgContext); } } if (documentElement == null) { documentElement = createDefaultDocumentElement(msgContext, inStream, type); } return documentElement; }
public static OMElement createDocumentElement(String contentType, MessageContext msgContext, InputStream inStream) throws AxisFault, XMLStreamException { OMElement documentElement = null; String type = null; if (contentType != null) { type = getContentType(contentType, msgContext); Builder builder = MessageProcessorSelector.getMessageBuilder(type, msgContext); if (builder != null) { if (log.isDebugEnabled()) { log.debug("createSOAPEnvelope using Builder (" + builder.getClass() + ") selected from type (" + type +")"); } documentElement = builder.processDocument(inStream, contentType, msgContext); } } if (documentElement == null) { documentElement = createDefaultDocumentElement(msgContext, inStream, type); } return documentElement; }
public static OMElement createDocumentElement(String contentType, MessageContext msgContext, InputStream inStream) throws AxisFault, XMLStreamException { OMElement documentElement = null; String type = null; if (contentType != null) { type = getContentType(contentType, msgContext); Builder builder = MessageProcessorSelector.getMessageBuilder(type, msgContext); if (builder != null) { if (log.isDebugEnabled()) { log.debug("createSOAPEnvelope using Builder (" + builder.getClass() + ") selected from type (" + type +")"); } documentElement = builder.processDocument(inStream, contentType, msgContext); } } if (documentElement == null) { documentElement = createDefaultDocumentElement(msgContext, inStream, type); } return documentElement; }
/** * This is is a workaround for axis2 RestUtils behaviour * Based on an internal property and the http method, we set the message type * @param originalInMsgCtx IN message * @param axisOutMsgCtx Out message */ private static void processWSDL2RESTRequestMessageType(MessageContext originalInMsgCtx, MessageContext axisOutMsgCtx) { // TODO - this is a workaround for axis2 RestUtils behaviour Object restContentType = originalInMsgCtx.getProperty(NhttpConstants.REST_REQUEST_CONTENT_TYPE); if (restContentType == null) { String httpMethod = (String) originalInMsgCtx.getProperty( Constants.Configuration.HTTP_METHOD); if (Constants.Configuration.HTTP_METHOD_GET.equals(httpMethod) || Constants.Configuration.HTTP_METHOD_DELETE.equals(httpMethod)) { restContentType = HTTPConstants.MEDIA_TYPE_X_WWW_FORM; } } if (restContentType != null && restContentType instanceof String) { String contentType = TransportUtils.getContentType((String) restContentType, originalInMsgCtx); axisOutMsgCtx.setProperty( org.apache.axis2.Constants.Configuration.MESSAGE_TYPE, contentType); originalInMsgCtx.setProperty( org.apache.axis2.Constants.Configuration.MESSAGE_TYPE, contentType); } }
soapEnvelope = TransportUtils.createSOAPEnvelope(null); msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, TransportUtils.getContentType(contentType, msgContext)); } else { try {
soapEnvelope = TransportUtils.createSOAPEnvelope(null); msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, TransportUtils.getContentType(contentType, msgContext)); } else { try {
soapEnvelope = TransportUtils.createSOAPEnvelope(null); msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, TransportUtils.getContentType(contentType, msgContext)); } else { try {
soapEnvelope = TransportUtils.createSOAPEnvelope(null); msgContext.setProperty(Constants.Configuration.MESSAGE_TYPE, TransportUtils.getContentType(contentType, msgContext)); } else { try {
String contentType = contentTypeHdr != null ? TransportUtils.getContentType(contentTypeHdr, msgContext) : null;
contentType = TransportUtils.getContentType(contentTypeHeader, msgContext);