From 7a1634a3928a2d244be674521ec4ac4bdee07ab8 Mon Sep 17 00:00:00 2001 From: antelder Date: Fri, 6 Feb 2009 07:26:59 +0000 Subject: Simplfy the java2wsdl tool to not have a dependency on the tuscany runtime git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@741452 13f79535-47bb-0310-9956-ffa450edef68 --- java/sca/tools/sdo/java2wsdl/pom.xml | 6 ------ .../java2wsdl/generate/Java2WSDLGeneratorImpl.java | 23 +++------------------- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/java/sca/tools/sdo/java2wsdl/pom.xml b/java/sca/tools/sdo/java2wsdl/pom.xml index f65c526f57..1a72028147 100644 --- a/java/sca/tools/sdo/java2wsdl/pom.xml +++ b/java/sca/tools/sdo/java2wsdl/pom.xml @@ -47,12 +47,6 @@ 2.0-SNAPSHOT - - org.apache.tuscany.sca - tuscany-databinding - 2.0-SNAPSHOT - - javax.xml.stream stax-api diff --git a/java/sca/tools/sdo/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorImpl.java b/java/sca/tools/sdo/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorImpl.java index bce30a48d3..f60f7b8ca5 100644 --- a/java/sca/tools/sdo/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorImpl.java +++ b/java/sca/tools/sdo/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorImpl.java @@ -25,13 +25,11 @@ import java.util.Map; import java.util.Vector; import org.apache.axiom.om.OMElement; +import org.apache.axis2.util.XMLPrettyPrinter; import org.apache.ws.java2wsdl.Java2WSDL; import org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOption; import org.apache.ws.java2wsdl.utils.Java2WSDLCommandLineOptionParser; import org.apache.ws.java2wsdl.utils.Java2WSDLOptionsValidator; -import org.apache.xml.serialize.OutputFormat; -import org.apache.xml.serialize.XMLSerializer; -import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; @@ -111,23 +109,8 @@ public class Java2WSDLGeneratorImpl implements Java2WSDLGenerator, TuscanyJava2W // transform the OMElement OMElement om = java2WsdlBuilder.getWsdlDocument(); - javax.xml.stream.XMLStreamReader stream = om.getXMLStreamReader(); - - org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node xform = - new org.apache.tuscany.sca.databinding.xml.XMLStreamReader2Node(); - - Node node = xform.transform(stream, null); - - Document doc = node.getOwnerDocument(); - - // pretty-print WSDL document - OutputFormat format = new OutputFormat(doc); - format.setLineWidth(65); - format.setIndenting(true); - format.setIndent(2); - XMLSerializer serializer = new XMLSerializer(getOutputStream(), format); - serializer.serialize(doc); - + XMLPrettyPrinter.prettify(om, getOutputStream()); + return isComplete; } -- cgit v1.2.3