You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dan Diephouse (JIRA)" <ji...@apache.org> on 2007/07/14 19:50:05 UTC
[jira] Resolved: (CXF-784) Interceptor not setting the fault chain
for HTTP Binding
[ https://issues.apache.org/jira/browse/CXF-784?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dan Diephouse resolved CXF-784.
-------------------------------
Resolution: Fixed
Fix Version/s: 2.1
This has been resolved in the current SVN code. I will see what I can do about getting a SNAPSHOT deployed (I'm on too slow of a connection to do it). Thanks a lot for reporting this.
I was looking at your sample and realized you can do a simple work around as well:
<bean id="JaxWsServerFactoryBean-Player"
class="org.apache.cxf.jaxws.JaxWsServerFactoryBean"
init-method="create">
....
<property name="outFaultInterceptors">
<list>
<bean class="org.apache.cxf.binding.http.interceptor.ContentTypeOutInterceptor/>
</list>
</property>
<bean>
Also, you shouldn't have to declare your own JaxWsServiceFactoryBean - wrapped=true is the default value, so no customization should be needed.
Thanks again for the bug report!
> Interceptor not setting the fault chain for HTTP Binding
> --------------------------------------------------------
>
> Key: CXF-784
> URL: https://issues.apache.org/jira/browse/CXF-784
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 2.0
> Environment: WIndows XP. Tomcat 5.5, Java 5.0, CXF 2.0
> Reporter: Derek Shaw
> Assignee: Dan Diephouse
> Fix For: 2.0.1, 2.1
>
> Attachments: beans-player.xml
>
>
> Posting as requested by Dan Diephouse ---
> From Dan --
> It seems this is a bug with the HTTP Binding. Can you file a JIRA issue for
> this? I'll take a look and get a fix committed soon. In essence the problem
> is we aren't adding an interceptor which sets the fault chain.
> ---------
> I have an exception configured as.
> @WebFault(name = "PlayerNotFound")
> public class PlayerNotFoundFault extends Exception { }
> There is also a faultInfo class.
> @XmlRootElement(name = "ServiceException")
> public class ServiceException { }
> What I am finding is that when I call my service throught the XML interface (http://<server>/services/xml/) I have configured ( using spring config provided below ), the XMLFault element is namespaced to http://cxf.apache.org/bindings/xformat, while the faultInfo element is namespaced to my default namespace. For XML this is ok... no errors.
> In the case of JSON/Jettison I get a namespace exception and nothing is returned in the response. The restful_http_binding example has the same issue.
> Now, if I add http://cxf.apache.org/bindings/xformat to my outbound JSON namespace then I do get the JSON response, but the content-type of the response is 'text/xml' and I cant seem
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.