Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 42747 invoked from network); 30 May 2006 04:22:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 30 May 2006 04:22:16 -0000 Received: (qmail 3650 invoked by uid 500); 30 May 2006 04:22:03 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 3596 invoked by uid 500); 30 May 2006 04:22:02 -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 3550 invoked by uid 99); 30 May 2006 04:22:02 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 May 2006 21:22:02 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,RCVD_IN_BL_SPAMCOP_NET,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of csethil@gmail.com designates 66.249.92.168 as permitted sender) Received: from [66.249.92.168] (HELO ug-out-1314.google.com) (66.249.92.168) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 29 May 2006 21:22:01 -0700 Received: by ug-out-1314.google.com with SMTP id m3so534407ugc for ; Mon, 29 May 2006 21:21:39 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=jpqgaXSbuxM0Afm17a3wJWis1ScgmrlJCZBy0cBmIEwVVz6BfeIWSUmFi7P2lf9HRRfcW1UNrPsee8V+WcboEIoNf9vNLSsTRLnFf/hzarmg6DAIE6x1ZtJ+O8BAevJaKTkSJAHLP046PYigbFHPjmF4imcLBEK1xyRef84vztg= Received: by 10.66.216.6 with SMTP id o6mr2412057ugg; Mon, 29 May 2006 21:21:39 -0700 (PDT) Received: by 10.66.218.4 with HTTP; Mon, 29 May 2006 21:21:39 -0700 (PDT) Message-ID: Date: Tue, 30 May 2006 10:21:39 +0600 From: "Thilina Gunarathne" To: axis-dev@ws.apache.org Subject: Re: SOAP With Attachments - MIME Part Content Transfer Encoding Cc: axis-user@ws.apache.org In-Reply-To: <447AF17B.6040305@inexbee.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2299_18202012.1148962899288" References: <447AF17B.6040305@inexbee.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_2299_18202012.1148962899288 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Moving the conversation over to Axis2-dev list...Please post your replies to dev list.. Hi Laurent and devs, Currently [1],[2] are the intended behavior. Do you have a use case which makes it mandatory to send the base64 as an attachment, without embedding in the SOAP message... I'm not sure whether we need to support the [3]. On the other hand we use java mail to parse the contents inside the mime part(Contents after ripping off the boundaries). IMHO java mail should parse it if the encoding is intended to be decoded... Thoughts???? ~Thilina On 5/29/06, Laurent CELLA wrote: > > Hi dear Axis Users. > > I am developing a Service with SOAP with attachments ( axis 2 rel 1.0 ) > I dont use MTOM so I prefer retrieve the attachments content by their > dataHandlers with the technic showed in the example > http://ws.apache.org/axis2/1_0/mtom-guide.html > > I have some questions about the way Axis Handles the Parts it receives, > especially when "Content Transfer Encoding" is set as a Part Header and > not using MTOM. > > 1. > > For instance, if I submit a attachment at client side base64 encoded, > and specifying "Content-Transfer-Encoding = base64" in the Header, the > result is not automatically decoded at server side, I must call > Base64.decode( ... ) explicitely ). > > Is it a normal behaviour ? Can we configure the service so it will > decode on its own ? > 2. > > I have noticed the same thing with encoding "quoted-printable" in an > attachment : looks like it is up to me to do the decode Work. > Is it a normal behaviour ? Or I miss something ? > > 3. > Encoding of the SOAP part of request. > The SOAP enveloppe is the first MimePart itself. > > Here is an example wich uses "quoted-printable" encoding for the SOAP > Body. > > ------=_Part_1_20639876.1146648323575 > Content-Type: application/xop+xml; charset=utf-8 > Content-Transfer-Encoding: quoted-printable > Content-ID: > > > http://schemas.xmlsoap.org/soap/envelope= > /"> > > mailProcessRequest=3D"= > true"> > ( ... ) > > > > Such a request cause Axis Exceptions such this one ( release 0.95 ) : > It seems the AXIS Api tries to parse XML prior to apply > "quoted-printable" decoding. Is it a good interpretation ? > > xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"> > />soapenv:Sender xml:lang="en-US">Unexpected character '3' (code 51); expected a quote > character enclosing value for 'version' > at [row,col {unknown-source}]: [1,15]; nested exception is: > com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected > character '3' (code 51); expected a quote character enclosing value for > 'version' > at [row,col {unknown-source}]: > [1,15] xmlns="">org.apache.axis2.AxisFault: Unexpected character '3' (code 51); > expected a quote character enclosing value for 'version' > at [row,col {unknown-source}]: [1,15]; nested exception is: > com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected > character '3' (code 51); expected a quote character enclosing value for > 'version' > at [row,col {unknown-source}]: [1,15] > at > org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest( > HTTPTransportUtils.java:297) > at > org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:160) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) > at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) > at > org.apache.catalina.core.ApplicationFilterChain.internalDoFilter( > ApplicationFilterChain.java:252) > at > org.apache.catalina.core.ApplicationFilterChain.doFilter( > ApplicationFilterChain.java:173) > at > org.apache.catalina.core.StandardWrapperValve.invoke( > StandardWrapperValve.java:213) > at > org.apache.catalina.core.StandardContextValve.invoke( > StandardContextValve.java:178) > at > org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java > :126) > at > org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java > :105) > at > org.apache.catalina.core.StandardEngineValve.invoke( > StandardEngineValve.java:107) > at > org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java > :148) > at > org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) > at > > org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection > (Http11BaseProtocol.java:664) > at > org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket( > PoolTcpEndpoint.java:527) > at > org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt( > LeaderFollowerWorkerThread.java:80) > at > org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run( > ThreadPool.java:684) > at java.lang.Thread.run(Thread.java:595) > Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected > character '3' (code 51); expected a quote character enclosing value for > 'version' > at [row,col {unknown-source}]: [1,15] > at > com.ctc.wstx.io.InputBootstrapper.reportUnexpectedChar( > InputBootstrapper.java:430) > at > com.ctc.wstx.io.InputBootstrapper.handleEq(InputBootstrapper.java:344) > at > com.ctc.wstx.io.InputBootstrapper.readXmlVersion(InputBootstrapper.java > :243) > at > com.ctc.wstx.io.InputBootstrapper.readXmlDecl(InputBootstrapper.java:205) > at > com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java > :139) > at > com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:503) > at > com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:558) > > *** > > Laurent CELLA > Inexbee Software > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org > For additional commands, e-mail: axis-user-help@ws.apache.org > > -- "May the SourcE be with u" http://webservices.apache.org/~thilina/ http://thilinag.blogspot.com/ http://www.bloglines.com/blog/Thilina ------=_Part_2299_18202012.1148962899288 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
Moving the conversation over to Axis2-dev list...Please post your replies to dev list..
 
Hi Laurent and devs,
Currently [1],[2] are the intended behavior. Do you have a use case which makes it mandatory to send the base64 as an attachment, without embedding in the SOAP message...
 
I'm not sure whether we need to support the [3].
 
On the other hand we use java mail to parse the contents inside the mime part(Contents after ripping off the boundaries). IMHO java mail should parse it if the encoding is intended to be decoded...
 
Thoughts????
 
~Thilina
 
On 5/29/06, Laurent CELLA <laurent.cella@inexbee.com> wrote:
Hi dear Axis Users.

I am developing a Service with SOAP with attachments ( axis 2 rel 1.0 )
I dont use MTOM so I prefer retrieve the attachments content by their
dataHandlers with the technic showed in the example
http://ws.apache.org/axis2/1_0/mtom-guide.html

I have some questions about the way Axis Handles the Parts it receives,
especially when "Content Transfer Encoding" is set as a Part Header and
not using MTOM.

1.

For instance, if I submit a attachment at client side base64 encoded,
and specifying "Content-Transfer-Encoding = base64" in the Header, the
result is not automatically decoded at server side, I must call
Base64.decode( ... ) explicitely ).

Is it a normal behaviour ? Can we configure the service so it will
decode on its own ?
2.

I have noticed the same thing with encoding "quoted-printable" in an
attachment : looks like it is up to me to do the decode Work.
Is it a normal behaviour ? Or I miss something ?

3.
Encoding of the SOAP part of request.
The SOAP enveloppe is the first MimePart itself.

Here is an example wich uses "quoted-printable" encoding for the SOAP Body.

------=_Part_1_20639876.1146648323575
Content-Type: application/xop+xml; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-ID: </doc-access-soap/process-request>

<?xml version=3D" 1.0" encoding=3D"utf-8"?>
<soapenv:Envelope xmlns:soapenv=3D"http://schemas.xmlsoap.org/soap/envelope=
/">
<soapenv:Body xmlns:types=3D" http://www.inexbee.com/m2doc/m2doc">
<processRequest xmlns=3D"http://www.inexbee.com/m2doc/m2doc"
    mailProcessRequest=3D"=
true">
( ... )
</processRequest>
</soapenv:Body></soapenv:Envelope>

Such a request cause Axis Exceptions such this one ( release 0.95 ) :
It seems the AXIS Api tries to parse XML prior to apply
"quoted-printable" decoding. Is it a good interpretation ?

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope "><soapenv:Header
/><soapenv:Body><soapenv:Fault><soapenv:Code><soapenv:Value>soapenv:Sender</soapenv:Value></soapenv:Code><soapenv:Reason><soapenv:Text
xml:lang="en-US">Unexpected character '3' (code 51); expected a quote
character enclosing value for 'version'
at [row,col {unknown-source}]: [1,15]; nested exception is:
      com.ctc.wstx.exc.WstxUnexpectedCharException : Unexpected
character '3' (code 51); expected a quote character enclosing value for
'version'
at [row,col {unknown-source}]:
[1,15]</soapenv:Text></soapenv:Reason><soapenv:Detail><Exception
xmlns="">org.apache.axis2.AxisFault: Unexpected character '3' (code 51);
expected a quote character enclosing value for 'version'
at [row,col {unknown-source}]: [1,15]; nested exception is:
       com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
character '3' (code 51); expected a quote character enclosing value for
'version'
at [row,col {unknown-source}]: [1,15]
      at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest (HTTPTransportUtils.java:297)
      at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:160)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      at javax.servlet.http.HttpServlet.service (HttpServlet.java:802)
      at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java :173)
      at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at
org.apache.catalina.core.StandardHostValve.invoke (StandardHostValve.java:126)
      at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection (Http11BaseProtocol.java:664)
      at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java :80)
      at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
      at java.lang.Thread.run(Thread.java:595)
Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected
character '3' (code 51); expected a quote character enclosing value for
'version'
at [row,col {unknown-source}]: [1,15]
      at
com.ctc.wstx.io.InputBootstrapper.reportUnexpectedChar(InputBootstrapper.java :430)
      at
com.ctc.wstx.io.InputBootstrapper.handleEq(InputBootstrapper.java:344)
      at
com.ctc.wstx.io.InputBootstrapper.readXmlVersion(InputBootstrapper.java:243)
      at
com.ctc.wstx.io.InputBootstrapper.readXmlDecl (InputBootstrapper.java:205)
      at
com.ctc.wstx.io.ReaderBootstrapper.bootstrapInput(ReaderBootstrapper.java:139)
      at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:503)
      at
com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:558)

***

Laurent CELLA
Inexbee Software





---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org




--
"May the SourcE be with u"            
http://webservices.apache.org/~thilina/
http://thilinag.blogspot.com/                 http://www.bloglines.com/blog/Thilina               ------=_Part_2299_18202012.1148962899288--