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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]