Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.axis2.transport.http
Class ApplicationXMLFormatter

    java.lang.Object
      org.apache.axis2.transport.http.ApplicationXMLFormatter

All Implemented Interfaces:
  MessageFormatter

    public class ApplicationXMLFormatter

extends Object
implements MessageFormatter

Formates the request message as application/xml

Constructor Summary
`ApplicationXMLFormatter()`

Method Summary
`String` | `formatSOAPAction(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction)`
`byte[]` | `getBytes(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format)`
`byte[]` | `getBytes(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, boolean preserve)` Get the bytes for this message
`String` | `getContentType(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, String soapAction)` Different message formats can set their own content types Eg: JSONFormatter can set the content type as application/json
`URL` | `getTargetAddress(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, URL targetURL)` Some message formats may want to alter the target url.
`void` | `writeTo(MessageContext messageContext, org.apache.axiom.om.OMOutputFormat format, OutputStream outputStream, boolean preserve)` To support deffered writing transports as in http chunking..

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ApplicationXMLFormatter

    public ApplicationXMLFormatter()

Method Detail

### getBytes

    public byte[] getBytes(MessageContext messageContext,
                           org.apache.axiom.om.OMOutputFormat format)
                    throws AxisFault

  Specified by:
    `getBytes` in interface `MessageFormatter`
  Returns:
    a byte array of the message formatted according to the given message format.
  Throws:
    `AxisFault`

### getBytes

    public byte[] getBytes(MessageContext messageContext,
                           org.apache.axiom.om.OMOutputFormat format,
                           boolean preserve)
                    throws AxisFault

  Get the bytes for this message

  Parameters:
    `messageContext` -
    `format` -
    `preserve` - (indicates if the OM should be preserved or consumed)
  Returns:
  Throws:
    `AxisFault`

### writeTo

    public void writeTo(MessageContext messageContext,
                        org.apache.axiom.om.OMOutputFormat format,
                        OutputStream outputStream,
                        boolean preserve)
                 throws AxisFault

  Description copied from interface: `MessageFormatter`
  To support deffered writing transports as in http chunking.. Axis2 was doing this for some time..

  Preserve flag can be used to preserve the envelope for later use. This is usefull when implementing authentication machnisms like NTLM.

  Specified by:
    `writeTo` in interface `MessageFormatter`
    `preserve` - : do not consume the OM when this is set..
  Throws:
    `AxisFault`

### getContentType

    public String getContentType(MessageContext messageContext,
                                 org.apache.axiom.om.OMOutputFormat format,
                                 String soapAction)

  Description copied from interface: `MessageFormatter`
  Different message formats can set their own content types Eg: JSONFormatter can set the content type as application/json

  Specified by:
    `getContentType` in interface `MessageFormatter`

### getTargetAddress

    public URL getTargetAddress(MessageContext messageContext,
                                org.apache.axiom.om.OMOutputFormat format,
                                URL targetURL)
                         throws AxisFault

  Description copied from interface: `MessageFormatter`
  Some message formats may want to alter the target url.

  Specified by:
    `getTargetAddress` in interface `MessageFormatter`
  Returns:
    the target URL
  Throws:
    `AxisFault`

### formatSOAPAction

    public String formatSOAPAction(MessageContext messageContext,
                                   org.apache.axiom.om.OMOutputFormat format,
                                   String soapAction)

  Specified by:
    `formatSOAPAction` in interface `MessageFormatter`
  Returns:
    this only if you want set a transport header for SOAP Action

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.