【发布时间】:2016-02-15 12:47:30
【问题描述】:
我有一个包含 getEmployeeList 方法的 Web 服务,我需要在数据库中记录请求和响应;
***Column** **Id Request Response ResponseTime***
1 Request1 Response1 600ms
2 Request2 Response2 400ms
我的员工服务类;
@WebService
@HandlerChain(file="employeehandler-chain.xml")
public interface EmployeeWS {
@WebMethod
List<Employee> getEmployeeList(
@WebParam(name = " EmployeeReq") EmployeeReq employeeReq);
我的自定义处理程序类;
public class EmployeeHandler implements SOAPHandler<SOAPMessageContext> {
@Override
public boolean handleMessage(SOAPMessageContext context) {
Boolean outBound = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY);
try {
SOAPMessage soapMsg = context.getMessage();
有没有办法在我的处理程序中关联请求和响应?
【问题讨论】: