org.springframework.http.converter.xml

Class MarshallingHttpMessageConverter

    • Constructor Detail

      • MarshallingHttpMessageConverter

        public MarshallingHttpMessageConverter(Marshaller marshaller)
        Construct a new MarshallingMessageConverter with the given Marshaller set.

        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
      • MarshallingHttpMessageConverter

        public MarshallingHttpMessageConverter(Marshaller marshaller,
                                               Unmarshaller unmarshaller)
        Construct a new MarshallingMessageConverter with the given Marshaller and Unmarshaller.
        Parameters:
        marshaller - the Marshaller to use
        unmarshaller - the Unmarshaller to use