Class MarshallingMethodEndpointAdapter
java.lang.Object
org.springframework.xml.transform.TransformerObjectSupport
org.springframework.ws.server.endpoint.adapter.AbstractMethodEndpointAdapter
org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,EndpointAdapter
- Direct Known Subclasses:
GenericMarshallingMethodEndpointAdapter
@Deprecated
public class MarshallingMethodEndpointAdapter
extends AbstractMethodEndpointAdapter
implements org.springframework.beans.factory.InitializingBean
Deprecated.
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.
-
Field Summary
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated.Creates a newMarshallingMethodEndpointAdapter.MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller) Deprecated.Creates a newMarshallingMethodEndpointAdapterwith the given marshaller.MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller, org.springframework.oxm.Unmarshaller unmarshaller) Deprecated.Creates a newMarshallingMethodEndpointAdapterwith the given marshaller and unmarshaller. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.org.springframework.oxm.MarshallerDeprecated.Returns the marshaller used for transforming objects into XML.org.springframework.oxm.UnmarshallerDeprecated.Returns the unmarshaller used for transforming XML into objects.protected voidinvokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) Deprecated.Use the given method endpoint to handle the request.final voidsetMarshaller(org.springframework.oxm.Marshaller marshaller) Deprecated.Sets the marshaller used for transforming objects into XML.final voidsetUnmarshaller(org.springframework.oxm.Unmarshaller unmarshaller) Deprecated.Sets the unmarshaller used for transforming XML into objects.protected booleansupportsInternal(MethodEndpoint methodEndpoint) Deprecated.Supports a method with a single, unmarshallable parameter, and that returnvoidor a marshallable type.Methods inherited from class org.springframework.ws.server.endpoint.adapter.AbstractMethodEndpointAdapter
invoke, supportsMethods inherited from class org.springframework.xml.transform.TransformerObjectSupport
createTransformer, getTransformerFactory, newTransformerFactory, setTransformerFactoryClass, transform
-
Constructor Details
-
MarshallingMethodEndpointAdapter
public MarshallingMethodEndpointAdapter()Deprecated.Creates a newMarshallingMethodEndpointAdapter. TheMarshallerandUnmarshallermust be injected using properties. -
MarshallingMethodEndpointAdapter
public MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller) Deprecated.Creates a newMarshallingMethodEndpointAdapterwith the given marshaller. If the givenMarshalleralso implements theUnmarshallerinterface, it is used for both marshalling and unmarshalling. Otherwise, an exception is thrown.Note that all
Marshallerimplementations in Spring also implement theUnmarshallerinterface, so that you can safely use this constructor.- Parameters:
marshaller- object used as marshaller and unmarshaller- Throws:
IllegalArgumentException- whenmarshallerdoes not implement theUnmarshallerinterface
-
MarshallingMethodEndpointAdapter
public MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller, org.springframework.oxm.Unmarshaller unmarshaller) Deprecated.Creates a newMarshallingMethodEndpointAdapterwith the given marshaller and unmarshaller.- Parameters:
marshaller- the marshaller to useunmarshaller- the unmarshaller to use
-
-
Method Details
-
getMarshaller
public org.springframework.oxm.Marshaller getMarshaller()Deprecated.Returns the marshaller used for transforming objects into XML. -
setMarshaller
public final void setMarshaller(org.springframework.oxm.Marshaller marshaller) Deprecated.Sets the marshaller used for transforming objects into XML. -
getUnmarshaller
public org.springframework.oxm.Unmarshaller getUnmarshaller()Deprecated.Returns the unmarshaller used for transforming XML into objects. -
setUnmarshaller
public final void setUnmarshaller(org.springframework.oxm.Unmarshaller unmarshaller) Deprecated.Sets the unmarshaller used for transforming XML into objects. -
afterPropertiesSet
Deprecated.- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
invokeInternal
protected void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint) throws Exception Deprecated.Description copied from class:AbstractMethodEndpointAdapterUse the given method endpoint to handle the request.- Specified by:
invokeInternalin classAbstractMethodEndpointAdapter- Parameters:
messageContext- the current message contextmethodEndpoint- the method endpoint to use- Throws:
Exception- in case of errors
-
supportsInternal
Deprecated.Supports a method with a single, unmarshallable parameter, and that returnvoidor a marshallable type.- Specified by:
supportsInternalin classAbstractMethodEndpointAdapter- Parameters:
methodEndpoint- method endpoint to check- Returns:
- whether or not this adapter can adapt the given method
- See Also:
-
Marshaller.supports(Class)Unmarshaller.supports(Class)
-
DefaultMethodEndpointAdapterandMarshallingPayloadMethodProcessor.