1. 程式人生 > >JAX-WS+spring開發webservice配置

JAX-WS+spring開發webservice配置

  1. @WebService(serviceName = "LoginService")  
  2. publicclass LoginServiceEndpoint {  
  3.     @WebMethod
  4.     public String helloworld(String name) {  
  5.         return"hello:" + name;  
  6.     }  

spring.xml

  1. <bean class="org.springframework.remoting.jaxws.SimpleJaxWsServiceExporter">  
  2.         <property name="baseAddress"
     value="http://localhost:9999/" />  
  3. </bean>  
  4. <bean id="loginServiceEndpoint"class="com.doze.data.service.LoginServiceEndpoint">  
  5. </bean> 

通過http://localhost:9999/LoginService?wsdl訪問webservice部署描述符