Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 90120 invoked from network); 11 May 2006 09:32:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 11 May 2006 09:32:49 -0000 Received: (qmail 89171 invoked by uid 500); 11 May 2006 09:32:34 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 89156 invoked by uid 500); 11 May 2006 09:32:34 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 89145 invoked by uid 99); 11 May 2006 09:32:34 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 May 2006 02:32:34 -0700 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS,WEIRD_QUOTING X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of csethil@gmail.com designates 64.233.182.184 as permitted sender) Received: from [64.233.182.184] (HELO nf-out-0910.google.com) (64.233.182.184) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 May 2006 02:32:32 -0700 Received: by nf-out-0910.google.com with SMTP id l23so90521nfc for ; Thu, 11 May 2006 02:32:11 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=gGEj1/j32sm52Zy2dZ1r/s3Ph4y9JaWHoAS03mWKgKHgaXa0NBawrVUf1tCsn5N6ydeZ/qYMrL1b44moRJcY4eTG8aTmM3o1XsoBvpODUhHUqwwzPnbW1XNNHVPNlgovCT4K58V2YrbiMRIf0XKlQu9tDcUjswsqoAYqxurVWsw= Received: by 10.49.81.8 with SMTP id i8mr267583nfl; Thu, 11 May 2006 02:32:11 -0700 (PDT) Received: by 10.48.47.10 with HTTP; Thu, 11 May 2006 02:32:11 -0700 (PDT) Message-ID: Date: Thu, 11 May 2006 02:32:11 -0700 From: "Thilina Gunarathne" To: axis-user@ws.apache.org Subject: Re: [axis2]axis2 + mtom In-Reply-To: <36901.62.156.183.195.1147272332.squirrel@bg.seeburger.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5542_26251967.1147339931208" References: <48809.62.156.183.195.1146588588.squirrel@bg.seeburger.com> <36901.62.156.183.195.1147272332.squirrel@bg.seeburger.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_5542_26251967.1147339931208 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Have you tried with Axis2 1.0.. I fixed a content type issue lately, but wasn't able to check whether it'll solve the Java Mail issue... Gerenimo java Mail & Sun's Java mail are different implementations of Java Mail spec. We can't use Sun's Java mail through Maven repositories due to licensing issues... ~Thilina On 5/10/06, Stefan Vladov wrote: > > Hi, > > sorry to bother you again with the same old stuff... my problem was the > javamail implementation... an exception of type ParseException is thrown > somewhere in > javax.mail.internet.ContentType#ContentType(String type) > , which is called by > public Attachments(InputStream inStream, String contentTypeString, > boolean fileCacheEnable, String attachmentRepoDir, > String fileThreshold) > in org.apache.axiom.attachments.Attachments, > called from TransportUtils and so on... > I wasn't able to debug javamail further to see the exact cause. > Anyway my question is: is MTOM in axis2 meant to work only with geronimo > mail implementation and if you are familiar with the issue, have you > come up with some workaround. > As I am totally unfamiliar with the differences between geronimo's and > sun's implementations I thought the problem might be in the registered > handlers in the mailcap-s of the jars, however now I saw that the code is > different althogh packages, classes and methods are the same :( . > geronimo source is looks like that: > > public ContentType(String type) > throws ParseException > { > int slash =3D type.indexOf("/"); > int semi =3D type.indexOf(";"); > > try > { > _major =3D type.substring(0, slash); > if(semi =3D=3D -1) > { > _minor =3D type.substring(slash + 1); > } else > { > _minor =3D type.substring(slash + 1, semi); > _list =3D new ParameterList(type.substring(semi + > 1)); > } > } > catch(StringIndexOutOfBoundsException e) > { > throw new ParseException("Type invalid: " + type); > } > } > ,whereas sun's javamail 1.4 as well as 1.3.1 are: > > public ContentType(String s) > throws ParseException > { > HeaderTokenizer headertokenizer =3D new HeaderTokenizer(s, > "()<>@,;:\\\"\t []/?=3D"); > HeaderTokenizer.Token token =3D headertokenizer.next(); > if(token.getType() !=3D -1) > throw new ParseException(); > primaryType =3D token.getValue(); > token =3D headertokenizer.next(); > if((char)token.getType() !=3D '/') > throw new ParseException(); > token =3D headertokenizer.next(); > if(token.getType() !=3D -1) > throw new ParseException(); > subType =3D token.getValue(); > String s1 =3D headertokenizer.getRemainder(); > if(s1 !=3D null) > list =3D new ParameterList(s1); > } > Anyway I am serving the web services on Jetty embedded in an application > (which actually provides the services ) and I somehow don't want to switc= h > to geronimo's implementation, so please if somebody has been through this > HEEELP! > > > > I have fixed the SOAP version issue+ a potential content type issue > > recently. > > Are you using Sun's impl of Java Mail? > > > > Please try with the latest svn heads.. Even the latest Axis2 RC + Axiom > > RC would be fine.. > > > > ~Thilina > > > > > > On 5/2/06, Stefan Vladov wrote: > >> > >> Hi guys, > >> > >> This is probably a very stupid problem, however since I consider mysel= f > >> a > >> newbie and I've been using web services for about 2-3 weeks the issue > >> has > >> turned out to be quite a bottleneck for me. So here is my problem: I > was > >> trying to make the following scenario with apache axis2 0.95 - a clien= t > >> requests a file from by providing a name and a web service sends it > (the > >> file) as a binary attachment. However since things did not work I trie= d > >> rewriting the sample and I still have the same problem. My version tha= t > >> is > >> quite similar to the original looks like that: > >> > >> public class MTOMClient > >> { > >> private static EndpointReference targetEPR =3D new > >> EndpointReference("http://localhost:8011/services/WSMTOMTest"); > >> private static imageFileName =3D "some image name"; > >> > >> public static void main (String[] args) > >> { > >> try > >> { > >> OMFactory fac =3D OMAbstractFactory.getOMFactory(); > >> OMNamespace omNs =3D fac.createOMNamespace("http://blabla", > >> "bla"); > >> OMElement method =3D fac.createOMElement("handle", omNs); > >> Image image; > >> image =3D new ImageIO().loadImage(new > >> FileInputStream(imagefilename)); > >> ImageDataSource dataSource =3D new > >> ImageDataSource("calendar.jpg",image); > >> DataHandler dataHandler =3D new DataHandler(dataSource); > >> OMText textData =3D fac.createText(dataHandler, true); > >> OMElement imageElement =3D fac.createOMElement("imageElemen= t", > >> omNs); > >> imageElement.addChild(textData); > >> method.addChild(imageElement); > >> > >> Options options =3D new Options(); > >> options.setTo(targetEPR); > >> options.setSoapVersionURI( > >> SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI); > >> options.setTransportInProtocol(Constants.TRANSPORT_HTTP); > >> options.setProperty(Constants.Configuration.ENABLE_MTOM, > >> Constants.VALUE_TRUE); > >> > >> //Blocking invocation > >> ServiceClient serviceClient =3D new ServiceClient(); > >> serviceClient.setOptions(options); > >> OMElement result =3D serviceClient.sendReceive(method); > >> StringWriter writer =3D new StringWriter(); > >> result.serialize(XMLOutputFactory.newInstance > >> ().createXMLStreamWriter(writer)); > >> writer.flush(); > >> > >> System.out.println(writer.toString()); > >> } > >> catch (Exception e) > >> { > >> e.printStackTrace(); > >> } > >> } > >> } > >> > >> and I got the following exception: "Transport level information does > not > >> match with SOAP Message namespace URI > >> at > >> > >> > org.apache.ws.commons.soap.impl.builder.StAXSOAPModelBuilder.identifySOAP= Version > >> (StAXSOAPModelBuilder.java:123)..." > >> > >> which I believe was caused by the fact that the factory for the > >> soapenvelope was SOAP12Factory. The exception seems to be thrown on th= e > >> client side however tcpmon displays a nice request message and a > >> response > >> with AxisFault in it, which somehow confuses me :(! Since I didn't kno= w > >> how to specify factory class name I changed the option of the client > to > >> "SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI" and the exception change= d > >> :) > >> to > >> > >> "org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: Invalid > Content > >> Type Field in the Mime Message; nested exception is: > >> org.apache.ws.commons.om.OMException: Invalid Content Type Fiel= d > >> in > >> the > >> Mime Message > >> at > >> > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest= ( > >> HTTPTransportUtils.java:295) > >> at org.apache.axis2.transport.http.AxisServlet.doPost( > >> AxisServlet.java:160) > >> ........" > >> which also is thrown I believe on the client side but still I see > >> request > >> and response in tcpmon. Now, my request message looks like that: > >> > >> POST /services/WSMTOMTest HTTP/1.1 > >> User-Agent: Axis/2.0 > >> Host: localhost:8011 > >> Transfer-Encoding: chunked > >> Content-Type: multipart/related; > >> boundary=3DMIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181; > >> type=3D"application/xop+xml"; > >> start=3D"<0.urn:uuid:F91F6DFF8B9836261F11465870886182@apache.org>"; > >> start-info=3D"application/soap+xml"; charset=3DUTF-8;action=3D""""; > >> > >> 645 > >> --MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181 > >> content-type:application/xop+xml; charset=3DUTF-8; > >> type=3D"application/soap+xml"; > >> content-transfer-encoding:binary > >> content-id:<0.urn:uuid:F91F6DFF8B9836261F11465870886182@apache.org> > >> > >> >> xmlns:soapenv=3D"http://www.w3.org/2003/05/soap-envelope"> >> /> >> xmlns:bla=3D"http://blabla"> >> href=3D"cid:1.urn:uuid:F91F6DFF8B9836261F11465870886583@apache.org" > >> xmlns:xop=3D"http://www.w3.org/2004/08/xop/include" > >> /> > >> --MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181 > >> content-id:<1.urn:uuid:F91F6DFF8B9836261F11465870886583@apache.org> > >> content-type:image/jpeg > >> content-transfer-encoding:binary > >> > >> -----binary data--------------- > >> > >> --MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181-- > >> 0 > >> > >> and the only difference that I noticed between this message and the on= e > >> of > >> the sample is the start-info property which was "text/xml" in the > >> original, as well as the "type" attributes of the mime parts... oh and > >> the > >> empty action. I'm using the standard axis2.xml configuration file, > >> nothing > >> extraordinary in the services.xml and the service is very simple too: > >> > >> public class WSMTOMTest > >> { > >> > >> public OMElement handle (OMElement request) throws AxisFault > >> { > >> try > >> { > >> SystemConfiguration sysConf =3D > >> SystemConfiguration.getRef(); > >> OMFactory factory =3D > >> OMAbstractFactory.getOMFactory > >> (); > >> OMNamespace omNS =3D factory.createOMNamespace( > >> "http://" > >> > >> + SystemConfiguration.getLocalHostName() > >> > >> + ":" > >> > >> + sysConf.getPortFrontendHttp(), > >> > >> "rfidNS"); > >> OMElement response =3D > >> factory.createOMElement("copyResponse", > >> omNS); > >> > >> OMElement imageEle =3D request.getFirstElement(= ); > >> OMText binaryNode =3D (OMText) imageEle.getFirstOMChild= (); > >> binaryNode.setOptimize(true); > >> > >> //Extracting the data and saving > >> DataHandler actualDH; > >> actualDH =3D (DataHandler)binaryNode.getDataHandler(); > >> Image actualObject =3D new > >> ImageIO().loadImage(actualDH.getDataSource() > >> .getInputStream()); > >> FileOutputStream imageOutStream =3D new > >> FileOutputStream("D:\blabla.gif"); > >> new ImageIO().saveImage("image/jpeg", actualObject, > >> imageOutStream); > >> > >> response.setText("success"); > >> return response; > >> } > >> catch (Exception e) > >> { > >> throw new AxisFault (e.getMessage()); > >> } > >> } > >> } > >> > >> > >> I really don't know what could possibly go wrong in that extremely > >> simple > >> case. I'm very sorry to bother u with such a long mail for such a > stupid > >> thing but it drives me crazy... I've read everything in every mailing > >> list > >> that I found but no use. Please if someone had the same problem HELP := ) > >> > >> > > > > > > -- > > "May the SourcE be with u" > > http://webservices.apache.org/~thilina/ > > http://thilinag.blogspot.com/ > > http://www.bloglines.com/blog/Thilina > > > > --=20 "May the SourcE be with u" http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina ------=_Part_5542_26251967.1147339931208 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Have you tried with Axis2 1.0.. I fixed a content type issue lately, but wasn't able to check whether it'll solve the Java Mail issue...

Gerenimo java Mail & Sun's Java mail are different implementations of Java Mail spec. We can't use Sun's Java mail through Maven repositories due to licensing issues...

~Thilina

On 5/10/06, Stefan Vladov <s.vladov@bg.seeburger.com> wrote:
  Hi,

sorry to bother you again with the same old stuff...= my problem was the
javamail implementation... an exception of type Pars= eException is thrown
somewhere in
javax.mail.internet.ContentType#Con= tentType (String type)
, which is called by
public Attachments(InputStream inS= tream, String contentTypeString,
      &nb= sp;            =     boolean fileCacheEnable, String attachmentRepoDir,
   &nb= sp;            =        String fileThreshold)
in org.apache.axiom.attachments.Attachments,
ca= lled from TransportUtils and so on...
I wasn't able to debug javamail fu= rther to see the exact cause.
Anyway my question is: is MTOM in axis2 me= ant to work only with geronimo
mail     implementation and if you are familiar wit= h the issue, have you
come up with some workaround.
As I am totally u= nfamiliar with the differences between geronimo's and
sun's implementati= ons I thought the problem might be in the registered
handlers in the mailcap-s of the jars, however now I saw that the code = is
different althogh packages, classes and methods are the same :( .
= geronimo source is looks like that:

     &n= bsp;      public ContentType(String type)
            = ;    throws ParseException
    &= nbsp;       {
    = ;            in= t slash =3D type.indexOf("/");
     &= nbsp;          int semi = =3D type.indexOf(";");

      = ;          try
 &= nbsp;           &nbs= p;  {
            = ;        _major =3D type.substring(0, slash);
       =             &nb= sp;if(semi =3D=3D -1)
          &= nbsp;         {
  = ;            &n= bsp;         _minor =3D type.substring(slash + 1);
       = ;            &n= bsp;} else
          &= nbsp;         {
  = ;            &n= bsp;         _minor =3D type.substring(slash + 1, semi);
      = ;            &n= bsp;     _list =3D new ParameterList(type.substring(semi + 1));
    = ;            &n= bsp;   }
        =         }
   &nbs= p;            &= nbsp;   catch(StringIndexOutOfBoundsException e)
 &n= bsp;            = ;  {
         &nb= sp;          throw new ParseException("Type invalid: " + type);
   = ;            &n= bsp;}
           =  }
,whereas sun's javamail 1.4 as well as 1.3.1 are:

 &= nbsp;  public ContentType(String s)
    &n= bsp;   throws ParseException
    {
       &nbs= p;HeaderTokenizer headertokenizer =3D new HeaderTokenizer(s,
"()<= ;>@,;:\\\"\t []/?=3D");
      = ;  HeaderTokenizer.Token token =3D headertokenizer.next();
&nb= sp;       if(token.getType() !=3D -1)
            = ;throw new ParseException();
       &= nbsp;primaryType =3D token.getValue();
     &nb= sp;  token =3D headertokenizer.next();
    = ;    if((char)token.getType() !=3D '/')
  =           throw new Parse= Exception();
        token =3D= =20 headertokenizer.next();
        = if(token.getType() !=3D -1)
       &n= bsp;    throw new ParseException();
  &nbs= p;     subType =3D token.getValue();
 &nbs= p;      String s1 =3D headertokenizer.getRema= inder();
        if(s1 !=3D null= )
            = ;list =3D new ParameterList(s1);
    }
Anyway I a= m serving the web services on Jetty embedded in an application
(which ac= tually provides the services ) and I somehow don't want to switch
to ger= onimo's implementation, so please if somebody has been through this
HEEELP!


> I have fixed the SOAP version issue+  = ;a potential content type issue
> recently.
> Are you using Sun= 's impl of Java Mail?
>
> Please try with the latest svn heads.= . Even the latest Axis2 RC + Axiom
> RC would be fine..
>
> ~Thilina
>
>
>= ; On 5/2/06, Stefan Vladov <s.vladov@bg.seeburger.com> wrote:
>>
>> Hi guys,
>>
>> This is probably a very stupid problem, however si= nce I consider myself
>> a
>> newbie and I've been using = web services for about 2-3 weeks the issue
>> has
>> turn= ed out to be quite a bottleneck for me. So here is my problem: I was
>> trying to make the following scenario with apache axis2 0.95 -= a client
>> requests a file from by providing a name and a web se= rvice sends it (the
>> file) as a binary attachment. However since= things did not work I tried
>> rewriting the sample and I still have the same problem. My ver= sion that
>> is
>> quite similar to the original looks li= ke that:
>>
>> public class MTOMClient
>> {
>>    private static EndpointReference targetEPR = =3D new
>> EndpointReference("http://localhost:8011/services/WSMTOMTest")= ;
>>    private static imageFileName =3D "= ;some image name";
>>
>>        pub= lic static void main (String[] args)
>>    &nb= sp;   {
>>       = ;         try
>> = ;            &n= bsp;  {
>>       &nbs= p;    OMFactory fac =3D OMAbstractFactory.getOMFactory();
>>   &nbs= p;        OMNamespace omNs =3D fac.createOMNamespace("http://blabl= a",
>> "bla");
>>   &nb= sp;        OMElement method =3D fac.createOMElement("handle", omNs);
>> =            Image ima= ge;
>>          =   image =3D new ImageIO().loadImage(new
>> FileInputStre= am(imagefilename));
>>       &n= bsp;    ImageDataSource dataSource =3D new
>> ImageDataSource("calendar.jpg",image);
>>&n= bsp;           DataH= andler dataHandler =3D new DataHandler(dataSource);
>>   &= nbsp;        OMText textData =3D fac.createText(dataHandler, true);
>>  &nbs= p;         OMElement imageElement =3D fac.createOMElement("imageElement",
>> = omNs);
>>         &nb= sp;  imageElement.addChild(textData);
>>  &nbs= p;         method.addChild(ima= geElement);
>>
>>      &nbs= p;     Options options =3D new Options();
>>          &nb= sp; options.setTo(targetEPR);
>>     = ;       options.setSoapVersionURI(
&g= t;> SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
>>  = ;          options.setTra= nsportInProtocol(Constants.TRANSPORT_HTTP );
>>          &= nbsp; options.setProperty(Constants.Configuration.ENABLE_MTOM,
>= > Constants.VALUE_TRUE);
>>
>>    =         //Blocking invocation
&g= t;>           &nb= sp;ServiceClient serviceClient =3D new ServiceClient();
>>    &= nbsp;       serviceClient.setOptions(opt= ions);
>>         &nb= sp;  OMElement result =3D serviceClient.sendReceive(method);
>>   =          StringWriter writer = =3D new StringWriter();
>>      &nbs= p;     result.serialize(XMLOutputFactory.newInstan= ce
>> ().createXMLStreamWriter(writer));
>>          &nb= sp; writer.flush();
>>
>>    &nb= sp;       System.out.println(writer.toSt= ring());
>>         &= nbsp;      }
>>   &nb= sp;            = catch (Exception e)
>>       &n= bsp;        {
>>           &= nbsp;           &nbs= p;e.printStackTrace();
>>       = ;         }
>> &= nbsp;      }
>> }
>>
>= ;> and I got the following exception: "Transport level information = does not
>> match with SOAP Message namespace URI
>>   = ;     at
>>
>> org.apache.ws.com= mons.soap.impl.builder.StAXSOAPModelBuilder.identifySOAPVersion
>>= (StAXSOAPModelBuilder.java:123)..."
>>
>> which I believe was caused by the fact that the fa= ctory for the
>> soapenvelope was SOAP12Factory. The exception see= ms to be thrown on the
>> client side however tcpmon displays a ni= ce request message and a
>> response
>> with AxisFault in it, which somehow confu= ses me :(! Since I didn't know
>> how to specify factory class nam= e I changed the option of the  client to
>> "SOAP12= Constants.SOAP_ENVELOPE_NAMESPACE_URI " and the exception changed
>> :)
>> to
>><= br>>> "org.apache.axis2.AxisFault: org.apache.axis2.AxisFault: I= nvalid Content
>> Type Field in the Mime Message; nested exception= is:
>>        org.apache.ws.c= ommons.om.OMException: Invalid Content Type Field
>> in
>>= ; the
>> Mime Message
>>     &nb= sp;  at
>> org.apache.axis2.transport.http.HTTPTransport= Utils.processHTTPPostRequest (
>> HTTPTransportUtils.java:295)
>>   &nb= sp;    at org.apache.axis2.transport.http.AxisServlet.d= oPost(
>> AxisServlet.java:160)
>> ........"
>= > which also is thrown I believe on the client side but still I see
>> request
>> and response in tcpmon. Now, my request me= ssage looks like that:
>>
>> POST /services/WSMTOMTest HT= TP/1.1
>> User-Agent: Axis/2.0
>> Host: localhost:8011
>> Transfer-Encoding: chunked
>> Content-Type: multipart= /related;
>> boundary=3DMIMEBoundaryurn:uuid:F91F6DFF8B9836261F114= 65870886181;
>> type=3D"application/xop+xml";
>>= ; start=3D"< 0= .urn:uuid:F91F6DFF8B9836261F11465870886182@apache.org>";
>= ;> start-info=3D"application/soap+xml"; charset=3DUTF-8;action= =3D"""";
>>
>> 645
>> --MIMEBoundaryurn:uuid:F91F6DFF8B9= 836261F11465870886181
>> content-type:application/xop+xml; charset= =3DUTF-8;
>> type=3D"application/soap+xml";
>> = content-transfer-encoding:binary
>> content-id:<0.urn:uuid:F91F6DFF8B9836261F11465870886182@apac= he.org>
>>
>> <?xml version=3D'1.0' encoding=3D= 'UTF-8'?><soapenv:Envelope
>> xmlns:soapenv=3D"http://www.w3.org/2003/05/soap-envelope"><soapen= v:Header
>> /><soapenv:Body><bla:handle
>> xm= lns:bla=3D" http://blabla"><bla:imageElement&g= t;<xop:Include
>> href=3D"cid:1.urn:uuid:F91F6DFF8B9836261F= 11465870886583@apache.org "
>> xmlns:xop=3D"http://www.w3.org/2004/08/xop/include"
>>= /></bla:imageElement></bla:handle></soapenv:Body><= /soapenv:Envelope>
>> --MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181
>= ;> content-id:<1.urn:uuid:F91F6DFF8B9836261F11465870886583@apache.org >
>> content-type:image/jpeg
>> content-transfer-e= ncoding:binary
>>
>> -----binary data---------------
&= gt;>
>> --MIMEBoundaryurn:uuid:F91F6DFF8B9836261F11465870886181= --
>> 0
>>
>> and the only difference that I notic= ed between this message and the one
>> of
>> the sample i= s the start-info property which was "text/xml" in the
>>= original, as well as the "type" attributes of the mime parts... = oh and
>> the
>> empty action. I'm using the standard axis2.xml= configuration file,
>> nothing
>> extraordinary in the s= ervices.xml and the service is very simple too:
>>
>> pub= lic class WSMTOMTest
>> {
>>
>>      &= nbsp; public OMElement handle (OMElement request) throws AxisFault
= >>        {
>> =             &nb= sp;  try
>>       &nb= sp;        {
>>  = ;            &n= bsp;         SystemConfigurati= on sysConf =3D
>> SystemConfiguration.getRef();
>> &nbs= p;            &= nbsp;         OMFactory factory =3D
>> OMAbstractFactory.getOMFactory
>> ();
&= gt;>           &n= bsp;            = ;OMNamespace omNS =3D factory.createOMNamespace(
>> "http://"
>= >
>> + SystemConfiguration.getLocalHostName()
>>
&g= t;> + ":"
>>
>> + sysConf.getPortFrontendHtt= p (),
>>
>> "rfidNS");
>>  &nb= sp;            =          OMElement response =3D
>> factory.createOMElement("copyResponse",<= br>>> omNS);
>>
>>     &nb= sp;            =       OMElement imageEle =3D request.getFirstElement();
>>    =             OMT= ext binaryNode =3D (OMText) imageEle.getFirstOMChild();
>>  =             &nb= sp; binaryNode.setOptimize(true);
>>
>>  &= nbsp;           &nbs= p; //Extracting the data and saving
>>       &n= bsp;        DataHandler actualDH;>>           = ;     actualDH =3D (DataHandler)binaryNode.getDataHandler();
>>   =             &nb= sp;Image actualObject =3D new
>> ImageIO().loadImage(actualDH.getD= ataSource()
>>        &nbs= p;            &= nbsp;  .getInputStream());
>>    &nb= sp;           FileOu= tputStream imageOutStream =3D new
>> FileOutputStream("D:\blabla.gif&quo= t;);
>>          = ;      new ImageIO().saveImage("image/jpeg", actualObject,
>> image= OutStream);
>>
>>      &nbs= p;         response.setText(&q= uot;success");
>>       &n= bsp;            = ;    return response;
>>         =        }
>>   &n= bsp;            = ;catch (Exception e)
>>       &= nbsp;        {
>> &nb= sp;            =           throw new AxisFault (e.getMessage());
>>     &n= bsp;          }
>&g= t;        }
>> }
>&g= t;
>>
>> I really don't know what could possibly go wrong= in that extremely
>> simple
>> case. I'm very sorry to bother u with such a long mail for such a = stupid
>> thing but it drives me crazy... I've read everything in = every mailing
>> list
>> that I found but no use. Please = if someone had the same problem HELP :)
>>
>>
>
>
> --
> "May the S= ourcE be with u"
> http://webservices.apache.org/~thilina/
> http://thilinag.blogspot.com/
> http://www.bloglines.com/blog/Thilina
>

<= /blockquote>



--
"May the SourcE be = with u"          &nb= sp; 
http://webservices.= apache.org/~thilina/
http:= //thilinag.blogspot.com/        = ;         http://www.bloglines.com/= blog/Thilina          = ;     ------=_Part_5542_26251967.1147339931208--