Laurent,

Could u please create a JIRA issue
(http://issues.apache.org/jira/browse/AXIS2) and upload your code,
wsdl what ever you think we need to recreate the problem.

thanks,
dims

On 5/18/06, Laurent CELLA <[EMAIL PROTECTED]> wrote:


Hi dear Axis users and contributors.

We have several problem with encoding issues in Axis 2.

We are working on a project with webservices : Axis 2 ( rel 0.95 ) with
Apache Tomcat 5.5 as a container.
The project involves SOAP with attachment requests, and for now we dont use
any AXIS-Generated client but a custom client based on Apache commons
HttpClient and javax.mail.internet packages to post a SOAP with attachment
request over Http.
We have choosen RPC-Literal encoding.

We have been successfull in making our service work ( integrated in Tomcat
5) in most generic uses cases, but we have problems with encoding issues.

***
Typically our request contains XML data beared by the SOAP Body with
references to attachments content-ids in it.

The problem occurs when this XML contains special characters ( like
iso-latin accents ) or when one attachment has a content-transfer-encoding
"quoted-printable".

To handle special characters in the main XML we have tried those solutions :

1. Put the special characters "as they are", specifying "utf-8" encoding and
waiting implicitly for them at server side.

2. content-transfer-encoding = "quoted-printable" ( as it should be the case
with some of the text attachments )

3. explicitly encodes with RFC 2048 some of the xml fields ( assuming that
Server should know wich fields to decode with MimeUtility.decodeText(
... ) )


Before going any further, the goal of our email is to understand what relies
on our misunderstanding of AXIS API, and what relies on known bugs or "not
yet implemented features".

***

Solution 1 :
Whatever we tryied, the JVM encoding ( "file.encoding" property ) seems to
cause problems.

Solution 3 :
The MimeUtility.decodeWord( ... ) or MimeUtility.decodeText( ... ) that are
located in geronimo-spec-javamail-1.3.1-rc5.jar
does absolutely nothing and does not threw any exceptions. When replaced
with mail-1.3.1.jar it works.
So it seems the jar is bugged or not completed.
It is the same with release 1.0 ( it provides the same jar )
I cant replace the jar to solve the problem, cause geronimo contains and
maps to content-handlers to handles attachments at server side.

Solution 2 :
With a HTTP Request like this ( tcpmon capture ) I get an exception ( that
follows the capture ),
that makes us think that this feature is not yet implemented  ( or that our
invocation is wrong ).

POST /DocAccess_v0.1_Feeder/services/DocAccessService
HTTP/1.1
Content-type: multipart/related;
       boundary="----=_Part_1_20639876.1146648323575";
       start="</doc-access-soap/process-request>";
type="application/xop+xml; charset=utf-8"
User-Agent: Jakarta Commons-HttpClient/3.0-rc4
Host: localhost:8081
Content-Length: 962

------=_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";
    vasId=3D"m2gateway-test" vasPassword=3D"inexbee" mailProcessRequest=3D"=
true">
    <user authMethod=3D"msisdn" authString=3D"+33611223344"/>
    <mail sender=3D"[EMAIL PROTECTED]"
timestampMillis=3D"1146648323575=
">
        <subject>RE : MET demo by Inexbee: =C3=A0=C3=A9=C3=B9=C3=B1=E2=82=
=AC.</subject>
        <body>Respuesta desde Outlook XP : =C3=A0=C3=A9=C3=B9=C3=B1=E2=82=
=AC</body>
    </mail>
</processRequest>
</soapenv:Body></soapenv:Envelope>

------=_Part_1_20639876.1146648323575--

The result is ( it is an HTML tomcat trace )

<?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)

***

Sorry for this very long mail but we have very interested in know more about
thoses issues.

Cordially,

Laurent CELLA.
Inexbee Software.



--
Davanum Srinivas : http://wso2.com/blogs/

Reply via email to