cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrea Bozzetto (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-1895) Invalid character set UTF-8; action= urn:ihe:iti:2007:RetrieveDocumentSet in request in Contet-type
Date Tue, 04 Nov 2008 08:20:44 GMT

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

Andrea Bozzetto commented on CXF-1895:
--------------------------------------

I don't understand what you mean. 

The charset parameter is used by servlet class. This is the callstack:

17:29:21,163 ERROR [[CXFServlet]] Servlet.service() for servlet CXFServlet threw exception
java.io.IOException: Invalid character set UTF-8; action= urn:ihe:iti:2007:RetrieveDocumentSet
in request.
	at org.apache.cxf.transport.http.AbstractHTTPDestination.setupMessage(AbstractHTTPDestination.java:271)
	at org.apache.cxf.transport.servlet.ServletDestination.invoke(ServletDestination.java:82)
	at org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:285)
	at org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:168)
	at org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:175)
	at org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:153)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)


I try to patch the class HTTPConduit in this way:

 protected void handleResponseInternal() throws IOException {

.....


            inMessage.put(Message.PROTOCOL_HEADERS, headers);
            inMessage.put(Message.RESPONSE_CODE, responseCode);
            String ct = connection.getContentType();
            inMessage.put(Message.CONTENT_TYPE, ct);
            String charset = null;
            if (ct != null 
                && ct.indexOf("charset") != -1) {
                charset = ct.substring(ct.indexOf("charset") + 8);
                if (charset.indexOf(";") != -1) {
                    charset = charset.substring(0, charset.indexOf(";"));
                }

    		int idx2 = charset.indexOf(";");
   	 	if (idx2 != -1)
			charset = charset.substring(0, idx2).trim();
  	 	else
   	 		charset = charset.trim();
    			

            }

....

}

If it works I will submit the class.

bye

> 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.


Mime
View raw message