From e0ff67c0b32813ea48734c770a5ffc1952644e29 Mon Sep 17 00:00:00 2001 From: lresende Date: Wed, 11 Nov 2009 23:08:02 +0000 Subject: Moving 1.x branches git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835128 13f79535-47bb-0310-9956-ffa450edef68 --- .../generate/WSDL2JavaGeneratorTestCase.java | 80 ++++ .../java/org/soapinterop/CreditScoreDocLit.java | 25 ++ .../src/test/resources/AccountService.wsdl | 242 +++++++++++ .../test/resources/AccountServiceWithFault.wsdl | 475 +++++++++++++++++++++ .../src/test/resources/CreditScoreDocLit.wsdl | 76 ++++ .../wsdl2java/src/test/resources/helloworld.wsdl | 121 ++++++ .../wsdl2java/src/test/resources/interopdoc.wsdl | 180 ++++++++ .../wsdl2java/src/test/resources/sequences.xsd | 100 +++++ 8 files changed, 1299 insertions(+) create mode 100644 sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java create mode 100644 sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/java/org/soapinterop/CreditScoreDocLit.java create mode 100644 sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/AccountService.wsdl create mode 100644 sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl create mode 100644 sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/CreditScoreDocLit.wsdl create mode 100644 sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/helloworld.wsdl create mode 100644 sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/interopdoc.wsdl create mode 100644 sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/sequences.xsd (limited to 'sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test') diff --git a/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java new file mode 100644 index 0000000000..92581d6ac2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java @@ -0,0 +1,80 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.tuscany.tools.wsdl2java.generate; + +import junit.framework.TestCase; + +/** + * Test case for WSDL2Java + */ +public class WSDL2JavaGeneratorTestCase extends TestCase { + + + public void testAccountService() { + + String basedir = System.getProperty("basedir"); + if (basedir == null) + basedir = "."; + + String[] args = + new String[] {"-targetDirectory", basedir + "/target/wsdl2java-source", + "-javaPackage", "org.apache.tuscany.tools.wsdl2java.generate.account", + basedir + "/src/test/resources/AccountService.wsdl"}; + + WSDL2JavaGenerator.main(args); + + } + + /** + * Test WSDL with faults + * Sample WSDL originated from BigBank and Tuscany 978 + */ + public void testAccountServiceWithFaults() { + + String basedir = System.getProperty("basedir"); + if (basedir == null) + basedir = "."; + + String[] args = + new String[] {"-targetDirectory", basedir + "/target/wsdl2java-source", + "-javaPackage", "org.apache.tuscany.tools.wsdl2java.generate.account", + basedir + "/src/test/resources/AccountServiceWithFault.wsdl"}; + + WSDL2JavaGenerator.main(args); + + } + + /** + * Test Interopdoc WSDL + */ + public void testInteropdocWsdl() { + + String basedir = System.getProperty("basedir"); + if (basedir == null) + basedir = "."; + + String[] args = + new String[] {"-targetDirectory", basedir + "/target/wsdl2java-source", + "-javaPackage", "org.apache.tuscany.tools.wsdl2java.generate.account", + basedir + "/src/test/resources/interopdoc.wsdl"}; + + WSDL2JavaGenerator.main(args); + + } +} diff --git a/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/java/org/soapinterop/CreditScoreDocLit.java b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/java/org/soapinterop/CreditScoreDocLit.java new file mode 100644 index 0000000000..e9e8aa882a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/java/org/soapinterop/CreditScoreDocLit.java @@ -0,0 +1,25 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.soapinterop; + +public interface CreditScoreDocLit { + public org.example.creditscore.doclit.CreditReport getCreditScore( + org.example.creditscore.doclit.Customer param0) throws java.rmi.RemoteException; + } + diff --git a/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/AccountService.wsdl b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/AccountService.wsdl new file mode 100644 index 0000000000..6f2fed1e2a --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/AccountService.wsdl @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl new file mode 100644 index 0000000000..dda5a36085 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/CreditScoreDocLit.wsdl b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/CreditScoreDocLit.wsdl new file mode 100644 index 0000000000..09d1a58589 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/CreditScoreDocLit.wsdl @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/helloworld.wsdl b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/helloworld.wsdl new file mode 100644 index 0000000000..051f604bb2 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/helloworld.wsdl @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/interopdoc.wsdl b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/interopdoc.wsdl new file mode 100644 index 0000000000..820c26ca34 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/interopdoc.wsdl @@ -0,0 +1,180 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/sequences.xsd b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/sequences.xsd new file mode 100644 index 0000000000..a565f3fa65 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.3.1/tools/wsdl2java/src/test/resources/sequences.xsd @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3