Spring Web Services Framework

org.springframework.ws.server.endpoint.adapter
Class MarshallingMethodEndpointAdapter

java.lang.Object
  extended by org.springframework.xml.transform.TransformerObjectSupport
      extended by org.springframework.ws.server.endpoint.adapter.AbstractMethodEndpointAdapter
          extended by org.springframework.ws.server.endpoint.adapter.MarshallingMethodEndpointAdapter
All Implemented Interfaces:
InitializingBean, EndpointAdapter
Direct Known Subclasses:
GenericMarshallingMethodEndpointAdapter

Deprecated. as of Spring Web Services 2.0, in favor of DefaultMethodEndpointAdapter and MarshallingPayloadMethodProcessor.

@Deprecated
public class MarshallingMethodEndpointAdapter
extends AbstractMethodEndpointAdapter
implements InitializingBean

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.

Since:
1.0.0
Author:
Arjen Poutsma
See Also:
setMarshaller(org.springframework.oxm.Marshaller), setUnmarshaller(org.springframework.oxm.Unmarshaller)

Field Summary
 
Fields inherited from class org.springframework.xml.transform.TransformerObjectSupport
logger
 
Constructor Summary
MarshallingMethodEndpointAdapter()
          Deprecated. Creates a new MarshallingMethodEndpointAdapter.
MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller)
          Deprecated. Creates a new MarshallingMethodEndpointAdapter with the given marshaller.
MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller, org.springframework.oxm.Unmarshaller unmarshaller)
          Deprecated. Creates a new MarshallingMethodEndpointAdapter with the given marshaller and unmarshaller.
 
Method Summary
 void afterPropertiesSet()
          Deprecated.  
 org.springframework.oxm.Marshaller getMarshaller()
          Deprecated. Returns the marshaller used for transforming objects into XML.
 org.springframework.oxm.Unmarshaller getUnmarshaller()
          Deprecated. Returns the unmarshaller used for transforming XML into objects.
protected  void invokeInternal(MessageContext messageContext, MethodEndpoint methodEndpoint)
          Deprecated. Use the given method endpoint to handle the request.
 void setMarshaller(org.springframework.oxm.Marshaller marshaller)
          Deprecated. Sets the marshaller used for transforming objects into XML.
 void setUnmarshaller(org.springframework.oxm.Unmarshaller unmarshaller)
          Deprecated. Sets the unmarshaller used for transforming XML into objects.
protected  boolean supportsInternal(MethodEndpoint methodEndpoint)
          Deprecated. 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

MarshallingMethodEndpointAdapter

public MarshallingMethodEndpointAdapter()
Deprecated. 
Creates a new MarshallingMethodEndpointAdapter. The Marshaller and Unmarshaller must be injected using properties.

See Also:
setMarshaller(org.springframework.oxm.Marshaller), setUnmarshaller(org.springframework.oxm.Unmarshaller)

MarshallingMethodEndpointAdapter

public MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller)
Deprecated. 
Creates a new 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 also implement the Unmarshaller interface, so that you can safely use this constructor.

Parameters:
marshaller - object used as marshaller and unmarshaller
Throws:
IllegalArgumentException - when marshaller does not implement the Unmarshaller interface

MarshallingMethodEndpointAdapter

public MarshallingMethodEndpointAdapter(org.springframework.oxm.Marshaller marshaller,
                                        org.springframework.oxm.Unmarshaller unmarshaller)
Deprecated. 
Creates a new MarshallingMethodEndpointAdapter with the given marshaller and unmarshaller.

Parameters:
marshaller - the marshaller to use
unmarshaller - the unmarshaller to use
Method Detail

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

public void afterPropertiesSet()
                        throws Exception
Deprecated. 
Specified by:
afterPropertiesSet in interface InitializingBean
Throws:
Exception

invokeInternal

protected void invokeInternal(MessageContext messageContext,
                              MethodEndpoint methodEndpoint)
                       throws Exception
Deprecated. 
Description copied from class: AbstractMethodEndpointAdapter
Use the given method endpoint to handle the request.

Specified by:
invokeInternal in class AbstractMethodEndpointAdapter
Parameters:
messageContext - the current message context
methodEndpoint - the method endpoint to use
Throws:
Exception - in case of errors

supportsInternal

protected boolean supportsInternal(MethodEndpoint methodEndpoint)
Deprecated. 
Supports a method with a single, unmarshallable parameter, and that return void or a marshallable type.

Specified by:
supportsInternal in class AbstractMethodEndpointAdapter
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)

Spring Web Services Framework

Copyright © 2005-2013 The Spring Web Services Framework. All Rights Reserved.