Class AbstractMarshallingPayloadEndpoint
java.lang.Object
org.springframework.ws.server.endpoint.AbstractMarshallingPayloadEndpoint
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean,MessageEndpoint
- Direct Known Subclasses:
AbstractValidatingMarshallingPayloadEndpoint
@Deprecated
public abstract class AbstractMarshallingPayloadEndpoint
extends Object
implements MessageEndpoint, org.springframework.beans.factory.InitializingBean
Deprecated.
as of Spring Web Services 2.0, in favor of annotated endpoints
Endpoint that unmarshals the request payload, and marshals the response object. This endpoint needs a
Marshaller and Unmarshaller, both of which can be set using properties. An abstract template method
is invoked using the request object as a parameter, and allows for a response object to be returned.- Since:
- 1.0.0
- Author:
- Arjen Poutsma
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.commons.logging.LogDeprecated.Logger available to subclasses. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDeprecated.Creates a newAbstractMarshallingPayloadEndpoint.protectedAbstractMarshallingPayloadEndpoint(org.springframework.oxm.Marshaller marshaller) Deprecated.Creates a newAbstractMarshallingPayloadEndpointwith the given marshaller.protectedAbstractMarshallingPayloadEndpoint(org.springframework.oxm.Marshaller marshaller, org.springframework.oxm.Unmarshaller unmarshaller) Deprecated.Creates a newAbstractMarshallingPayloadEndpointwith the given marshaller and unmarshaller. -
Method Summary
Modifier and TypeMethodDescriptionvoidDeprecated.as of Spring Web Services 1.5:afterPropertiesSet()is no longer final, so this can safely be overridden in subclassesvoidDeprecated.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.final voidinvoke(MessageContext messageContext) Deprecated.Invokes an operation.protected abstract ObjectinvokeInternal(Object requestObject) Deprecated.Template method that subclasses must implement to process a request.protected voidonMarshalResponse(MessageContext messageContext, Object requestObject, Object responseObject) Deprecated.Callback for post-processing in terms of marshalling.protected booleanonUnmarshalRequest(MessageContext messageContext, Object requestObject) Deprecated.Callback for post-processing in terms of unmarshalling.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.
-
Field Details
-
logger
protected final org.apache.commons.logging.Log loggerDeprecated.Logger available to subclasses.
-
-
Constructor Details
-
AbstractMarshallingPayloadEndpoint
protected AbstractMarshallingPayloadEndpoint()Deprecated.Creates a newAbstractMarshallingPayloadEndpoint. TheMarshallerandUnmarshallermust be injected using properties. -
AbstractMarshallingPayloadEndpoint
protected AbstractMarshallingPayloadEndpoint(org.springframework.oxm.Marshaller marshaller) Deprecated.Creates a newAbstractMarshallingPayloadEndpointwith the given marshaller. The givenMarshallershould also implements theUnmarshaller, since it is used for both marshalling and unmarshalling. If it is not, an exception is thrown.Note that all
Marshallerimplementations in Spring-WS 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- See Also:
-
AbstractMarshallingPayloadEndpoint
protected AbstractMarshallingPayloadEndpoint(org.springframework.oxm.Marshaller marshaller, org.springframework.oxm.Unmarshaller unmarshaller) Deprecated.Creates a newAbstractMarshallingPayloadEndpointwith 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
-
invoke
Deprecated.Description copied from interface:MessageEndpointInvokes an operation.The given
messageContextcan be used to create a response.- Specified by:
invokein interfaceMessageEndpoint- Parameters:
messageContext- the message context- Throws:
Exception- if an exception occurs
-
onUnmarshalRequest
protected boolean onUnmarshalRequest(MessageContext messageContext, Object requestObject) throws Exception Deprecated.Callback for post-processing in terms of unmarshalling. Called on each message request, after standard unmarshalling.Default implementation returns
true.- Parameters:
messageContext- the message contextrequestObject- the object unmarshalled from therequest- Returns:
trueto continue and callinvokeInternal(Object);falseotherwise- Throws:
Exception
-
onMarshalResponse
protected void onMarshalResponse(MessageContext messageContext, Object requestObject, Object responseObject) Deprecated.Callback for post-processing in terms of marshalling. Called on each message request, after standard marshalling of the response. Only invoked wheninvokeInternal(Object)returns an object.Default implementation is empty.
- Parameters:
messageContext- the message contextrequestObject- the object unmarshalled from therequestresponseObject- the object marshalled to theMessageContext.getResponse()request}
-
afterMarshallerSet
Deprecated.as of Spring Web Services 1.5:afterPropertiesSet()is no longer final, so this can safely be overridden in subclassesTemplate method that gets called after the marshaller and unmarshaller have been set.The default implementation does nothing.
- Throws:
Exception
-
invokeInternal
Deprecated.Template method that subclasses must implement to process a request.The unmarshalled request object is passed as a parameter, and the returned object is marshalled to a response. If no response is required, return
null.- Parameters:
requestObject- the unmarshalled message payload as an object- Returns:
- the object to be marshalled as response, or
nullif a response is not required - Throws:
Exception
-