History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: XFIRE-668
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Tomasz Sztelak
Reporter: Andrew Kerr
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
XFire

Unable to configure overrideTypesList

Created: 25/Sep/06 12:21 PM   Updated: 01/Oct/06 11:55 AM
Component/s: None
Affects Version/s: 1.2
Fix Version/s: 1.2.2

Time Tracking:
Not Specified

Environment: Tomcat 5.5.17, JDK 1.5.0_08


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Tomasz Sztelak - 29/Sep/06 03:56 PM
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>


Tomasz Sztelak - 29/Sep/06 03:59 PM
config problem

Andrew Kerr - 30/Sep/06 02:04 PM
Thanks for the workaround. Should this issue perhaps be reassigned to whoever is in charge of the documentation, so that can be updated.?

Dan Diephouse - 30/Sep/06 10:31 PM
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.

Dan Diephouse - 01/Oct/06 11:55 AM
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.