Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 35576 invoked from network); 3 Oct 2005 07:15:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Oct 2005 07:15:14 -0000 Received: (qmail 86593 invoked by uid 500); 3 Oct 2005 07:15:12 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 86561 invoked by uid 500); 3 Oct 2005 07:15:11 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 86549 invoked by uid 99); 3 Oct 2005 07:15:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2005 00:15:11 -0700 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=HTML_30_40,HTML_MESSAGE,RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of csethil@gmail.com designates 66.249.82.207 as permitted sender) Received: from [66.249.82.207] (HELO xproxy.gmail.com) (66.249.82.207) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2005 00:15:16 -0700 Received: by xproxy.gmail.com with SMTP id s10so146964wxc for ; Mon, 03 Oct 2005 00:14:49 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type; b=BX/wJsGAQV3BrojB2BMvwHVfXv2dlWGeopKmkMxabaWYs+Y75ZrMsb/cUjkjFdjnJke1fD5A1jQdJYVG9o2POzj2PBHioJCn+PYBHLmPVci5Q1D3P3VAd+76mUNStcyjUl5Cim0J7pAkMNhDrGa087U2h5HRxvw2q7B4Tp+KFuQ= Received: by 10.70.48.16 with SMTP id v16mr1503371wxv; Mon, 03 Oct 2005 00:14:49 -0700 (PDT) Received: by 10.70.14.5 with HTTP; Mon, 3 Oct 2005 00:14:49 -0700 (PDT) Message-ID: Date: Mon, 3 Oct 2005 13:14:49 +0600 From: Thilina Gunarathne Reply-To: Thilina Gunarathne To: axis-dev@ws.apache.org 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 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_13349_6611919.1128323689454" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_13349_6611919.1128323689454 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 use= r 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 wrote: > > Author: dims > Date: Fri Sep 23 18:19:04 2005 > New Revision: 291231 > > URL: http://svn.apache.org/viewcvs?rev=3D291231&view=3Drev > Log: > Cleanup buildWithMTOM, since it is not used anywhere, name is wrong and w= e > can do the same thing using rest of the API. > > > Modified: > > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNode.j= ava > > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llo= m/OMElementImpl.java > > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llo= m/OMNodeImpl.java > > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llo= m/OMTextImpl.java > > Modified: > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNode.j= ava > URL: > http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/sr= c/org/apache/axis2/om/OMNode.java?rev=3D291231&r1=3D291230&r2=3D291231&view= =3Ddiff > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNode.j= ava > (original) > +++ > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OMNode.j= ava > 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/llo= m/OMElementImpl.java > URL: > http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/sr= c/org/apache/axis2/om/impl/llom/OMElementImpl.java?rev=3D291231&r1=3D291230= &r2=3D291231&view=3Ddiff > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llo= m/OMElementImpl.java > (original) > +++ > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llo= m/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 =3D this.getChildren(); > - while (childrenIterator.hasNext()) { > - ((OMNode) childrenIterator.next()).buildWithMTOM(); > - } > - } > } > > Modified: > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llo= m/OMNodeImpl.java > URL: > http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/sr= c/org/apache/axis2/om/impl/llom/OMNodeImpl.java?rev=3D291231&r1=3D291230&r2= =3D291231&view=3Ddiff > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llo= m/OMNodeImpl.java > (original) > +++ > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llo= m/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/llo= m/OMTextImpl.java > URL: > http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/xml/sr= c/org/apache/axis2/om/impl/llom/OMTextImpl.java?rev=3D291231&r1=3D291230&r2= =3D291231&view=3Ddiff > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llo= m/OMTextImpl.java > (original) > +++ > webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llo= m/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/ ------=_Part_13349_6611919.1128323689454 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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
<= br>URL: http://svn.apache.org/viewcvs?rev=3D291231&view=3Drev
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/ja= va/modules/xml/src/org/apache/axis2/om/OMNode.java
   &nb= sp;webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/ll= om/OMElementImpl.java
    webservices/axis2/trunk/ja= va/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java
    webservices/axis2/trunk/java/modules/xml/src/or= g/apache/axis2/om/impl/llom/OMTextImpl.java

Modified: webservices/ax= is2/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=3D291231&r1=3D291230&r2=3D29123= 1&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/OM= Node.java (original)
+++ webservices/axis2/trunk/java/modules/xml/src/or= g/apache/axis2/om/OMNode.java Fri Sep 23 18:19:04 2005
@@ -182,12 +182,4= @@
      * Builds itself
  &nbs= p;   */
     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 for= ce build the MTOM stuff too.
-     *
-     * @throws OMEx= ception
-     */
-    public = void buildWithMTOM() throws OMException;
}

Modified: webservices= /axis2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMElementIm= pl.java
URL: http://svn.apache.o= rg/viewcvs/webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om= /impl/llom/OMElementImpl.java?rev=3D291231&r1=3D291230&r2=3D291231&= amp;view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D
--- 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/OMElementImp= l.java Fri Sep 23 18:19:04 2005
@@ -791,14 +791,4 @@
        = ;     builder.discard(this);
    = ;     }
     }
-
- &n= bsp;  public void buildWithMTOM() throws OMException {
- =        if (!done) {
-  &nbs= p;         this.build();
-&= nbsp;       }
-        Iterator childrenIterator = =3D this.getChildren();
-        = ;while (childrenIterator.hasNext()) {
-     &nb= sp;      ((OMNode) childrenIterator.next()).b= uildWithMTOM();
-        }
-&= nbsp;   }
}

Modified: webservices/axis2/trunk/jav= a/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/im= pl/llom/OMNodeImpl.java?rev=3D291231&r1=3D291230&r2=3D291231&vi= ew=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D
--- webservices/axis2/trunk/java/modules/xml/src/org/= apache/axis2/om/impl/llom/OMNodeImpl.java (original)
+++ webservices/axi= s2/trunk/java/modules/xml/src/org/apache/axis2/om/impl/llom/OMNodeImpl.java= Fri Sep 23 18:19:04 2005
@@ -289,18 +289,6 @@
     }

  &= nbsp;  /**
-     * The build method will not re= ad 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
-   &= nbsp; */
-    public void buildWithMTOM() throws OME= xception{
-
-    }
-
-
-
-
- =    /**
      * Serialize th= e node with caching
      *
  = ;    * @param xmlWriter

Modified: webservices/axis2/trunk/java/modules/xml/src/org/apache/a= xis2/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=3D291231&r1=3D291230&= amp;r2=3D291231&view=3Ddiff
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- webservices/axis2/trunk/java/modules/xml/src/org/apache/axis2/om/im= pl/llom/OMTextImpl.java (original)
+++ webservices/axis2/trunk/java/modu= les/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 OMExce= ption {
-        this.getDataHan= dler();
-    }
}





--
"May the S= ourcE be with u"
http://www.bloglines.com/blog/thilina     &nb= sp;         http://webservices.apache.org/~thilina/ ------=_Part_13349_6611919.1128323689454--