org.apache.axis2.transport
Class TransportUtils

java.lang.Object
  extended byorg.apache.axis2.transport.TransportUtils

public class TransportUtils
extends java.lang.Object


Constructor Summary
TransportUtils()
           
 
Method Summary
static org.apache.axiom.soap.SOAPEnvelope createSOAPMessage(MessageContext msgContext)
           
static org.apache.axiom.soap.SOAPEnvelope createSOAPMessage(MessageContext msgContext, java.io.InputStream inStream, java.lang.String contentType)
          Objective of this method is to capture the SOAPEnvelope creation logic and make it a common for all the transports and to in/out flows.
static java.lang.String getCharSetEncoding(java.lang.String contentType)
          Extracts and returns the character set encoding from the Content-type header Example: Content-Type: text/xml; charset=utf-8
static MessageFormatter getMessageFormatter(MessageContext msgContext)
          Initial work for a builder selector which selects the builder for a given message format based on the the content type of the recieved message.
static void processContentTypeForAction(java.lang.String contentType, MessageContext msgContext)
           
static void writeMessage(MessageContext msgContext, java.io.OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransportUtils

public TransportUtils()
Method Detail

createSOAPMessage

public static org.apache.axiom.soap.SOAPEnvelope createSOAPMessage(MessageContext msgContext)
                                                            throws AxisFault
Throws:
AxisFault

createSOAPMessage

public static org.apache.axiom.soap.SOAPEnvelope createSOAPMessage(MessageContext msgContext,
                                                                   java.io.InputStream inStream,
                                                                   java.lang.String contentType)
                                                            throws AxisFault,
                                                                   org.apache.axiom.om.OMException,
                                                                   javax.xml.stream.XMLStreamException,
                                                                   javax.xml.parsers.FactoryConfigurationError
Objective of this method is to capture the SOAPEnvelope creation logic and make it a common for all the transports and to in/out flows.

Parameters:
msgContext -
inStream -
contentType -
Returns:
the SOAPEnvelope
Throws:
AxisFault
org.apache.axiom.om.OMException
javax.xml.stream.XMLStreamException
javax.xml.parsers.FactoryConfigurationError

getCharSetEncoding

public static java.lang.String getCharSetEncoding(java.lang.String contentType)
Extracts and returns the character set encoding from the Content-type header Example: Content-Type: text/xml; charset=utf-8

Parameters:
contentType -

writeMessage

public static void writeMessage(MessageContext msgContext,
                                java.io.OutputStream out)
                         throws AxisFault
Throws:
AxisFault

getMessageFormatter

public static MessageFormatter getMessageFormatter(MessageContext msgContext)
                                            throws AxisFault
Initial work for a builder selector which selects the builder for a given message format based on the the content type of the recieved message. content-type to builder mapping can be specified through the Axis2.xml.

Parameters:
msgContext -
Returns:
the builder registered against the given content-type
Throws:
AxisFault

processContentTypeForAction

public static void processContentTypeForAction(java.lang.String contentType,
                                               MessageContext msgContext)


Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.