webService 服务端:
加入命名空间+端口
interface接口:
@WebService(targetNamespace="http://msgIdMatch.ws.webservice.common.monitor.adc.taiji.com/" ,
name= "MsgIDAndVersionMatchServicePortType" )
public interface MsgIDAndVersionMatchService {
@WebMethod(action = "acceptMsgIDAndversion")
@WebResult(name = "response", targetNamespace = "http://msgIdMatch.ws.webservice.common.monitor.adc.taiji.com/" )
@XmlElement(required = true)
public String acceptMsgIDAndversion(@WebParam (name="xmlStr",
targetNamespace = "http://msgIdMatch.ws.webservice.common.monitor.adc.taiji.com/" )
String xmlStr) throws Exception;
}
impl实现:
@WebService(serviceName="MsgIDAndVersionMatchService" ,
endpointInterface=
"com.taiji.adc.monitor.common.webservice.ws.msgIdMatch.MsgIDAndVersionMatchService" ,
targetNamespace = "http://msgIdMatch.ws.webservice.common.monitor.adc.taiji.com/" ,
portName= "MsgIDAndVersionMatchServicePort" )
public class MsgIDAndVersionMatchServiceImpl implements MsgIDAndVersionMatchService{
@WebMethod
@Override
public String acceptMsgIDAndversion(String xmlStr) throws Exception {}
}
(备注:如果注解写的不规范,在跨语言访问时可能出现问题)