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.builder
Class XFormURLEncodedBuilder

    java.lang.Object
      org.apache.axis2.builder.XFormURLEncodedBuilder

All Implemented Interfaces:
  Builder

    public class XFormURLEncodedBuilder

extends java.lang.Object
implements Builder

Constructor Summary
`XFormURLEncodedBuilder()`

Method Summary
`protected void` | `extractParametersFromRequest(MultipleEntryHashMap parameterMap, java.lang.String query, java.lang.String queryParamSeparator, java.lang.String charsetEncoding, java.io.InputStream inputStream)`
`protected java.lang.String` | `extractParametersUsingHttpLocation(java.lang.String templatedPath, MultipleEntryHashMap parameterMap, java.lang.String requestURL, java.lang.String queryParameterSeparator)` Here is what I will try to do here.
`org.apache.axiom.om.OMElement` | `processDocument(java.io.InputStream inputStream, java.lang.String contentType, MessageContext messageContext)` Process a message.

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

Constructor Detail

### XFormURLEncodedBuilder

    public XFormURLEncodedBuilder()

Method Detail

### processDocument

    public org.apache.axiom.om.OMElement processDocument(java.io.InputStream inputStream,
                                                         java.lang.String contentType,
                                                         MessageContext messageContext)
                                                  throws AxisFault

  Description copied from interface: `Builder`
  Process a message.

  The raw content of the message is provided as an input stream. It is the responsibility of the caller (typically a transport implementation) to close the stream after the message has been processed (more precisely after the SOAP infoset returned by this method is no longer used). This implies that implementations are not required to consume the input stream during the execution of this method. This enables deferred parsing of the message.

  Specified by:
    `processDocument` in interface `Builder`
  Parameters:
    `inputStream` - the byte stream with the raw payload
  Returns:
    Returns the document element.
  Throws:
    `AxisFault`

### extractParametersFromRequest

    protected void extractParametersFromRequest(MultipleEntryHashMap parameterMap,
                                                java.lang.String query,
                                                java.lang.String queryParamSeparator,
                                                java.lang.String charsetEncoding,
                                                java.io.InputStream inputStream)
                                         throws AxisFault

  Throws:
    `AxisFault`

### extractParametersUsingHttpLocation

    protected java.lang.String extractParametersUsingHttpLocation(java.lang.String templatedPath,
                                                                  MultipleEntryHashMap parameterMap,
                                                                  java.lang.String requestURL,
                                                                  java.lang.String queryParameterSeparator)
                                                           throws AxisFault,
                                                                  java.io.UnsupportedEncodingException

  Here is what I will try to do here. I will first try to identify the location of the first template element in the request URI. I am trying to deduce the location of that location using the httpLocation element of the binding (it is passed in to this method). If there is a contant part in the httpLocation, then I will identify it. For this, I get the index of {, from httpLocation param, and whatever to the left of it is the contant part. Then I search for this constant part inside the url. This will give us the access to the first template parameter. To find the end of this parameter, we need to get the index of the next constant, from httpLocation attribute. Likewise we keep on discovering parameters.

  Assumptions : 1. User will always append the value of httpLocation to the address given in the endpoint. 2. I was talking about the constants in the httpLocation. Those constants will not occur, to a reasonable extend, before the constant we are looking for.

  Parameters:
    `templatedPath` -
    `parameterMap` -
  Throws:
    `AxisFault`
    `java.io.UnsupportedEncodingException`

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.