Hi,
I'm trying to output a wsdl file by it's elements, but cannot get it to
work...
here is my code:
------------begin code-------------
XMLStreamReader parser =
XMLInputFactory.newInstance().createXMLStreamReader(
new
FileReader("ServisFirstTry1.wsdl"));
OMXMLParserWrapper builder =
OMXMLBuilderFactory.createStAXOMBuilder(OMAbstractFactory.getOMFactory(),
parser);
OMElement root = builder.getDocumentElement();
XMLStreamWriter writer =
XMLOutputFactory.newInstance().createXMLStreamWriter(System.out);
System.out.println("WSDL print ");
System.out.println("--------------------------------------------------");
int i = 0;
Iterator children = root.getChildren();
while (children.hasNext()) {
System.out.print(i+": "); i++;
OMNode node = (OMNode) children.next();
System.out.println();
node.serializeWithCache(writer); // <- this should be different
}
-------------end code --------------
The problem is, if I use serializeXX() method, all other subelements are
also displayed...
any help?
Andrej