Skip to content

Full streaming WebServiceMessage/SoapMessage [SWS-352] #503

@gregturn

Description

@gregturn

Arjen Poutsma opened SWS-352 and commented

Currently, WebServiceMessage and its subinterface SoapMessage offer the getSource() and getResult() methods to the contents of the payload. When an endpoint is invoked, the response Source it returns is transormed into the Result of the response message. This transformation has the benefit that the message is always in sync, i.e. the writeTo() method will write the current contents of the message. The downside is that this transformation is rather slow, since a DOM/Axiom tree needs to be built.

As an alternative, we could do this conversion lazily: if we introduce a setSource(Source) method on the WebServiceMessage (or an sub-interface which extends WebServiceMessage), we could simply set the result of the endpoint on the response message, not creating a DOM tree (yet). Later, when the message is written to the transport stream, we directly transform the set payload Source to the stream, thus saving overhead.

In a way, this is similar to #458, but has the extra benefit that the payload contents is not kept in a buffer.


Attachments:

Issue Links:

Referenced from: commits b00f53d, b398a27

16 votes, 20 watchers

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions