Hello Oleg
Thanks for your time in this reply
The 'result-type' is to specify which type of Result object do you want to deal with. It could be DomResult, StringResult etc.
Totally agree and I understood, BTW I am receiving an exception when I work with the default DOMResult, writing a post right now in other thread
Based on the result-type a particular result factory will be applied.
I think it is internally handle by Spring Integration with its API because the documentation and in my code I only use for example
Code:
<int-xml:marshalling-transformer marshaller="castorMarshaller"
result-type="StringResult"
input-channel="input"
output-channel="xml"
/>
and work fine, no problem
Buit you can also specify 'result-factory' directly.
Here my doubt and confusion
- why specify directly this attribute?
- result-factory replace result-type?
- is possible use both?
none snippet code on the documentation working with result-factory is available, thats the reason of my doubts
Soi 'result-type' and result-factory' are mutually exclusive.
OK
Now, once the result of a particular type is created it could also be transformed by specifying 'result-transformer'
Could I consider this like a post creation manipulation process? And now for here arise a new question
Why apply a transformation after the object is created? and not while its own initial creation process?, I think the answer of my question should be included below of the snippet code shown in the documentation
Code:
<si-xml:marshalling-transformer
input-channel="marshallingTransformerWithResultTransformer"
output-channel="output"
marshaller="marshaller"
result-transformer="resultTransformer" />
<bean id="resultTransformer"
class="org.springframework.integration.xml.transformer.ResultToStringTransformer"/>
I mean in marshaller="marshaller", what job or what is the code used on "marshaller"?, which implementation was used? Castor?, because ResultToStringTransformer API said
Converts
the passed Result to an instance of String. Supports StringResult and DOMResult
Here arise other question about the bold part, where and how was passed this Result?
Again thanks for your time, your answer was useful but now I have new ones
I know you are very busy, when you get some free time, give me a hand please
Thanks in advanced