com.flat502.rox.server
Class XmlRpcRequestUnmarshaller

java.lang.Object
  extended by com.flat502.rox.server.HttpRequestUnmarshaller
      extended by com.flat502.rox.server.XmlRpcRequestUnmarshaller

public class XmlRpcRequestUnmarshaller
extends HttpRequestUnmarshaller


Constructor Summary
XmlRpcRequestUnmarshaller(MethodCallUnmarshaller unmarshaller)
           
 
Method Summary
protected  java.lang.String getContentType()
           
 RpcCall unmarshal(HttpRequestBuffer request, MethodCallUnmarshallerAid aid)
           
protected  void validateRequest(HttpRequestBuffer httpReq)
          Validate an XML-RPC HTTP request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlRpcRequestUnmarshaller

public XmlRpcRequestUnmarshaller(MethodCallUnmarshaller unmarshaller)
Method Detail

unmarshal

public RpcCall unmarshal(HttpRequestBuffer request,
                         MethodCallUnmarshallerAid aid)
                  throws java.lang.Exception
Specified by:
unmarshal in class HttpRequestUnmarshaller
Throws:
java.lang.Exception

validateRequest

protected void validateRequest(HttpRequestBuffer httpReq)
                        throws HttpBufferException
Validate an XML-RPC HTTP request.

This implementation checks for the following cases:

Parameters:
httpReq - The complete HTTP message to validate.
Throws:
MethodNotAllowedException - if the HTTP method is anything other than POST.
MissingHeaderException - if Content-Length, Content-Type or Host is missing.
InvalidHeaderException - if Content-Type is not the value returned by getContentType() or if another header contains an invalid value.
HttpBufferException - Implementations may throw other exceptions if implementation-specific validation fails.

getContentType

protected java.lang.String getContentType()
Returns:
The value text/xml.