[ 
https://issues.apache.org/jira/browse/SYNAPSE-261?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12593957#action_12593957
 ] 

Andreas Veithen commented on SYNAPSE-261:
-----------------------------------------

Solved the issue for outgoing messages sent through the VFS and mail transport:
1) VFSTransportSender and MailTransportSender now always use the encoding as 
determined by BaseUtils.getOMOutputFormat. Since this method uses 
HTTPTransportUtils.getCharSetEncoding, it either takes the 
CHARACTER_SET_ENCODING property from the message context or uses a default 
encoding.
2) The <address> element in endpoint definitions can now have an "encoding" 
attribute. This value is stored in a new property of EndpointDefinition, which 
is used by Axis2FlexibleMEPClient to set the CHARACTER_SET_ENCODING property in 
the message context of the outgoing message.

These changes allow the user to specify the encoding by endpoint:

<send>
  <endpoint>
    <address 
uri="vfs:file:///Users/veithen/workspace/synapse-vfs-test/data/out" 
encoding="UTF-16"/>
  </endpoint>
</send>

Still to be done:
* Solve encoding issue for files picked up by VFSTransportListener.
* Correct PlainTextFormatter.
* Update documentation/samples.
* Try to isolate the binary/text payload handling code (into a 
MessageFormatter?) and reuse it in the different transports.

> VFS transport doesn't handle text file encoding
> -----------------------------------------------
>
>                 Key: SYNAPSE-261
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-261
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.1
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>             Fix For: 1.2
>
>
> * VFSUtils#getMessageTextPayload reads the file into a byte[] and constructs 
> a String object from it without specifying the encoding.
> * VFSTransportSender#populateResponseFile uses String#getBytes without 
> specifying the encoding.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to