解决方案 »

  1.   

    官方网站下载最新的xfire包。
    package com.ws.test;import javax.jws.WebMethod;
    import javax.jws.WebService;@WebService(name = "testsoapaction", serviceName = "hahah", targetNamespace = "http://xxoo.com")
    public class SoapServiceImpl { @WebMethod(action = "urn:Test", operationName = "test")
    public String example(String message) {
    return message;
    }}service.xml这样写:<beans>
       <service xmlns="http://xfire.codehaus.org/config/1.0">
          <name>HelloService</name>
         <serviceClass>com.ws.test.SoapServiceImpl</serviceClass>
         <serviceFactory>org.codehaus.xfire.annotations.AnnotationServiceFactory</serviceFactory>
      </service>
    </beans>
    上面的serviceFactory必须写。
      

  2.   

    @WebService(name = "testsoapaction", serviceName = "hahah", targetNamespace = "http://xxoo.com") 是写在实现类里面还是借口类里面?