summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-02-06 07:26:59 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-02-06 07:26:59 +0000
commit7a1634a3928a2d244be674521ec4ac4bdee07ab8 (patch)
tree3ec53cc50a0acf960e8b72b416c504d64bc09b24
parentdf6da250dee78ff6f6c43096b26d4793087b0b99 (diff)
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
-rw-r--r--java/sca/tools/sdo/java2wsdl/pom.xml6
-rw-r--r--java/sca/tools/sdo/java2wsdl/src/main/java/org/apache/tuscany/tools/java2wsdl/generate/Java2WSDLGeneratorImpl.java23
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
@@ -48,12 +48,6 @@
</dependency>
<dependency>
- <groupId>org.apache.tuscany.sca</groupId>
- <artifactId>tuscany-databinding</artifactId>
- <version>2.0-SNAPSHOT</version>
- </dependency>
-
- <dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
<version>1.0-2</version>
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;
}