统一接口:
@WebService
public interface DrugInterfaceService {
public String printMessage(@WebParam(name = "firstName") String firstName,
@WebParam(name = "secondName") String secondName);
}
实现接口:
@WebService(name = "drugService")
public class DrugService implements DrugInterfaceService {
@Override
public String printMessage(String firstName, String secondName) {
return firstName + secondName;
}
}
spring配置文件1:applicationContext-cxf.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.
@WebService
public interface DrugInterfaceService {
public String printMessage(@WebParam(name = "firstName") String firstName,
@WebParam(name = "secondName") String secondName);
}
实现接口:
@WebService(name = "drugService")
public class DrugService implements DrugInterfaceService {
@Override
public String printMessage(String firstName, String secondName) {
return firstName + secondName;
}
}
spring配置文件1:applicationContext-cxf.xml:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.