[ 
https://issues.apache.org/jira/browse/CXF-1895?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644929#action_12644929
 ] 

Willem Jiang commented on CXF-1895:
-----------------------------------

Hi Andrea,

You could use below code to get the the charset string. 

{code}
        String[] tokens = contentType.split(";");
        for (String token : tokens) {
            int index = token.indexOf("charset=");
            if (index >= 0) {
                String charset = token.substring(index + 8); 
                break ; 
            }            
        }
{code}

Willem

> Invalid character set UTF-8; action= urn:ihe:iti:2007:RetrieveDocumentSet in 
> request in Contet-type
> ---------------------------------------------------------------------------------------------------
>
>                 Key: CXF-1895
>                 URL: https://issues.apache.org/jira/browse/CXF-1895
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.1.3
>         Environment: Linux, Ubuntu 8.04
>            Reporter: Andrea Bozzetto
>
> Hi, I have a problem reading this soap Message, CXF throw  
> "java.io.IOException: Invalid character set UTF-8; action= 
> urn:ihe:iti:2007:RetrieveDocumentSet in request."
> POST /EuleroXDSRepository/repositoryb HTTP/1.1
> Content-Type: application/soap+xml; charset=UTF-8; 
> action="urn:ihe:iti:2007:RetrieveDocumentSet"
> User-Agent: Axis2
> Host: 172.30.20.161:8888
> Transfer-Encoding: chunked
>  
> 2f3
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope 
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"; 
> xmlns:wsa="http://www.w3.org/2005/08/addressing";><soapenv:Header><wsa:To>http://localhost:8888/EuleroXDSRepository/repositoryb</wsa:To><wsa:MessageID>urn:uuid:F99C8EB3F258E6DC751225718664373</wsa:MessageID><wsa:Action>urn:ihe:iti:2007:RetrieveDocumentSet</wsa:Action></soapenv:Header><soapenv:Body><RetrieveDocumentSetRequest
>  xmlns="urn:ihe:iti:xds-b:2007" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
>     <DocumentRequest>
>         <RepositoryUniqueId>urn:4a8afe2</RepositoryUniqueId>
>         <DocumentUniqueId>172.30.20.187262</DocumentUniqueId>
>     </DocumentRequest>
> </RetrieveDocumentSetRequest></soapenv:Body></soapenv:Envelope>
> 0
>  

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

Reply via email to