|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.muse.core.proxy.AbstractProxyHandler
org.apache.muse.core.proxy.ReflectionProxyHandler
public class ReflectionProxyHandler
ReflectionProxyHandler is a generic implementation of ProxyHandler that can be applied to any web service operation. It uses reflection to determine what types are being sent to/from the operation and then invokes the Serializers that have been registered with Muse to do the XML/POJO transformations. If a type is used that is not included in Muse's set of built-in Serializers, you must register a Serializer for that type in order to take advantage of this class.
Serializer
Constructor Summary | |
---|---|
ReflectionProxyHandler()
|
Method Summary | |
---|---|
protected Object |
deserialize(Element xml,
Class theClass)
Deserializes the given DOM Element using the Serializer registered for the given type. |
Object |
fromXML(Element xml)
Deserializes the given DOM Element into a POJO that can be returned to the invoker of the web service operation. |
protected Element |
serialize(Object obj,
QName qname)
Serializes the given object using the Serializer registered for the object's type. |
Element |
toXML(Object[] parameters)
Serializes the given objects into a DOM Element that can used in a request SOAP Body. |
Methods inherited from class org.apache.muse.core.proxy.AbstractProxyHandler |
---|
getAction, getRequestName, getRequestParameterNames, getRequestParameterSchemaTypes, getRequestParameterTypes, getResponseName, getReturnSchemaType, getReturnType, setAction, setRequestName, setRequestParameterNames, setRequestParameterSchemaTypes, setRequestParameterTypes, setResponseName, setReturnSchemaType, setReturnType |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectionProxyHandler()
Method Detail |
---|
protected Object deserialize(Element xml, Class theClass) throws SoapFault
xml
- theClass
-
SoapFault
- public Object fromXML(Element xml) throws SoapFault
ProxyHandler
xml
- The contents of the response SOAP Body, where the root element
contains either a simple value or a single child element that
defines a complex type. Multiple return values will not be
parsed - they must be part of a single data structure.
SoapFault
- ProxyHandler.getReturnType()
,
Serializer.fromXML(Element)
protected Element serialize(Object obj, QName qname) throws SoapFault
obj
- The object to transform into XML.qname
- The name of the root Element returned by this method.
SoapFault
- public Element toXML(Object[] parameters) throws SoapFault
ProxyHandler
parameters
- The parameters for the operation, which must be serialized
into XML.
SoapFault
- ProxyHandler.getRequestName()
,
ProxyHandler.getRequestParameterNames()
,
Serializer.toXML(Object, QName)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |