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

Key: XFIRE-167
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Dan Diephouse
Reporter: Artti Jaakkola
Votes: 0
Watchers: 1
Operations

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

xfire.xmlbeansServiceFactory doesn't work in Spring configuration

Created: 11/Nov/05 06:02 AM   Updated: 14/Nov/05 02:32 AM
Component/s: XMLBeans
Affects Version/s: 1.0-M5
Fix Version/s: 1.0-M6

Time Tracking:
Not Specified

Environment:
Windows XP SP2, Sun Java 1.4.2_10, Tomcat 5.0.28

commons-logging-1.0.4.jar
javamail-1.3.3.jar
jaxen-1.1-beta-5.jar
log4j-1.2.8.jar
spring-1.2.5.jar
stax-1.1.2-dev.jar
stax-api-1.0.jar
wsdl4j-1.4.jar
xbean-2.0.0.jar
xbean_xpath-2.0.0.jar
xfire-all-1.0-M5.jar
xmlpublic-2.0.0.jar
yom-1.0-alpha-2.jar


 Description  « Hide
Everything works fine with basic xfire.serviceFactory:

<bean id="service" class="org.codehaus.xfire.spring.remoting.XFireExporter">
<property name="serviceFactory">
<ref bean="xfire.serviceFactory"/>
</property>

XFire spots the usage of XMLBeans and everything goes fine. XFire generates wrapped style WSDL.

If I change serviceFactory property according to instructions in XFire website:

http://xfire.codehaus.org/Advanced+Configuration

<bean id="xfire.xmlbeansServiceFactory"
class="org.codehaus.xfire.xmlbeans.XmlBeansServiceFactory"
singleton="true"
>
<constructor-arg index="0">
<ref bean="xfire.transportManager"/>
</constructor-arg>
</bean>

<bean id="service" class="org.codehaus.xfire.spring.remoting.XFireExporter">
<property name="serviceFactory">
<ref bean="xfire.xmlbeansServiceFactory"/>
</property>

...I get following exception when requesting ?wsdl:

2005-11-11 13:49:39,347 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from ServletContext resource [/WEB-INF/xfire-servlet.xml]

2005-11-11 13:49:39,437 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Bean factory for application context [WebApplicationContext for namespace 'xfire-servlet']: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [xfire.xmlbeansServiceFactory,service,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [serviceWS,xfire.serviceRegistry
,xfire.transportManager,xfire,xfire.typeMappingRegistry,xfire.aegisBindingProvider,xfire.serviceFactory,xfire.servletController];
root of BeanFactory hierarchy

2005-11-11 13:49:39,437 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - 3 beans defined in application context [WebApplicationContext for namespace 'xfire-servlet']

2005-11-11 13:49:39,437 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@538974]
2005-11-11 13:49:39,437 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default

[org.springframework.context.event.SimpleApplicationEventMulticaster@6545d2]
2005-11-11 13:49:39,437 INFO [org.springframework.ui.context.support.UiApplicationContextUtils] - Unable to locate ThemeSource with name 'themeSource': using default [org.springframework.ui.context.support.DelegatingThemeSource@cade31]

2005-11-11 13:49:39,437 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [xfire.xmlbeansServiceFactory,service,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [serviceWS,xfire.serviceRegistry,xfire.transportManager,xfire,xfire.typeMappingRegistry,xfire.aegisBindingProvider,xfire.serviceFactory,xfire.servletController]; root of BeanFactory hierarchy]

2005-11-11 13:49:44,214 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in factory {org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [xfire.xmlbeansServiceFactory,service,org.springframework.web.servlet.handler.SimpleUrlHandlerMapping]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory defining beans [serviceWS,xfire.serviceRegistry,xfire.transportManager,xfire,xfire.typeMappingRegistry,xfire.aegisBindingProvider,xfire.serviceFactory,xfire.servletController]; root of BeanFactory hierarchy}

2005-11-11 13:49:44,214 ERROR [org.springframework.web.servlet.DispatcherServlet] - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'service' defined in ServletContext resource [/WEB-INF/xfire-servlet.xml]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException: In
valid name [null]
java.lang.IllegalArgumentException: Invalid name [null]
at org.codehaus.xfire.service.MessagePartContainer.addMessagePart(MessagePartContainer.java:57)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.addOperation(ObjectServiceFactory.java:364)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeOperations(ObjectServiceFactory.java:286)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:238)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:187)
at org.codehaus.xfire.spring.ServiceBean.afterPropertiesSet(ServiceBean.java:56)
at org.codehaus.xfire.spring.remoting.XFireExporter.afterPropertiesSet(XFireExporter.java:26)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableB
eanFactory.java:1058)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFact
ory.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(DefaultListableBeanFactor
y.java:275)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:318)
at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicat
ionContext.java:134)
at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:305)
at org.springframework.web.servlet.FrameworkServlet.initWebApplicationContext(FrameworkServlet.java:250)
at org.springframework.web.servlet.FrameworkServlet.initServletBean(FrameworkServlet.java:219)
at org.springframework.web.servlet.HttpServletBean.init(HttpServletBean.java:112)
at javax.servlet.GenericServlet.init(GenericServlet.java:211)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1029)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:687)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:144)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:118)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:799)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:705)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:577)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:534)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Dan Diephouse - 11/Nov/05 12:34 PM
Hi Artti - can you try this with one of our snapshot builds? We'll be releasing a new version in a couple days and I think this might already be fixed:

http://xfire.codehaus.org/Download


Artti Jaakkola - 12/Nov/05 12:59 AM
Yes. I already changed to snapshot builds yesterday because of the better Spring support (configuration properties in ServiceBean) and so far everything has been working like a charm. Now I just need to find out, how can I accuire authorization information in my service bean (HttpServletRequest.getUserPrincipal).

I'll try XmlBeansServiceFactory when I get to office - probably on Monday.

But like I mentioned, even XFire 1.0 M5 seems to notice the usage of XMLBeans and works correctly even without XmlBeansServiceFactory, so this problem isn't too bad. Seems like it's just a regression issue.

After looking at the sources, XFire is now definitely on my "Top 10 open source projects". Great work!


Dan Diephouse - 12/Nov/05 12:14 PM
Cool, well I'll close the issue sometime next week then if I don't hear back from you. Also, since you like XFire so much, would you mind adding your company to the list of those who use it?

http://docs.codehaus.org/pages/viewpage.action?pageId=36775


Artti Jaakkola - 12/Nov/05 02:16 PM
Technically, we are not yet using it, just evaluating. But from the looks of this evaluation so far, it seems quite clear that we will be using XFire together with XMLBeans in future.

In our current project, I don't believe that we get a permission to use anything that doesn't have a company supporting it or that has a milestone label in its distribution package - even if it's this much superior to other existing frameworks. From my point of view it would be better if I had got to know XFire little later - it bugs me quite much that I have to suffer from proprietary softwares bugs while I could be using my time solving other problems.

I'm probably not able to sign XFire usage for the whole company, but I can ask our competence center manager, if we can sign it from behalf of our horizontal unit.


Dan Diephouse - 12/Nov/05 04:19 PM
I see. Well, we are going to do an M6 release next week (guessing tuesday or wednesday). Then we will be doing a 1.0 release around January 1. So keep that in mind as you evaluate!

Artti Jaakkola - 14/Nov/05 02:32 AM
Works with snapshot build.