Results 1 to 2 of 2

Thread: Question about DomResultFactory

  1. #1
    Join Date
    Apr 2005
    Posts
    4

    Default Question about DomResultFactory

    Hi, Im trying to transform the message payload to XML, Im able to transform it using <marshalling-transformer id="marshaller" marshaller="myMarshaller" result-factory="StringResult"/> but when I use result-factory="DOMResult" it always fails with error:

    Caused by: java.lang.IllegalArgumentException: DOMResult does not contain Node

    Im seeing that org.springframework.integration.xml.result.DomResu ltFactory always returns a new DomResult object but calling its default constructor

    public Result getNewResult(Message<?> message) {
    return new DOMResult();
    }

    and when marshalling the OXM AbstractMarshaller class calls the following method and the exception is thrown.

    protected void marshalDomResult(Object graph, DOMResult domResult) throws XmlMappingException {
    Assert.notNull(domResult.getNode(), "DOMResult does not contain Node");
    marshalDomNode(graph, domResult.getNode());
    }

    I dont understand if i need to override, redefine or anything else, could you please provide some advice?

    Any help will be highly appreciated

  2. #2
    Join Date
    Oct 2007
    Location
    London, England
    Posts
    108

    Default

    This is a bug. I have created INT-324 in JIRA.
    Jonas Partner
    OpenCredo

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •