325.10. 사용자 정의 헤더 및 첨부 파일 필터링
헤더 또는 첨부 파일의 사용자 지정 처리를 제공해야 하는 경우 기존 BasicMessageFilter를 확장하고 적절한 메서드를 재정의하거나 MessageFilter 인터페이스의 새로운 구현을 작성합니다.
사용자 지정 필터를 사용하려면 Spring 컨텍스트에 추가합니다.
전역 a 또는 로컬 메시지 필터를 다음과 같이 지정할 수 있습니다. a) 모든 Spring-WS 끝점에 대한 글로벌 구성을 제공하는 글로벌 사용자 정의 필터
<bean id="messageFilter" class="your.domain.myMessageFiler" scope="singleton" />
또는 b) 로컬 messageFilter는 다음과 같이 끝점에서 직접 수행합니다.
to("spring-ws:http://yourdomain.com?messageFilter=#myEndpointSpecificMessageFilter");
자세한 내용은 CAMEL-5724를 참조하십시오.
고유한 MessageFilter를 생성하려면 클래스 BasicMessageFilter에서 MessageFilter의 기본 구현에서 다음 메서드를 재정의하는 것이 좋습니다.
protected void doProcessSoapHeader(Message inOrOut, SoapMessage soapMessage)
{your code /*no need to call super*/ }
protected void doProcessSoapAttachements(Message inOrOut, SoapMessage response)
{ your code /*no need to call super*/ }