XFire

Unable to configure overrideTypesList

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.2
  • Fix Version/s: 1.2.2
  • Component/s: None
  • Labels:
    None
  • Environment:
    Tomcat 5.5.17, JDK 1.5.0_08
  • Number of attachments :
    0

Description

I've been trying to configure the overrideTypesList in my services.xml file as documented here:
http://xfire.codehaus.org/XML+Configuration

<service>
... define your normal configuration...
<properties>
<property key="writeXsiType">true</property>
<property key="overrideTypesList">
<list xmlns="">
<value>com.acme.Employee</value>
</list>
</property>
</properties>
</service>

When I try to load the wsdl for me service, I get the following exception from XFire:

org.codehaus.xfire.XFireRuntimeException: Couldn't load provider.. Nested exception is java.lang.ClassCastException: java.lang.String
java.lang.ClassCastException: java.lang.String
at org.codehaus.xfire.aegis.AegisBindingProvider.initializeMessage(AegisBindingProvider.java:82)
at org.codehaus.xfire.service.binding.AbstractBindingProvider.initialize(AbstractBindingProvider.java:30)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:433)
at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(AnnotationServiceFactory.java:240)
at org.codehaus.xfire.spring.ServiceBean.afterPropertiesSet(ServiceBean.java:164)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1059)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:363)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:275)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:320)
at org.codehaus.xfire.spring.XFireConfigLoader.getXFireApplicationContext(XFireConfigLoader.java:103)
at org.codehaus.xfire.spring.XFireConfigLoader.loadContext(XFireConfigLoader.java:39)
at org.codehaus.xfire.transport.http.XFireConfigurableServlet.loadConfig(XFireConfigurableServlet.java:75)
at org.codehaus.xfire.transport.http.XFireConfigurableServlet.createXFire(XFireConfigurableServlet.java:51)
at org.codehaus.xfire.transport.http.XFireServlet.init(XFireServlet.java:45)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:684)
at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:876)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:595)

It appears that the Aegis code is correctly looking for a List, but for some reason, a String is being returned.

I was able to work around this by using the wordier Spring syntax.

Activity

Hide
Tomasz Sztelak added a comment -

Looks like xbean issue, but this is workaround :

<properties >
<property key="writeXsiType">true</property>
<property key="overrideTypesList" xmlns=""> <!-- added empy namespace here -->
<list xmlns="">
<value>com.acme.Employee</value>
</list>
</property>

Show
Tomasz Sztelak added a comment - Looks like xbean issue, but this is workaround : <properties > <property key="writeXsiType">true</property> <property key="overrideTypesList" xmlns=""> <!-- added empy namespace here --> <list xmlns=""> <value>com.acme.Employee</value> </list> </property>
Hide
Tomasz Sztelak added a comment -

config problem

Show
Tomasz Sztelak added a comment - config problem
Hide
Andrew Kerr added a comment -

Thanks for the workaround. Should this issue perhaps be reassigned to whoever is in charge of the documentation, so that can be updated.?

Show
Andrew Kerr added a comment - Thanks for the workaround. Should this issue perhaps be reassigned to whoever is in charge of the documentation, so that can be updated.?
Hide
Dan Diephouse added a comment -

Hi Tomasz, This is actually a bug in XBean. I'm trying to get a fix in right now. The manual contains a workaround, but hopefully we can get a proper XBean fix soon enough.

Show
Dan Diephouse added a comment - Hi Tomasz, This is actually a bug in XBean. I'm trying to get a fix in right now. The manual contains a workaround, but hopefully we can get a proper XBean fix soon enough.
Hide
Dan Diephouse added a comment -

I've created an XBean patch for this:

http://issues.apache.org/jira/browse/XBEAN-55

I'll work on getting new jars deployed as soon as its integrated.

Show
Dan Diephouse added a comment - I've created an XBean patch for this: http://issues.apache.org/jira/browse/XBEAN-55 I'll work on getting new jars deployed as soon as its integrated.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: