@WebServiceProvider public class MyService { @WebMethod public String sayHello(@WebParam(name = "name") String name) { return "Hello, " + name + "!"; } } @WebEndpoint(url = "http://example.com/MyService") public interface MyService { @WebMethod String sayHello(@WebParam(name = "name") String name); } <xfire:annotation-driven/> <bean id="myService" class="com.example.MyService" /> <bean id="xfire" class="org.codehaus.xfire.spring.remoting.XFireExporter"> <property name="serviceFactory"> <bean class="org.codehaus.xfire.jaxws.JaxWsServiceFactory"/> </property> <property name="serviceBean" ref="myService"/> <property name="serviceClass" value="com.example.MyService"/> <property name="serviceType" value="javax.xml.ws.Service"/> </bean>


上一篇:
下一篇:
切换中文