You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Zarar Siddiqi <za...@gmail.com> on 2007/09/11 16:25:53 UTC
Re: UnsupportedOperationException when using @WebFault with Aegis
binding
Has anyone looked into this? I'm pretty sure this is a bug which makes it
impossible to use an Aegis binding while using @WebFault. As mentioned in
the original post this is happening because Node.class is not being checked
for in AegisDatabinding.createWriter().
Any ideas?
Zarar Siddiqi wrote:
>
> I've created a JIRA for this:
>
> https://issues.apache.org/jira/browse/CXF-896
>
> Has anyone gotten Aegis + @WebFault to work together?
>
>
>
>
>
>
> Zarar Siddiqi wrote:
>>
>> Hi,
>>
>> I'm getting an UnsupportedOperationException using Aegis binding and
>> JAX-WS frontend. Here's my setup starting with the Spring beans:
>>
>> <bean id="aegisBean"
>> class="org.apache.cxf.aegis.databinding.AegisDatabinding"/>
>>
>> <jaxws:endpoint
>> id="sportsServiceEndpoint"
>> implementor="#sportsService"
>> address="/SportsService">
>> <jaxws:serviceFactory>
>> <bean
>> class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean">
>> <property name="dataBinding" ref="aegisBean"/>
>> <property name="serviceConfigurations">
>> <list>
>> <bean
>> class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration"/>
>> <bean
>> class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration"/>
>> <bean
>> class="org.apache.cxf.service.factory.DefaultServiceConfiguration"/>
>> </list>
>> </property>
>> </bean>
>> </jaxws:serviceFactory>
>> </jaxws:endpoint>
>>
>>
>> Here's the exception class:
>>
>> @WebFault(name="WebServiceException")
>> public class WebServiceException extends RuntimeException {
>>
>> // constructors hidden for brevity
>>
>> public Object getFaultInfo() { .... }
>>
>> }
>>
>> Here's the stacktrace:
>>
>> java.lang.UnsupportedOperationException
>> at
>> org.apache.cxf.aegis.databinding.AegisDatabinding.createWriter(AegisDatabinding.java:109)
>> at
>> org.apache.cxf.jaxws.interceptors.WebFaultOutInterceptor.handleMessage(WebFaultOutInterceptor.java:82)
>> at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
>> at
>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:90)
>> at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:224)
>> at
>> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
>> at
>> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78)
>> at
>> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:231)
>>
>>
>> I can actually see this exception coming. In
>> WebFaultOutInterceptor.handleMessage() the line
>>
>> DataWriter writer = service.getDataBinding().createWriter(Node.class) ;
>>
>> invokes AegisDatabinding.createWriter() where Node.class isn't being
>> looked for:
>>
>> public <T> DataWriter<T> createWriter(Class<T> cls) {
>> if (cls.equals(XMLStreamWriter.class)) {
>> return (DataWriter<T>)new XMLStreamDataWriter(this);
>> } else {
>> throw new UnsupportedOperationException();
>> }
>> }
>>
>> Any ideas how to avoid this exception? Is my configuration wrong or is
>> this a bug?
>>
>> Thanks,
>> Zarar
>>
>
>
--
View this message in context: http://www.nabble.com/UnsupportedOperationException-when-using-%40WebFault-with-Aegis-binding-tf4231074.html#a12616012
Sent from the cxf-user mailing list archive at Nabble.com.