Thursday, February 15, 2007

XFire newbie gotcha: use the correct ServiceFactory

If you use the jaxb binding (the default with the Maven-plugin) to generate you client proxies, to actually use your service, you have to instantiate a org.codehaus.xfire.jaxb2.JaxbServiceFactory instead of an org.codehaus.xfire.service.binding.ObjectServiceFactory. Otherwise the parameter names (wsdl:part@name) will be replaced with "in0"-elements by XFire - and the server will complain about an unexpected element "in0".

No comments: