package interfaces.inter;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
@WebService
public interface CmsBaffle {
@WebResult(name="result")
public String login(@WebParam(name = "xml")String xml);
@WebResult(name="result")
public String diacall2SL( @WebParam(name = "xml") String xml);
@WebResult(name="result")
public String getRecordInfo(@WebParam(name = "xml")String xml);
}
package interfaces.impl;
import interfaces.inter.CmsBaffle;
import javax.jws.WebService;
import core.process.Diacall2SLProcess;
import core.process.GetRecordInfoProcess;
@WebService(targetNamespace="http://inter.interfaces/")
public class CmsBaffleServiceImpl implements CmsBaffle{
public String login(String xml) {
return "成功!";
}
public String diacall2SL(String xml) {
Diacall2SLProcess dspl=new Diacall2SLProcess();
String resXml=dspl.diacall2SL(xml);
return resXml;
}
public String getRecordInfo(String xml) {
GetRecordInfoProcess grfipl=new GetRecordInfoProcess();
String resXml=grfipl.getRecordInfo(xml);
return resXml;
}
}
注意点:
1.如果接口和实现类放在一起,注解直接添加,直接使用即可。
2. 如果接口和实现类放在不同的包下,targetNamespace="http://inter.interfaces/" 执行接口的包。否则发布的接口存在问题。
3.调用可以用axis调用