Spring WS - 在表中记录肥皂请求和肥皂响应

时间:2013-09-05 18:40:56

标签: soap spring-ws

我有一个SpringWS inplementation with the enpoint implementation

@PayloadRoot(namespace="http://college.com/schema/get_XML_Request/v2",localPart="get_XML_Request")
    @ResponsePayload
    public JAXBElement<GetStudentResponseType> handleStudentXML(@RequestPayload JAXBElement<GetStudentXMLRequestType> SoapRequest)throws Exception
        {

        String xmlResponse = "";

        com.college.get_student_xml_response.v2.ObjectFactory objectFactory = new com.company.schema.get_student_xml_response.v2.ObjectFactory();
        com.college.schema.get_student_xml_response.v2.GetResponseType resType = objectFactory.createGetResponseType();
        return objectFactory.createGetStudentResponse(resType);
        }

这里我的目标是记录Web服务发送回我的webservice和响应的请求。是否有可能从上面的方法中获取SoapRequest / Soapresponse(在Soapformat中)作为String.Here能够获得有效负载,但我需要使用整个SoapRequest(使用soapenvelope,body)进行登录。请有人就此提出建议。 / p>

1 个答案:

答案 0 :(得分:1)

查看记录整个SOAP的SoapEnvelopeLoggingInterceptor 信封包括标题。所以基本上你可以扩展它以将保存添加到数据库功能。

相关问题