여러 웹서비스 보안 기술들은 협력 환경에서 협력자 간에 SOAP 메시지의 안전한 교환을 목적으로 이용된다. 하지만 이러한 보안기술들을 이용할지라도 SOAP 메시지는 아직도 XML기반 공격에 취약할 수 있다. 위와 같은 공격유형을 다루기 위하여 본 논문에서 SOAP메시지의 무결성을 보장하기 위한 자체 적응 접근법을 제안한다. 이 접근법에서 우리는 먼저 SOAP 메시지의 원소 구조를 온톨로지를 사용해서 만들고 SOAP 메시지 헤더부에 부착한다. 만약 공격 유형에서 어떤 변화가 일어난다면 그들을 학습하고 안전한 저장장치에 저장한다. 또한 본 연구에서 SOAP 메시지에 관한 모든 변경 사항은 로그에 쓰여 진다.Several Web Service Security (WS-Security) technologies are used to secure exchanges of SOAP messages in Web Service environment. However, although all of these security standards, SOAP message can still be vulnerable XML-based attacks. In order to deal with these types of attacks, in this paper, we propose a self-adaptive approach to ensure integrity of SOAP messages. In this approach, we first build SOAP message elements structure using ontology and then attach it in SOAP message header. If any changes in the pattern of attack are occurred, we learn them and save in a reliable storage. Also, in our approach, all modifications on SOAP messages are written to a log. Experiments show that the proposed solution has better performance in ensuring integrity of SOAP messages.