Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.2.4
-
None
-
None
-
Advanced
Description
0
I'm using apache CXF for exposing the webservice. While reading chinese file name from upstream (SOAP UI in local), unable to read exact chinese characters. It's giving file name as '°U'°U123.pdf . I have tried with all encodings but no luck. For other English name attachments no issues, able to read properly.
From soap ui i'm sending UTF-8 encoding , while reading in java I have used same.
byte[] b = attachmentName.getBytes(StandardCharsets.UTF_8);
String attachName = new String(b, StandardCharsets.UTF_8.name());`Below is my interceptor code.
public void handleMessage(SoapMessage message) throws Fault {
logger.info("Handle Message for attachments ");
BindingOperationInfo bop = message.getExchange().getBindingOperationInfo();
if (bop == null)
logger.info("binding info "+bop.getBinding());
if (bop.isUnwrapped()) { bop = bop.getWrappedOperation(); }
if (null == message.getAttachments() || message.getAttachments().isEmpty() ){ return; }
Iterator<Attachment> iter = message.getAttachments().iterator();
Collection<Attachment> attchments = message.getAttachments();
logger.info("message get attachments size : "+attchments.size());
int attachmentCount=0;
Map<String, DataHandler> attachmentMap= AttachmentUtil.getDHMap(attchments);
logger.info("Map<String, DataHandler> "+attachmentMap.size());
try{
while (iter.hasNext())
}
}
Attachments
Attachments
Issue Links
- is duplicated by
-
CXF-8316 i am not getting the chines character is converted into Junk characters in the AbstractPhaseInterceptor<Message>
- Closed