1 /*
2  * @(#) $Id: WSSRemove.java,v 1.2 2003/07/08 08:13:52 pankaj Exp $
3  *
4  * Copyright (c) 2002-03 by Pankaj Kumar (http://www.pankaj-k.net). 
5  * All rights reserved.
6  *
7  * The license governing the use of this file can be found in the 
8  * root directory of the containing software.
9  */
10
11import java.io.FileInputStream;
12import java.io.FileOutputStream;
13import org.w3c.dom.Document;
14
15public class WSSRemove {
16    public static void main(String[] args) throws Exception {
17        String datafile = "out.xml";
18        String outfile = "out.xml";
19
20        System.out.println("Removing WS-Security Header from data in file \"" + datafile + "\" ...");
21
22        Document doc = XmlUtility.readXML(datafile);
23        WSSecurityExtn.removeWSSInfo(doc);
24        XmlUtility.writeXML(doc, new FileOutputStream(outfile));
25    }
26}