tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lrese...@apache.org
Subject svn commit: r567550 - in /incubator/tuscany/java/sca/modules: java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/ wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/ wsdl2java/src/main/resources/ wsdl2java/src/test/jav...
Date Mon, 20 Aug 2007 06:00:10 GMT
Author: lresende
Date: Sun Aug 19 23:00:07 2007
New Revision: 567550

URL: http://svn.apache.org/viewvc?rev=567550&view=rev
Log:
TUSCANY-978 - Adding support for faults, compliant with JAXWS spec.  New testcase using provided
wsdl also added for validation purposes.

Added:
    incubator/tuscany/java/sca/modules/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl
  (with props)
Modified:
    incubator/tuscany/java/sca/modules/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java
    incubator/tuscany/java/sca/modules/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceGenerator.java
    incubator/tuscany/java/sca/modules/wsdl2java/src/main/resources/RemotableInterfaceTemplate.xsl
    incubator/tuscany/java/sca/modules/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java

Modified: incubator/tuscany/java/sca/modules/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java?rev=567550&r1=567549&r2=567550&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/java2wsdl/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java
Sun Aug 19 23:00:07 2007
@@ -27,84 +27,78 @@
  */
 public class TuscanyJava2WSDLTestCase extends TestCase {
 
-	/**
-	 * setup the pre-requisites for the test case to run
-	 * 
-	 * @exception Exception
-	 */
-	@Override
+    /**
+     * setup the pre-requisites for the test case to run
+     * 
+     * @exception Exception
+     */
+    @Override
     protected void setUp() throws Exception {
-		// System.out.println("inside setup");
-		super.setUp();
-	}
-
-	/**
-	 * @exception Exception
-	 */
-	@Override
+        super.setUp();
+    }
+
+    /**
+     * @exception Exception
+     */
+    @Override
     protected void tearDown() throws Exception {
-		// System.out.println("inside tearDown");
-		super.tearDown();
-	}
-
-   
-	/**
-	 * Simple WSDL generation test.
-	 */
-	public void testSimpleWSDLGeneration() {
-		String[] arguments = new String[] { "-cn","org.apache.tuscany.tools.java2wsdl.generate.CustomerValue",
-				"-o", "target/java2wsdl-source",
-                "-xc", "org.apache.tuscany.tools.java2wsdl.generate.extra.GoldCustomer"};
-                
-
-		Java2WSDL.main(arguments);
-
-		File file = new File("target/java2wsdl-source/CustomerValue.wsdl");
-		assertTrue(file.exists() && file.isFile());
-	}
-
-	/**
-	 * Test WSDL generation where a parameter Object[] is involved.
-	 */
-	public void testWsdlGeneration2() {
-
-		String[] arguments = new String[] 
-        {
-				"-cn",
-				"org.apache.tuscany.tools.java2wsdl.generate.CustomerWithAccount",
-				"-o", "target/java2wsdl-source", };
-		Java2WSDL.main(arguments);
-
-		File file = new File("target/java2wsdl-source/CustomerWithAccount.wsdl");
-		assertTrue(file.exists() && file.isFile());
-	}
-
-    public void testWsdlGeneration_SDO_Static()
-    {
-        //tests for SDOs where XSD exist.  Hence no XSDs must be generated
-        String[] arguments = new String[] {
-                "-cn",
-                "org.soapinterop.CreditScoreDocLit",
-                "-o", "target/java2wsdl-source", 
-                "-ixsd", "[http://www.example.org/creditscore/doclit/," +
-                "http://www.example.org/creditscore/doclit/xsd]"};
+        super.tearDown();
+    }
+
+    /**
+     * Simple WSDL generation test.
+     */
+    public void testSimpleWSDLGeneration() {
+        String[] arguments =
+            new String[] {"-cn", "org.apache.tuscany.tools.java2wsdl.generate.CustomerValue",

+                          "-o", "target/java2wsdl-source", "-xc",
+                          "org.apache.tuscany.tools.java2wsdl.generate.extra.GoldCustomer"};
+
+        Java2WSDL.main(arguments);
+
+        File file = new File("target/java2wsdl-source/CustomerValue.wsdl");
+        assertTrue(file.exists() && file.isFile());
+    }
+
+    /**
+     * Test WSDL generation where a parameter Object[] is involved.
+     */
+    public void testWsdlGeneration2() {
+
+        String[] arguments =
+            new String[] {"-cn", "org.apache.tuscany.tools.java2wsdl.generate.CustomerWithAccount",

+                          "-o", "target/java2wsdl-source",};
+        Java2WSDL.main(arguments);
+
+        File file = new File("target/java2wsdl-source/CustomerWithAccount.wsdl");
+        assertTrue(file.exists() && file.isFile());
+    }
+
+    public void testWsdlGeneration_SDO_Static() {
+        // tests for SDOs where XSD exist. Hence no XSDs must be generated
+        String[] arguments =
+            new String[] {
+                          "-cn",
+                          "org.soapinterop.CreditScoreDocLit",
+                          "-o",
+                          "target/java2wsdl-source",
+                          "-ixsd",
+                          "[http://www.example.org/creditscore/doclit/," + "http://www.example.org/creditscore/doclit/xsd]"};
         Java2WSDL.main(arguments);
 
         File file = new File("target/java2wsdl-source/CreditScoreDocLit.wsdl");
         assertTrue(file.exists() && file.isFile());
     }
-    
-    
-    
-	/**
-	 * Test WSDL generation from a java interface and then generate the java
-	 * interface using the generated WSDL.
-	 */
-	public void _testRoundTrip() {
-		// TODO implement round trip
-		// this should re-generate java interfaces from the generated wsdl
-		// and compile (?) the generated java code.
-		// fail();
 
-	}
+    /**
+     * Test WSDL generation from a java interface and then generate the java
+     * interface using the generated WSDL.
+     */
+    public void _testRoundTrip() {
+        // TODO implement round trip
+        // this should re-generate java interfaces from the generated wsdl
+        // and compile (?) the generated java code.
+        // fail();
+
+    }
 }

Modified: incubator/tuscany/java/sca/modules/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceGenerator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceGenerator.java?rev=567550&r1=567549&r2=567550&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceGenerator.java
(original)
+++ incubator/tuscany/java/sca/modules/wsdl2java/src/main/java/org/apache/tuscany/tools/wsdl2java/generate/JavaInterfaceGenerator.java
Sun Aug 19 23:00:07 2007
@@ -181,22 +181,21 @@
     public void generate() throws CodeGenerationException {
         try {
             for (int i = 0; i < codegenExtensions.size(); i++) {
-                //CodeGenExtension 
+                // CodeGenExtension
                 Object[] pair = (Object[])codegenExtensions.get(i);
-                
-                CodeGenExtension cge= (CodeGenExtension) pair[0];
-                CodeGenConfiguration cgf= (CodeGenConfiguration)pair[1];
-                
+
+                CodeGenExtension cge = (CodeGenExtension)pair[0];
+                CodeGenConfiguration cgf = (CodeGenConfiguration)pair[1];
+
                 cge.engage(cgf);
-               
             }
 
-            for(CodeGenConfiguration codegenConfiguration : codegenConfigurations){
-            JavaInterfaceEmitter emitter = new JavaInterfaceEmitter();
-            emitter.setCodeGenConfiguration(codegenConfiguration);
-            emitter.setMapper(codegenConfiguration.getTypeMapper());
+            for (CodeGenConfiguration codegenConfiguration : codegenConfigurations) {
+                JavaInterfaceEmitter emitter = new JavaInterfaceEmitter();
+                emitter.setCodeGenConfiguration(codegenConfiguration);
+                emitter.setMapper(codegenConfiguration.getTypeMapper());
 
-            emitter.writeInterface(false);
+                emitter.writeInterface(false);
             }
 
         } catch (Exception e) {
@@ -206,24 +205,24 @@
 
     /**
      * Read the WSDL file
+     * 
      * @param uri
      * @return
      * @throws WSDLException
      */
     private Definition readWSDL(String uri) throws WSDLException {
 
-        WSDLReader reader =
-                WSDLFactory.newInstance().newWSDLReader();
+        WSDLReader reader = WSDLFactory.newInstance().newWSDLReader();
         reader.setFeature("javax.wsdl.importDocuments", true);
 
         File file = new File(uri);
         String baseURI;
 
-        if (uri.startsWith("http://")){
+        if (uri.startsWith("http://")) {
             baseURI = uri;
-        } else{
-            if(file.getParentFile() == null){
-               try {
+        } else {
+            if (file.getParentFile() == null) {
+                try {
                     baseURI = new File(".").getCanonicalFile().toURI().toString();
                 } catch (IOException e) {
                     throw new RuntimeException(e);
@@ -237,13 +236,9 @@
         try {
             doc = XMLUtils.newDocument(uri);
         } catch (ParserConfigurationException e) {
-            throw new WSDLException(WSDLException.PARSER_ERROR,
-                    "Parser Configuration Error",
-                    e);
+            throw new WSDLException(WSDLException.PARSER_ERROR, "Parser Configuration Error",
e);
         } catch (SAXException e) {
-            throw new WSDLException(WSDLException.PARSER_ERROR,
-                    "Parser SAX Error",
-                    e);
+            throw new WSDLException(WSDLException.PARSER_ERROR, "Parser SAX Error", e);
 
         } catch (IOException e) {
             throw new WSDLException(WSDLException.INVALID_WSDL, "IO Error", e);
@@ -251,6 +246,7 @@
 
         return reader.readWSDL(baseURI, doc);
     }
+    
     private void generateFaults(String packageName, PortType portType, Map<QName, SDODataBindingTypeMappingEntry>
typeMapping) 
         throws CodeGenerationException{
         

Modified: incubator/tuscany/java/sca/modules/wsdl2java/src/main/resources/RemotableInterfaceTemplate.xsl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/wsdl2java/src/main/resources/RemotableInterfaceTemplate.xsl?rev=567550&r1=567549&r2=567550&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/wsdl2java/src/main/resources/RemotableInterfaceTemplate.xsl
(original)
+++ incubator/tuscany/java/sca/modules/wsdl2java/src/main/resources/RemotableInterfaceTemplate.xsl
Sun Aug 19 23:00:07 2007
@@ -59,13 +59,16 @@
          <xsl:if test="$isSync='1'">
         /**
          * Auto generated method signatures
-         <xsl:for-each select="input/param[@type!='']">* @param <xsl:value-of select="@name"></xsl:value-of></xsl:for-each>
+         <xsl:for-each select="input/param[@type!='']">* @param <xsl:value-of select="@name"></xsl:value-of><xsl:text>&#10;
        </xsl:text></xsl:for-each>
+         <xsl:for-each select="fault/param[@name!='']">* @throws <xsl:value-of select="@name"></xsl:value-of><xsl:text>&#10;
        *</xsl:text></xsl:for-each>
          */
          public <xsl:choose><xsl:when test="$outputtype=''">void</xsl:when><xsl:otherwise><xsl:value-of
select="$outputtype"/></xsl:otherwise></xsl:choose>
         <xsl:text> </xsl:text><xsl:value-of select="@name"/>(
          <xsl:for-each select="input/param[@type!='']">
             <xsl:if test="position()>1">,</xsl:if><xsl:value-of select="@type"/><xsl:text>
</xsl:text><xsl:value-of select="@name"/>
-          </xsl:for-each>) throws java.rmi.RemoteException;
+          </xsl:for-each>) <xsl:for-each select="fault/param[@name!='']">
+            <xsl:if test="position()=1">throws </xsl:if><xsl:if test="position()>1">,</xsl:if><xsl:text>
</xsl:text><xsl:value-of select="@name"/>
+          </xsl:for-each>;
         <!-- end of the sync block -->
         </xsl:if>
 
@@ -73,14 +76,17 @@
         <xsl:if test="$isAsync='1'">
          /**
           * Auto generated method signature
-          <xsl:for-each select="input/param"><xsl:if test="@type!=''">* @param
<xsl:value-of select="@name"></xsl:value-of></xsl:if></xsl:for-each>
+         <xsl:for-each select="input/param[@type!='']">* @param <xsl:value-of select="@name"></xsl:value-of><xsl:text>&#10;
        </xsl:text></xsl:for-each>
+         <xsl:for-each select="fault/param[@name!='']">* @throws <xsl:value-of select="@name"></xsl:value-of><xsl:text>&#10;
        *</xsl:text></xsl:for-each>
           */
 
         public void start<xsl:value-of select="@name"/>(
          <xsl:variable name="paramCount"><xsl:value-of select="count(input/param[@type!=''])"></xsl:value-of></xsl:variable>
                <xsl:for-each select="input/param">
             <xsl:if test="@type!=''"><xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"></xsl:value-of></xsl:if></xsl:for-each>
-           <xsl:if test="$paramCount>0">,</xsl:if>final <xsl:value-of select="$package"/>.<xsl:value-of
select="$callbackname"/> callback) throws java.rmi.RemoteException;
+           <xsl:if test="$paramCount>0">,</xsl:if>final <xsl:value-of select="$package"/>.<xsl:value-of
select="$callbackname"/> callback) <xsl:for-each select="fault/param[@name!='']">
+            <xsl:if test="position()=1">throws </xsl:if><xsl:if test="position()>1">,</xsl:if><xsl:text>
</xsl:text><xsl:value-of select="@name"/>
+          </xsl:for-each>;
         </xsl:if>
        <!-- end of async block-->
 
@@ -91,16 +97,17 @@
        <!-- For in-only meps there would not be any asynchronous methods since there is
no output -->
          /**
          * Auto generated method signature
-         <xsl:for-each select="input/param">
-         <xsl:if test="@type!=''">*@param <xsl:value-of select="@name"></xsl:value-of><xsl:text>
-         </xsl:text></xsl:if></xsl:for-each>
+         <xsl:for-each select="input/param[@type!='']">* @param <xsl:value-of select="@name"></xsl:value-of><xsl:text>&#10;
        </xsl:text></xsl:for-each>
+         <xsl:for-each select="fault/param[@name!='']">* @throws <xsl:value-of select="@name"></xsl:value-of><xsl:text>&#10;
        *</xsl:text></xsl:for-each>
          */
          public  void
         <xsl:text> </xsl:text><xsl:value-of select="@name"/>(
          <xsl:for-each select="input/param">
             <xsl:if test="@type!=''"><xsl:if test="position()>1">,</xsl:if><xsl:value-of
select="@type"/><xsl:text> </xsl:text><xsl:value-of select="@name"/>
             </xsl:if>
-         </xsl:for-each>) throws java.rmi.RemoteException;
+         </xsl:for-each>) <xsl:for-each select="fault/param[@name!='']">
+            <xsl:if test="position()=1">throws </xsl:if><xsl:if test="position()>1">,</xsl:if><xsl:text>
</xsl:text><xsl:value-of select="@name"/>
+          </xsl:for-each>;
 
         </xsl:if>
        </xsl:for-each>

Modified: incubator/tuscany/java/sca/modules/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java?rev=567550&r1=567549&r2=567550&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java
(original)
+++ incubator/tuscany/java/sca/modules/wsdl2java/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java
Sun Aug 19 23:00:07 2007
@@ -24,22 +24,38 @@
  * 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/AccountService.wsdl"};
+            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);
-        
+
     }
-    
-    
 }

Added: incubator/tuscany/java/sca/modules/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl?rev=567550&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl
(added)
+++ incubator/tuscany/java/sca/modules/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl
Sun Aug 19 23:00:07 2007
@@ -0,0 +1,475 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ * 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.    
+-->
+<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+	xmlns:account="http://www.bigbank.com/account"
+	targetNamespace="http://www.bigbank.com/account"
+	name="AccountServiceWithFault">
+
+	<wsdl:types>
+		<xsd:schema targetNamespace="http://www.bigbank.com/account"
+			xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+			xmlns:account="http://www.bigbank.com/account">
+			
+			<xsd:element name="getAccountReport">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="customerID"
+							type="xsd:int" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="getAccountReportResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="accountReport"
+							type="account:AccountReport" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+
+			<xsd:complexType name="AccountReport">
+				<xsd:sequence>
+					<xsd:element name="accountSummaries"
+						type="account:AccountSummary" maxOccurs="unbounded" />
+					<xsd:element name="stockSummaries"
+						type="account:StockSummary" maxOccurs="unbounded" />
+				</xsd:sequence>
+			</xsd:complexType>
+			<xsd:complexType name="AccountSummary">
+				<xsd:attribute name="accountNumber" type="xsd:string" />
+				<xsd:attribute name="accountType" type="xsd:string" />
+				<xsd:attribute name="balance" type="xsd:float" />
+			</xsd:complexType>
+
+			<xsd:complexType name="StockSummary">
+			    <!-- xsd:attribute name="id" type="xsd:int" / -->
+				<xsd:attribute name="purchaseLotNumber" type="xsd:int" />
+				<!-- unique id for this purchase -->
+				<xsd:attribute name="symbol" type="xsd:string" />
+				<xsd:attribute name="quantity" type="xsd:int" />
+				<xsd:attribute name="purchaseDate" type="xsd:dateTime" />
+				<xsd:attribute name="purchasePrice" type="xsd:float" />
+				<xsd:attribute name="currentPrice" type="xsd:float" />
+				<xsd:attribute name="company" type="xsd:string" />
+				<xsd:attribute name="highPrice" type="xsd:float" />
+				<xsd:attribute name="lowPrice" type="xsd:float" />
+				
+			</xsd:complexType>
+
+			<!-- Profile in data base  -->
+			<xsd:element name="getCustomerProfile">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="loginID" type="xsd:string" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+
+			<xsd:complexType name="CustomerProfileData">
+				<xsd:sequence>
+					<xsd:element name="firstName" type="xsd:string" />
+					<xsd:element name="lastName" type="xsd:string" />
+					<xsd:element name="address" type="xsd:string" />
+					<xsd:element name="email" type="xsd:string" />
+					<xsd:element name="loginID" type="xsd:string" />
+					<xsd:element name="password" type="xsd:string" />
+					<xsd:element name="id" type="xsd:int" />
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:element name="getCustomerProfileResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="customerProfile"
+							type="account:CustomerProfileData" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+
+			<xsd:element name="withdraw">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="accountNumber"
+							type="xsd:string" />
+						<xsd:element name="amount" type="xsd:float" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="withdrawResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="balance" type="xsd:float" />
+					</xsd:sequence>
+				</xsd:complexType>
+                        </xsd:element>
+                        <!-- @start added fault -->
+                        <xsd:element name="insufficientFundsFault">
+                            <xsd:complexType name="insufficientFundsFault">
+                                <xsd:sequence>
+                                    <xsd:element name="message" type="xsd:string"/>
+                                </xsd:sequence>
+                            </xsd:complexType>
+                        </xsd:element>
+                        <!-- @end added fault -->
+
+			<xsd:element name="deposit">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="accountNumber"
+							type="xsd:string" />
+						<xsd:element name="amount" type="xsd:float" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="depositResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="balance" type="xsd:float" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+
+			<xsd:element name="purchaseStock">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="id" type="xsd:int" />
+						<xsd:element name="stock" type="account:StockSummary" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+
+			<xsd:element name="purchaseStockResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="purchaseSummary"
+							type="account:StockSummary" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+
+
+
+			<xsd:element name="sellStock">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="purchaseLotNumber"
+							type="xsd:int" /><!-- unique id for this purchase -->
+						<xsd:element name="quantity" type="xsd:int" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+
+			<xsd:element name="createAccount">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="customerProfile"
+							type="account:CustomerProfileData" />
+                        <xsd:element name="createSavings"
+							type="xsd:boolean" />
+                        <xsd:element name="createCheckings"
+							type="xsd:boolean" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>	
+			<xsd:element name="createAccountResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="customerProfile"
+							type="account:CustomerProfileData" />
+					</xsd:sequence>
+				</xsd:complexType>
+				
+			</xsd:element>
+
+			<xsd:element name="getAccountLog">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="customerID"
+							type="xsd:int" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+			<xsd:element name="getAccountLogResponse">
+				<xsd:complexType>
+					<xsd:sequence>
+						<xsd:element name="accountLog"
+							type="account:AccountLog" />
+					</xsd:sequence>
+				</xsd:complexType>
+			</xsd:element>
+
+			<xsd:complexType name="AccountLog">
+				<xsd:sequence>
+					<xsd:element name="accountLogEntries"
+						type="account:AccountLogEntry" maxOccurs="unbounded" />
+					<xsd:element name="stockLogEntries"
+						type="account:StockLogEntry" maxOccurs="unbounded" />
+						
+				</xsd:sequence>
+			</xsd:complexType>
+
+			<xsd:complexType name="AccountLogEntry">
+				<xsd:attribute name="logSeqNo" type="xsd:int" />
+				<xsd:attribute name="id" type="xsd:int" />
+				<xsd:attribute name="accountNumber" type="xsd:string" />
+				<xsd:attribute name="actionType" type="xsd:string" />
+				<xsd:attribute name="amount" type="xsd:float" />
+			</xsd:complexType>
+
+			<xsd:complexType name="StockLogEntry">
+				<xsd:attribute name="logSeqNo" type="xsd:int" />
+				<xsd:attribute name="id" type="xsd:int" />
+				<xsd:attribute name="symbol" type="xsd:string" />
+				<xsd:attribute name="quantity" type="xsd:int" />
+				<xsd:attribute name="actionType" type="xsd:string" />
+				<xsd:attribute name="purchaseLotNumber" type="xsd:int" />
+			</xsd:complexType>
+
+		</xsd:schema>
+	</wsdl:types>
+	<wsdl:message name="getAccountReportRequest">
+		<wsdl:part element="account:getAccountReport"
+			name="getAccountReportRequest" />
+	</wsdl:message>
+	<wsdl:message name="getAccountReportResponse">
+		<wsdl:part element="account:getAccountReportResponse"
+			name="getAccountReportResponse" />
+	</wsdl:message>
+
+	<wsdl:message name="getCustomerProfileRequest">
+		<wsdl:part element="account:getCustomerProfile"
+			name="getCustomerProfile" />
+	</wsdl:message>
+	<wsdl:message name="getCustomerProfileResponse">
+		<wsdl:part element="account:getCustomerProfileResponse"
+			name="getCustomerProfileResponse" />
+	</wsdl:message>
+
+	<wsdl:message name="withdrawRequest">
+		<wsdl:part element="account:withdraw" name="withdrawRequest" />
+	</wsdl:message>
+
+	<wsdl:message name="withdrawResponse">
+		<wsdl:part element="account:withdrawResponse"
+			name="withdrawResponse" />
+        </wsdl:message>
+
+        <!-- @start added fault -->
+        <wsdl:message name="insufficientFundsFault">
+            <wsdl:part element="account:insufficientFundsFault" name="insufficientFundsFault"
/>
+        </wsdl:message>
+        <!-- @end added fault -->
+
+	<wsdl:message name="depositRequest">
+		<wsdl:part element="account:deposit" name="depositRequest" />
+	</wsdl:message>
+
+	<wsdl:message name="depositResponse">
+		<wsdl:part element="account:depositResponse"
+			name="depositResponse" />
+	</wsdl:message>
+
+	<wsdl:message name="purchaseStockRequest">
+		<wsdl:part element="account:purchaseStock"
+			name="purchaseStockRequest" />
+	</wsdl:message>
+
+	<wsdl:message name="purchaseStockResponse">
+		<wsdl:part element="account:purchaseStockResponse"
+			name="purchaseStockResponse" />
+	</wsdl:message>
+
+	<wsdl:message name="sellStockRequest">
+		<wsdl:part element="account:sellStock" name="sellStockRequest" />
+	</wsdl:message>
+	
+	<wsdl:message name="createAccountRequest">
+		<wsdl:part element="account:createAccount" name="createAccountRequest" />
+	</wsdl:message>
+
+	<wsdl:message name="createAccountResponse">
+		<wsdl:part element="account:createAccountResponse" name="createAccountResponse" />
+	</wsdl:message>
+
+	<wsdl:message name="getAccountLogRequest">
+		<wsdl:part element="account:getAccountLog"
+			name="getAccountLogRequest" />
+	</wsdl:message>
+	
+	<wsdl:message name="getAccountLogResponse">
+		<wsdl:part element="account:getAccountLogResponse"
+			name="getAccountLogResponse" />
+	</wsdl:message>
+
+	<wsdl:portType name="AccountServiceWithFault">
+		<wsdl:operation name="getAccountReport">
+			<wsdl:input message="account:getAccountReportRequest" />
+			<wsdl:output message="account:getAccountReportResponse" />
+		</wsdl:operation>
+
+		<wsdl:operation name="getCustomerProfile">
+			<wsdl:input message="account:getCustomerProfileRequest" />
+			<wsdl:output message="account:getCustomerProfileResponse" />
+		</wsdl:operation>
+
+		<wsdl:operation name="withdraw">
+			<wsdl:input message="account:withdrawRequest" />
+                        <wsdl:output message="account:withdrawResponse" />
+                        <!-- @start added fault -->
+                        <wsdl:fault message="account:insufficientFundsFault" name="insufficientFundsFault"/>
+                        <!-- @end added fault -->
+		</wsdl:operation>
+
+		<wsdl:operation name="deposit">
+			<wsdl:input message="account:depositRequest" />
+			<wsdl:output message="account:depositResponse" />
+		</wsdl:operation>
+
+		<wsdl:operation name="purchaseStock">
+			<wsdl:input message="account:purchaseStockRequest" />
+			<wsdl:output message="account:purchaseStockResponse" />
+		</wsdl:operation>
+
+		<wsdl:operation name="sellStock">
+			<wsdl:input message="account:sellStockRequest" />
+			<wsdl:output message="account:purchaseStockResponse" />
+		</wsdl:operation>
+
+
+		<wsdl:operation name="createAccount">
+			<wsdl:input message="account:createAccountRequest" />
+			<wsdl:output message="account:createAccountResponse" />
+		</wsdl:operation>
+
+		<wsdl:operation name="getAccountLog">
+			<wsdl:input message="account:getAccountLogRequest" />
+			<wsdl:output message="account:getAccountLogResponse" />
+		</wsdl:operation>
+
+	</wsdl:portType>
+
+
+
+	<wsdl:binding name="AccountServiceWithFaultSOAP" type="account:AccountServiceWithFault">
+		<soap:binding style="document"
+			transport="http://schemas.xmlsoap.org/soap/http" />
+		<wsdl:operation name="getAccountReport">
+			<soap:operation
+				soapAction="http://www.bigbank.com/account/getAccountReport" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+		<wsdl:operation name="getCustomerProfile">
+			<soap:operation
+				soapAction="http://www.bigbank.com/account/getCustomerProfile" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+
+		<wsdl:operation name="withdraw">
+			<soap:operation
+				soapAction="http://www.bigbank.com/account/withdraw" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+                        </wsdl:output>
+                        <!-- @start added fault -->
+                        <wsdl:fault name="insufficientFundsFault">
+                            <soap:fault name="insufficientFundsFault" use="literal"/>
+                        </wsdl:fault>
+                        <!-- @end added fault -->
+		</wsdl:operation>
+
+		<wsdl:operation name="deposit">
+			<soap:operation
+				soapAction="http://www.bigbank.com/account/deposit" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+
+		<wsdl:operation name="purchaseStock">
+			<soap:operation
+				soapAction="http://www.bigbank.com/account/purchaseStock" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+
+		<wsdl:operation name="sellStock">
+			<soap:operation
+				soapAction="http://www.bigbank.com/account/sellStock" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+
+		<wsdl:operation name="createAccount">
+			<soap:operation
+				soapAction="http://www.bigbank.com/account/createAccount" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+
+		<wsdl:operation name="getAccountLog">
+			<soap:operation
+				soapAction="http://www.bigbank.com/account/getAccountLog" />
+			<wsdl:input>
+				<soap:body use="literal" />
+			</wsdl:input>
+			<wsdl:output>
+				<soap:body use="literal" />
+			</wsdl:output>
+		</wsdl:operation>
+
+	</wsdl:binding>
+	<wsdl:service name="AccountServiceWithFault">
+		<wsdl:port binding="account:AccountServiceWithFaultSOAP"
+			name="AccountServiceSOAP">
+			<soap:address
+				location="http://localhost:8080/sample-bigbank-account/services/AccountServiceWithFault"
/>
+		</wsdl:port>
+	</wsdl:service>
+</wsdl:definitions>

Propchange: incubator/tuscany/java/sca/modules/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: incubator/tuscany/java/sca/modules/wsdl2java/src/test/resources/AccountServiceWithFault.wsdl
------------------------------------------------------------------------------
    svn:mime-type = text/xml



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message