`

webservice改变服务名方法名参数名返回

阅读更多
package com.cgm.ws;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
import javax.xml.ws.Endpoint;

@WebService(serviceName="MyService",targetNamespace="www.vvc.com" )
public class WS_01 {
  @WebResult(name="myReturn")
  @WebMethod(operationName="sssss")
public String sayHello(@WebParam(name="names")String name){
return "hello"+name;
}
  @WebMethod(exclude=true)
 

 
public String sayHello1(String name){


return "hello"+name;
}

public static void main(String[] args) {

Endpoint.publish("http://192.168.111.101:6789/hello", new WS_01());

}
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics