[
http://jira.codehaus.org/browse/JIBX-258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Nigel Charman updated JIBX-258:
-------------------------------
I've updated the code in WsServletDelegate to default to "text/xml". Will need
updating to a more flexible solution for SOAP 1.2 support.
> If Accept-Type HTTP header is not set, JiBX/WS throws "Unsupported media
> type" exception
> ----------------------------------------------------------------------------------------
>
> Key: JIBX-258
> URL: http://jira.codehaus.org/browse/JIBX-258
> Project: JiBX
> Issue Type: Bug
> Components: JiBX/WS
> Reporter: Nigel Charman
> Assignee: Dennis Sosnoski
>
> Exception is:
> java.io.IOException: Unsupported media type 'xml'
> org.jibx.ws.codec.CodecPool.getCodec(CodecPool.java:73)
>
> org.jibx.ws.server.http.WsServletDelegate.doPost(WsServletDelegate.java:140)
> org.jibx.ws.server.http.WsServlet.doPost(WsServlet.java:76)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> WsServletDelegate code is:
> String outtype = CodecDirectory.TEXT_MEDIA_CODE;
> String accepttype = req.getHeader("Accept");
> if (accepttype != null) {
> outtype = CodecDirectory.getBestMimeType(accepttype);
> if (outtype == null) {
> throw new ServletException("No supported media type in
> Accept-Type from request: " + accepttype);
> }
> }
> CodecDirectory.TEXT_MEDIA_CODE is set to "xml". Changing above code to have
> String outtype = "text/xml" fixes the problem. I'm not sure of the best
> solution - do we want to call the fullMimeType() method from the relevant
> Protocol class, so we get either the SOAP 1.1 or SOAP 1.2 preferred types?
> Presumably we will also need similar code for the preceding intype block of
> code.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs