|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.xml.transform.TransformerObjectSupport org.springframework.ws.server.endpoint.adapter.AbstractMethodEndpointAdapter org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter
public class MarshallingMethodEndpointAdapter
Adapter that supports endpoint methods that use marshalling. Supports methods with the following signature:
void handleMyMessage(MyUnmarshalledType request);or
MyMarshalledType handleMyMessage(MyUnmarshalledType request);I.e. methods that take a single parameter that
is supported
by the Unmarshaller
, and return either void
or a type supported
by the
Marshaller
. The method can have any name, as long as it is mapped by an EndpointMapping
.
This endpoint needs a Marshaller
and Unmarshaller
, both of which can be set using
properties.
setMarshaller(org.springframework.oxm.Marshaller)
,
setUnmarshaller(org.springframework.oxm.Unmarshaller)
Field Summary |
---|
Fields inherited from class org.springframework.ws.server.endpoint.adapter.AbstractMethodEndpointAdapter |
---|
logger |
Constructor Summary | |
---|---|
MarshallingMethodEndpointAdapter()
Creates a new MarshallingMethodEndpointAdapter . |
|
MarshallingMethodEndpointAdapter(Marshaller marshaller)
Creates a new MarshallingMethodEndpointAdapter with the given marshaller. |
|
MarshallingMethodEndpointAdapter(Marshaller marshaller,
Unmarshaller unmarshaller)
Creates a new MarshallingMethodEndpointAdapter with the given marshaller and unmarshaller. |
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
Marshaller |
getMarshaller()
Returns the marshaller used for transforming objects into XML. |
Unmarshaller |
getUnmarshaller()
Returns the unmarshaller used for transforming XML into objects. |
protected void |
invokeInternal(MessageContext messageContext,
MethodEndpoint methodEndpoint)
Use the given method endpoint to handle the request. |
void |
setMarshaller(Marshaller marshaller)
Sets the marshaller used for transforming objects into XML. |
void |
setUnmarshaller(Unmarshaller unmarshaller)
Sets the unmarshaller used for transforming XML into objects. |
protected boolean |
supportsInternal(MethodEndpoint methodEndpoint)
Supports a method with a single, unmarshallable parameter, and that return void or a marshallable
type. |
Methods inherited from class org.springframework.ws.server.endpoint.adapter.AbstractMethodEndpointAdapter |
---|
invoke, supports |
Methods inherited from class org.springframework.xml.transform.TransformerObjectSupport |
---|
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MarshallingMethodEndpointAdapter()
MarshallingMethodEndpointAdapter
. The Marshaller
and Unmarshaller
must
be injected using properties.
setMarshaller(org.springframework.oxm.Marshaller)
,
setUnmarshaller(org.springframework.oxm.Unmarshaller)
public MarshallingMethodEndpointAdapter(Marshaller marshaller)
MarshallingMethodEndpointAdapter
with the given marshaller. If the given Marshaller
also implements the Unmarshaller
interface, it is used for both marshalling and
unmarshalling. Otherwise, an exception is thrown.
Note that all Marshaller
implementations in Spring-WS also implement the Unmarshaller
interface,
so that you can safely use this constructor.
marshaller
- object used as marshaller and unmarshaller
IllegalArgumentException
- when marshaller
does not implement the Unmarshaller
interfacepublic MarshallingMethodEndpointAdapter(Marshaller marshaller, Unmarshaller unmarshaller)
MarshallingMethodEndpointAdapter
with the given marshaller and unmarshaller.
marshaller
- the marshaller to useunmarshaller
- the unmarshaller to useMethod Detail |
---|
public Marshaller getMarshaller()
public final void setMarshaller(Marshaller marshaller)
public Unmarshaller getUnmarshaller()
public final void setUnmarshaller(Unmarshaller unmarshaller)
public void afterPropertiesSet() throws Exception
afterPropertiesSet
in interface InitializingBean
Exception
protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception
AbstractMethodEndpointAdapter
invokeInternal
in class AbstractMethodEndpointAdapter
messageContext
- the current message contextmethodEndpoint
- the method endpoint to use
Exception
- in case of errorsprotected boolean supportsInternal(MethodEndpoint methodEndpoint)
void
or a marshallable
type.
supportsInternal
in class AbstractMethodEndpointAdapter
methodEndpoint
- method endpoint to check
Marshaller.supports(Class)
,
Unmarshaller.supports(Class)
|
Spring Web Services Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |