axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thilina Gunarathne <cset...@gmail.com>
Subject [Axis2] buildWithMTOM >>Re: svn commit: r291231 - in /webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om: OMNode.java impl/llom/OMElementImpl.java impl/llom/OMNodeImpl.java impl/llom/OMTextImpl.java
Date Mon, 03 Oct 2005 07:14:49 GMT
Hi,
MTOM introduces two level of deferred building to Axiom. the first level is
achieved at the normal StAX parsing. The second level is we read MIME parts
related to an OMText only when the binary data is read. Basically only when
getDataHandler is called.
When it comes to a request-response same channel scenario these differed
building things get bit complicated. We have to make sure we read all the
data available in the request stream, before start writing the response. If
not the remaining data in the request may get lost. This is fine if the user
does not need those data. But most of the time he needs.
This becomes more serious when using MTOM. For a simple example if we
implement a MTOM echo service, we have to make sure to read the MIME part
before writing. Just return the request element with a build() will not the
magic here...This lead to a need of additional method which will build all
including even reading the MIME parts..

May be the name is not good...OR we should add this functionality to
build(). But anyway this has to be provided with a build() method. So that a
recursive build() call will read all the mime parts.

Thanks & Regards,
~Thilina

On 9/24/05, dims@apache.org <dims@apache.org> wrote:
>
> Author: dims
> Date: Fri Sep 23 18:19:04 2005
> New Revision: 291231
>
> URL: http://svn.apache.org/viewcvs?rev=291231&view=rev
> Log:
> Cleanup buildWithMTOM, since it is not used anywhere, name is wrong and we
> can do the same thing using rest of the API.
>
>
> Modified:
>
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNode.java
>
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
>
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java
>
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMTextImpl.java
>
> Modified:
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNode.java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNode.java?rev=291231&r1=291230&r2=291231&view=diff
>
> ==============================================================================
> ---
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNode.java
> (original)
> +++
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNode.java
> Fri Sep 23 18:19:04 2005
> @@ -182,12 +182,4 @@
> * Builds itself
> */
> public void build();
> -
> - /**
> - * The build method will not read the information from stream and build
> MTOM stuff.
> - * This method is to build the normal model and force build the MTOM
> stuff too.
> - *
> - * @throws OMException
> - */
> - public void buildWithMTOM() throws OMException;
> }
>
> Modified:
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java?rev=291231&r1=291230&r2=291231&view=diff
>
> ==============================================================================
> ---
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
> (original)
> +++
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementImpl.java
> Fri Sep 23 18:19:04 2005
> @@ -791,14 +791,4 @@
> builder.discard(this);
> }
> }
> -
> - public void buildWithMTOM() throws OMException {
> - if (!done) {
> - this.build();
> - }
> - Iterator childrenIterator = this.getChildren();
> - while (childrenIterator.hasNext()) {
> - ((OMNode) childrenIterator.next()).buildWithMTOM();
> - }
> - }
> }
>
> Modified:
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java?rev=291231&r1=291230&r2=291231&view=diff
>
> ==============================================================================
> ---
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java
> (original)
> +++
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java
> Fri Sep 23 18:19:04 2005
> @@ -289,18 +289,6 @@
> }
>
> /**
> - * The build method will not read the information from stream and build
> MTOM stuff.
> - * This method is to build the normal model and force build the MTOM
> stuff too.
> - * @throws OMException
> - */
> - public void buildWithMTOM() throws OMException{
> -
> - }
> -
> -
> -
> -
> - /**
> * Serialize the node with caching
> *
> * @param xmlWriter
>
> Modified:
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMTextImpl.java
> URL:
> http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMTextImpl.java?rev=291231&r1=291230&r2=291231&view=diff
>
> ==============================================================================
> ---
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMTextImpl.java
> (original)
> +++
> webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMTextImpl.java
> Fri Sep 23 18:19:04 2005
> @@ -429,8 +429,4 @@
> builder.discard((OMElement) this.parent);
> }
> }
> -
> - public void buildWithMTOM() throws OMException {
> - this.getDataHandler();
> - }
> }
>
>
>


--
"May the SourcE be with u"
http://www.bloglines.com/blog/thilina
http://webservices.apache.org/~thilina/

Mime
View raw message