Try with @WebMethod(name = "sayHello" , action = "urn:sayHello") If this works, it may be a behavior specified in the jaxws spec, but I would say it is a bug in xfire.
On 1/25/07, kermitt <[EMAIL PROTECTED]> wrote:
Hello i am trying to expose a basic class using jsr181 annotations: @WebService(name = "SimpleExampleWebService", targetNamespace = "http://example.org/wsm/10/2004/SimpleExampleService") @SOAPBinding(style = SOAPBinding.Style.RPC, use = SOAPBinding.Use.LITERAL) public class HelloWorldService { @WebMethod(action = "urn:sayHello") @WebResult(name = "greetings") public String sayHello(@WebParam(name = "username") String username) { return "Hello " + username + "!!!"; } } here is the servicemix snipplet : <sm:activationSpec componentName="HelloWorld" service="gen:HelloWorld"> <sm:component> <jsr181:component> <jsr181:endpoints> <jsr181:endpoint pojoClass="com.x.ws.HelloWorldService"/> </jsr181:endpoints> </jsr181:component> </sm:component> </sm:activationSpec> When starting embedded servicemix I got this error , why ? Caught: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jbi' defined in file [D:\javadev\bin\apache-servicemix -3.1-incubating-SNAPSHOT\..\..\src\Test2\servicemix.xml]: Invocation of init method failed; nested exception is javax.jbi.management.DeploymentExcepti on: <component-task-result xmlns="http://java.sun.com/xml/ns/jbi/management-message"> <component-name>HelloWorld</component-name> <component-task-result-details> <task-result-details> <task-id>deploy</task-id> <task-result>FAILED</task-result> <message-type>ERROR</message-type> <task-status-msg><msg-loc-info><loc-token/><loc-message>java.lang.IllegalArgumentException: Invalid name []</loc-message></msg -loc-info></task-status-msg> <exception-info> <nesting-level>1</nesting-level> <msg-loc-info> <loc-token /> <loc-message>Invalid name []</loc-message> <stack-trace><![CDATA[java.lang.IllegalArgumentException: Invalid name [] at org.codehaus.xfire.service.ServiceInfo.addOperation(ServiceInfo.java:71) at org.codehaus.xfire.service.binding.ObjectServiceFactory.addOperation(ObjectServiceFactory.java:760) at org.apache.servicemix.jsr181.xfire.ServiceFactoryHelper$FixedJAXWSServiceFactory.addOperation(ServiceFactoryHelper.java:210) at org.codehaus.xfire.service.binding.ObjectServiceFactory.initializeOperations(ObjectServiceFactory.java:720) at org.codehaus.xfire.service.binding.ObjectServiceFactory.create(ObjectServiceFactory.java:418) at org.codehaus.xfire.annotations.AnnotationServiceFactory.create(AnnotationServiceFactory.java:253) at org.apache.servicemix.jsr181.Jsr181Endpoint.registerService(Jsr181Endpoint.java:301) at org.apache.servicemix.jsr181.Jsr181Endpoint.validate(Jsr181Endpoint.java:216) at org.apache.servicemix.common.DefaultComponent.addEndpoint(DefaultComponent.java:300) at org.apache.servicemix.common.DefaultComponent.doInit(DefaultComponent.java:287) at org.apache.servicemix.jsr181.Jsr181Component.doInit(Jsr181Component.java:81) at org.apache.servicemix.common.AsyncBaseLifeCycle.init(AsyncBaseLifeCycle.java:142) at org.apache.servicemix.jbi.framework.ComponentMBeanImpl.init(ComponentMBeanImpl.java:201) at org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1114) at org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1074) at org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:1031) at org.apache.servicemix.jbi.container.JBIContainer.activateComponent(JBIContainer.java:979) at org.apache.servicemix.jbi.container.SpringJBIContainer.afterPropertiesSet(SpringJBIContainer.java:68) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1057 ) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1024) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:421) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:245) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:140) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:242) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:273) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:346) at org.apache.xbean.spring.context.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:149) at org.apache.xbean.spring.context.FileSystemXmlApplicationContext.<init>(FileSystemXmlApplicationContext.java:100) at org.apache.servicemix.Main.main(Main.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.codehaus.classworlds.Launcher.launchStandard(Launcher.java:410) at org.codehaus.classworlds.Launcher.launch(Launcher.java:344) at org.codehaus.classworlds.Launcher.main(Launcher.java:461) ]]></stack-trace> </msg-loc-info> </exception-info> </task-result-details> </component-task-result-details> </component-task-result> -- View this message in context: http://www.nabble.com/Embedded-SM-%2B-JSR181-tf3115713s12049.html#a8630309 Sent from the ServiceMix - User mailing list archive at Nabble.com.
-- Cheers, Guillaume Nodet ------------------------ Architect, LogicBlaze (http://www.logicblaze.com/) Blog: http://gnodet.blogspot.com/
