From bdd0a41aed7edf21ec2a65cfa17a86af2ef8c48a Mon Sep 17 00:00:00 2001
From: dims
Date: Tue, 17 Jun 2008 00:23:01 +0000
Subject: Move Tuscany from Incubator to top level.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@668359 13f79535-47bb-0310-9956-ffa450edef68
---
.../tools/java2wsdl/generate/CustomerValue.java | 43 ++
.../java2wsdl/generate/CustomerWithAccount.java | 49 ++
.../generate/TuscanyJava2WSDLTestCase.java | 108 +++
.../tools/java2wsdl/generate/account/Account.java | 53 ++
.../java2wsdl/generate/customer/Customer.java | 30 +
.../java2wsdl/generate/extra/GoldCustomer.java | 36 +
.../generate/WSDL2JavaGeneratorTestCase.java | 44 ++
.../example/creditscore/doclit/CreditReport.java | 189 +++++
.../org/example/creditscore/doclit/Customer.java | 315 ++++++++
.../example/creditscore/doclit/DoclitFactory.java | 159 ++++
.../example/creditscore/doclit/DoclitPackage.java | 808 +++++++++++++++++++++
.../java/org/soapinterop/CreditScoreDocLit.java | 25 +
.../tools/src/test/resources/AccountService.wsdl | 242 ++++++
.../sca/tools/src/test/resources/helloworld.wsdl | 121 +++
.../sca/tools/src/test/resources/interopdoc.wsdl | 180 +++++
.../sca/tools/src/test/resources/sequences.xsd | 100 +++
16 files changed, 2502 insertions(+)
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerValue.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerWithAccount.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/account/Account.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/customer/Customer.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/extra/GoldCustomer.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/CreditReport.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/Customer.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/DoclitFactory.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/DoclitPackage.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/java/org/soapinterop/CreditScoreDocLit.java
create mode 100644 branches/sca-java-M2/sca/tools/src/test/resources/AccountService.wsdl
create mode 100644 branches/sca-java-M2/sca/tools/src/test/resources/helloworld.wsdl
create mode 100644 branches/sca-java-M2/sca/tools/src/test/resources/interopdoc.wsdl
create mode 100644 branches/sca-java-M2/sca/tools/src/test/resources/sequences.xsd
(limited to 'branches/sca-java-M2/sca/tools/src/test')
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerValue.java b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerValue.java
new file mode 100644
index 0000000000..e679496509
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerValue.java
@@ -0,0 +1,43 @@
+/*
+ * 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.java2wsdl.generate;
+
+import org.apache.tuscany.tools.java2wsdl.generate.customer.Customer;
+
+public class CustomerValue {
+
+ public int getValue(String custId, String stockSymbol) {
+ return 0;
+ }
+
+ public Customer getCustomerDetails(String custId) {
+ return new Customer();
+ }
+
+ public String noArgsServiceMethod()
+ {
+ return new String();
+ }
+
+ private void privateServiceMethod()
+ {
+
+ }
+
+}
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerWithAccount.java b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerWithAccount.java
new file mode 100644
index 0000000000..4b5a795f2c
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/CustomerWithAccount.java
@@ -0,0 +1,49 @@
+/*
+ * 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.java2wsdl.generate;
+
+import org.apache.tuscany.tools.java2wsdl.generate.account.Account;
+import org.apache.tuscany.tools.java2wsdl.generate.customer.Customer;
+
+public class CustomerWithAccount {
+
+ private Customer customer = new Customer();
+
+ private Account[] accounts;
+
+ public int getValue(String custId, String stockSymbol) {
+ return 123;
+ }
+
+ public Customer getCustomerDetails(String custId) {
+ return customer;
+ }
+
+ public Account getCustomerAccount(String custId, String accountId) {
+ return accounts[0];
+ }
+
+ public Account[] getAccounts() {
+ return accounts;
+ }
+
+ public void setAccounts(Account[] accounts) {
+ this.accounts = accounts;
+ }
+}
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java
new file mode 100644
index 0000000000..a72321c9b1
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/TuscanyJava2WSDLTestCase.java
@@ -0,0 +1,108 @@
+/*
+ * 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.java2wsdl.generate;
+
+import java.io.File;
+
+import junit.framework.TestCase;
+
+/**
+ * A JUnit test case to test the Tuscany Java 2 WSDL Generation
+ */
+public class TuscanyJava2WSDLTestCase extends TestCase {
+
+ /**
+ * setup the pre-requisites for the test case to run
+ *
+ * @exception Exception
+ */
+ protected void setUp() throws Exception {
+ // System.out.println("inside setup");
+ super.setUp();
+ }
+
+ /**
+ * @exception Exception
+ */
+ 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]"};
+ 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();
+
+ }
+}
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/account/Account.java b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/account/Account.java
new file mode 100644
index 0000000000..84d59164ee
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/account/Account.java
@@ -0,0 +1,53 @@
+/*
+ * 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.java2wsdl.generate.account;
+
+import java.math.BigDecimal;
+
+public class Account {
+ int accountType;
+
+ String accountNo;
+
+ BigDecimal balance;
+
+ public String getAccountNo() {
+ return accountNo;
+ }
+
+ public void setAccountNo(String accountNo) {
+ this.accountNo = accountNo;
+ }
+
+ public int getAccountType() {
+ return accountType;
+ }
+
+ public void setAccountType(int accountType) {
+ this.accountType = accountType;
+ }
+
+ public BigDecimal getBalance() {
+ return balance;
+ }
+
+ public void setBalance(BigDecimal balance) {
+ this.balance = balance;
+ }
+}
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/customer/Customer.java b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/customer/Customer.java
new file mode 100644
index 0000000000..a28399e7fe
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/customer/Customer.java
@@ -0,0 +1,30 @@
+/*
+ * 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.java2wsdl.generate.customer;
+
+public class Customer {
+ private String name = "";
+
+ public int custType = 0;
+
+ public String getName() {
+ return name;
+ }
+}
+
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/extra/GoldCustomer.java b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/extra/GoldCustomer.java
new file mode 100644
index 0000000000..afc68a3217
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/java2wsdl/generate/extra/GoldCustomer.java
@@ -0,0 +1,36 @@
+/*
+ * 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.java2wsdl.generate.extra;
+
+import org.apache.tuscany.tools.java2wsdl.generate.customer.Customer;
+
+
+
+
+public class GoldCustomer extends Customer {
+ public String goldCustNumber = "";
+
+ public String getGoldCustNumber() {
+ return goldCustNumber;
+ }
+
+ public void setGoldCustNumber(String goldCustNumber) {
+ this.goldCustNumber = goldCustNumber;
+ }
+}
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java
new file mode 100644
index 0000000000..c3467cbabc
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/apache/tuscany/tools/wsdl2java/generate/WSDL2JavaGeneratorTestCase.java
@@ -0,0 +1,44 @@
+/*
+ * 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);
+
+ }
+
+
+}
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/CreditReport.java b/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/CreditReport.java
new file mode 100644
index 0000000000..7986ead297
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/CreditReport.java
@@ -0,0 +1,189 @@
+/*
+ * 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.example.creditscore.doclit;
+
+import org.apache.tuscany.sdo.impl.DataObjectImpl;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ *
+ * A representation of the model object 'Credit Report'.
+ *
+ *
+ *
+ *
+ * @generated
+ */
+public class CreditReport extends DataObjectImpl
+{
+ /**
+ * The default value of the '{@link #getScore() Score}' attribute.
+ *
+ *
+ * @see #getScore()
+ * @generated
+ * @ordered
+ */
+ protected static final int SCORE_EDEFAULT = 0;
+
+ /**
+ * The cached value of the '{@link #getScore() Score}' attribute.
+ *
+ *
+ * @see #getScore()
+ * @generated
+ * @ordered
+ */
+ protected int score = SCORE_EDEFAULT;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected CreditReport()
+ {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected EClass eStaticClass()
+ {
+ return DoclitPackage.Literals.CREDIT_REPORT;
+ }
+
+ /**
+ * Returns the value of the 'Score' attribute.
+ *
+ *
+ * If the meaning of the 'Score' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Score' attribute.
+ * @see #setScore(int)
+ * @generated
+ */
+ public int getScore()
+ {
+ return score;
+ }
+
+ /**
+ * Sets the value of the '{@link org.example.creditscore.doclit.CreditReport#getScore Score}' attribute.
+ *
+ *
+ * @param value the new value of the 'Score' attribute.
+ * @see #getScore()
+ * @generated
+ */
+ public void setScore(int newScore)
+ {
+ score = newScore;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case DoclitPackage.CREDIT_REPORT__SCORE:
+ return new Integer(getScore());
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case DoclitPackage.CREDIT_REPORT__SCORE:
+ setScore(((Integer)newValue).intValue());
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case DoclitPackage.CREDIT_REPORT__SCORE:
+ setScore(SCORE_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case DoclitPackage.CREDIT_REPORT__SCORE:
+ return score != SCORE_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (score: ");
+ result.append(score);
+ result.append(')');
+ return result.toString();
+ }
+
+} // CreditReport
\ No newline at end of file
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/Customer.java b/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/Customer.java
new file mode 100644
index 0000000000..31ad797544
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/Customer.java
@@ -0,0 +1,315 @@
+/*
+ * 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.example.creditscore.doclit;
+
+import org.apache.tuscany.sdo.impl.DataObjectImpl;
+
+import org.eclipse.emf.ecore.EClass;
+
+/**
+ *
+ * A representation of the model object 'Customer'.
+ *
+ *
+ *
{@link org.example.creditscore.doclit.Customer#getFirstName First Name}
+ *
{@link org.example.creditscore.doclit.Customer#getLastName Last Name}
+ *
+ *
+ *
+ * @generated
+ */
+public class Customer extends DataObjectImpl
+{
+ /**
+ * The default value of the '{@link #getSsn() Ssn}' attribute.
+ *
+ *
+ * @see #getSsn()
+ * @generated
+ * @ordered
+ */
+ protected static final String SSN_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getSsn() Ssn}' attribute.
+ *
+ *
+ * @see #getSsn()
+ * @generated
+ * @ordered
+ */
+ protected String ssn = SSN_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getFirstName() First Name}' attribute.
+ *
+ *
+ * @see #getFirstName()
+ * @generated
+ * @ordered
+ */
+ protected static final String FIRST_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getFirstName() First Name}' attribute.
+ *
+ *
+ * @see #getFirstName()
+ * @generated
+ * @ordered
+ */
+ protected String firstName = FIRST_NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #getLastName() Last Name}' attribute.
+ *
+ *
+ * @see #getLastName()
+ * @generated
+ * @ordered
+ */
+ protected static final String LAST_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getLastName() Last Name}' attribute.
+ *
+ *
+ * @see #getLastName()
+ * @generated
+ * @ordered
+ */
+ protected String lastName = LAST_NAME_EDEFAULT;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected Customer()
+ {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ protected EClass eStaticClass()
+ {
+ return DoclitPackage.Literals.CUSTOMER;
+ }
+
+ /**
+ * Returns the value of the 'Ssn' attribute.
+ *
+ *
+ * If the meaning of the 'Ssn' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Ssn' attribute.
+ * @see #setSsn(String)
+ * @generated
+ */
+ public String getSsn()
+ {
+ return ssn;
+ }
+
+ /**
+ * Sets the value of the '{@link org.example.creditscore.doclit.Customer#getSsn Ssn}' attribute.
+ *
+ *
+ * @param value the new value of the 'Ssn' attribute.
+ * @see #getSsn()
+ * @generated
+ */
+ public void setSsn(String newSsn)
+ {
+ ssn = newSsn;
+ }
+
+ /**
+ * Returns the value of the 'First Name' attribute.
+ *
+ *
+ * If the meaning of the 'First Name' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'First Name' attribute.
+ * @see #setFirstName(String)
+ * @generated
+ */
+ public String getFirstName()
+ {
+ return firstName;
+ }
+
+ /**
+ * Sets the value of the '{@link org.example.creditscore.doclit.Customer#getFirstName First Name}' attribute.
+ *
+ *
+ * @param value the new value of the 'First Name' attribute.
+ * @see #getFirstName()
+ * @generated
+ */
+ public void setFirstName(String newFirstName)
+ {
+ firstName = newFirstName;
+ }
+
+ /**
+ * Returns the value of the 'Last Name' attribute.
+ *
+ *
+ * If the meaning of the 'Last Name' attribute isn't clear,
+ * there really should be more of a description here...
+ *
+ *
+ * @return the value of the 'Last Name' attribute.
+ * @see #setLastName(String)
+ * @generated
+ */
+ public String getLastName()
+ {
+ return lastName;
+ }
+
+ /**
+ * Sets the value of the '{@link org.example.creditscore.doclit.Customer#getLastName Last Name}' attribute.
+ *
+ *
+ * @param value the new value of the 'Last Name' attribute.
+ * @see #getLastName()
+ * @generated
+ */
+ public void setLastName(String newLastName)
+ {
+ lastName = newLastName;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case DoclitPackage.CUSTOMER__SSN:
+ return getSsn();
+ case DoclitPackage.CUSTOMER__FIRST_NAME:
+ return getFirstName();
+ case DoclitPackage.CUSTOMER__LAST_NAME:
+ return getLastName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case DoclitPackage.CUSTOMER__SSN:
+ setSsn((String)newValue);
+ return;
+ case DoclitPackage.CUSTOMER__FIRST_NAME:
+ setFirstName((String)newValue);
+ return;
+ case DoclitPackage.CUSTOMER__LAST_NAME:
+ setLastName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case DoclitPackage.CUSTOMER__SSN:
+ setSsn(SSN_EDEFAULT);
+ return;
+ case DoclitPackage.CUSTOMER__FIRST_NAME:
+ setFirstName(FIRST_NAME_EDEFAULT);
+ return;
+ case DoclitPackage.CUSTOMER__LAST_NAME:
+ setLastName(LAST_NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case DoclitPackage.CUSTOMER__SSN:
+ return SSN_EDEFAULT == null ? ssn != null : !SSN_EDEFAULT.equals(ssn);
+ case DoclitPackage.CUSTOMER__FIRST_NAME:
+ return FIRST_NAME_EDEFAULT == null ? firstName != null : !FIRST_NAME_EDEFAULT.equals(firstName);
+ case DoclitPackage.CUSTOMER__LAST_NAME:
+ return LAST_NAME_EDEFAULT == null ? lastName != null : !LAST_NAME_EDEFAULT.equals(lastName);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public String toString()
+ {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (ssn: ");
+ result.append(ssn);
+ result.append(", firstName: ");
+ result.append(firstName);
+ result.append(", lastName: ");
+ result.append(lastName);
+ result.append(')');
+ return result.toString();
+ }
+
+} // Customer
\ No newline at end of file
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/DoclitFactory.java b/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/DoclitFactory.java
new file mode 100644
index 0000000000..9ba9ac4a82
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/DoclitFactory.java
@@ -0,0 +1,159 @@
+/*
+ * 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.example.creditscore.doclit;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+
+import org.eclipse.emf.ecore.impl.EFactoryImpl;
+
+import org.eclipse.emf.ecore.plugin.EcorePlugin;
+
+/**
+ *
+ * The Factory for the model.
+ * It provides a create method for each non-abstract class of the model.
+ *
+ * @generated
+ */
+public class DoclitFactory extends EFactoryImpl
+{
+ /**
+ * The singleton instance of the factory.
+ *
+ *
+ * @generated
+ */
+ public static final DoclitFactory eINSTANCE = init();
+
+ /**
+ * The singleton instance of the factory.
+ *
+ *
+ * @generated
+ */
+ public static final DoclitFactory INSTANCE = org.example.creditscore.doclit.DoclitFactory.eINSTANCE;
+
+ /**
+ * Creates the default factory implementation.
+ *
+ *
+ * @generated
+ */
+ public static DoclitFactory init()
+ {
+ try
+ {
+ DoclitFactory theDoclitFactory = (DoclitFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.example.org/creditscore/doclit/");
+ if (theDoclitFactory != null)
+ {
+ return theDoclitFactory;
+ }
+ }
+ catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new DoclitFactory();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ *
+ *
+ * @generated
+ */
+ public DoclitFactory()
+ {
+ super();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID())
+ {
+ case DoclitPackage.CREDIT_REPORT: return (EObject)createCreditReport();
+ case DoclitPackage.CUSTOMER: return (EObject)createCustomer();
+ case DoclitPackage.DOCUMENT_ROOT: return (EObject)createDocumentRoot();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public CreditReport createCreditReport()
+ {
+ CreditReport creditReport = new CreditReport();
+ return creditReport;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public Customer createCustomer()
+ {
+ Customer customer = new Customer();
+ return customer;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public EObject createDocumentRoot()
+ {
+ EObject documentRoot = super.create(DoclitPackage.Literals.DOCUMENT_ROOT);
+ return documentRoot;
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ public DoclitPackage getDoclitPackage()
+ {
+ return (DoclitPackage)getEPackage();
+ }
+
+ /**
+ *
+ *
+ * @deprecated
+ * @generated
+ */
+ public static DoclitPackage getPackage()
+ {
+ return DoclitPackage.eINSTANCE;
+ }
+
+} //DoclitFactory
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/DoclitPackage.java b/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/DoclitPackage.java
new file mode 100644
index 0000000000..1e1972d1e0
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/java/org/example/creditscore/doclit/DoclitPackage.java
@@ -0,0 +1,808 @@
+/*
+ * 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.example.creditscore.doclit;
+
+import org.apache.tuscany.sdo.impl.SDOPackageImpl;
+
+import org.apache.tuscany.sdo.model.impl.ModelPackageImpl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+
+/**
+ *
+ * The Package for the model.
+ * It contains accessors for the meta objects to represent
+ *
+ *
each class,
+ *
each feature of each class,
+ *
each enum,
+ *
and each data type
+ *
+ *
+ * @see org.example.creditscore.doclit.DoclitFactory
+ * @generated
+ */
+public class DoclitPackage extends EPackageImpl
+{
+ /**
+ * The package name.
+ *
+ *
+ * @generated
+ */
+ public static final String eNAME = "doclit";
+
+ /**
+ * The package namespace URI.
+ *
+ *
+ * @generated
+ */
+ public static final String eNS_URI = "http://www.example.org/creditscore/doclit/";
+
+ /**
+ * The package namespace name.
+ *
+ *
+ * @generated
+ */
+ public static final String eNS_PREFIX = "doclit";
+
+ /**
+ * The singleton instance of the package.
+ *
+ *
+ * @generated
+ */
+ public static final DoclitPackage eINSTANCE = org.example.creditscore.doclit.DoclitPackage.init();
+
+ /**
+ * The meta object id for the '{@link org.example.creditscore.doclit.CreditReport Credit Report}' class.
+ *
+ *
+ * @see org.example.creditscore.doclit.CreditReport
+ * @see org.example.creditscore.doclit.DoclitPackage#getCreditReport()
+ * @generated
+ */
+ public static final int CREDIT_REPORT = 0;
+
+ /**
+ * The feature id for the 'Score' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int CREDIT_REPORT__SCORE = 0;
+
+ /**
+ * The number of structural features of the 'Credit Report' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int CREDIT_REPORT_FEATURE_COUNT = 1;
+
+ /**
+ * The meta object id for the '{@link org.example.creditscore.doclit.Customer Customer}' class.
+ *
+ *
+ * @see org.example.creditscore.doclit.Customer
+ * @see org.example.creditscore.doclit.DoclitPackage#getCustomer()
+ * @generated
+ */
+ public static final int CUSTOMER = 1;
+
+ /**
+ * The feature id for the 'Ssn' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int CUSTOMER__SSN = 0;
+
+ /**
+ * The feature id for the 'First Name' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int CUSTOMER__FIRST_NAME = 1;
+
+ /**
+ * The feature id for the 'Last Name' attribute.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int CUSTOMER__LAST_NAME = 2;
+
+ /**
+ * The number of structural features of the 'Customer' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int CUSTOMER_FEATURE_COUNT = 3;
+
+ /**
+ * The meta object id for the '{@link org.example.creditscore.doclit.DocumentRoot Document Root}' class.
+ *
+ *
+ * @see org.example.creditscore.doclit.DocumentRoot
+ * @see org.example.creditscore.doclit.DoclitPackage#getDocumentRoot()
+ * @generated
+ */
+ public static final int DOCUMENT_ROOT = 2;
+
+ /**
+ * The feature id for the 'Mixed' attribute list.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int DOCUMENT_ROOT__MIXED = 0;
+
+ /**
+ * The feature id for the 'XMLNS Prefix Map' map.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int DOCUMENT_ROOT__XMLNS_PREFIX_MAP = 1;
+
+ /**
+ * The feature id for the 'XSI Schema Location' map.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = 2;
+
+ /**
+ * The feature id for the 'Get Credit Score Request' containment reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int DOCUMENT_ROOT__GET_CREDIT_SCORE_REQUEST = 3;
+
+ /**
+ * The feature id for the 'Get Credit Score Response' containment reference.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int DOCUMENT_ROOT__GET_CREDIT_SCORE_RESPONSE = 4;
+
+ /**
+ * The number of structural features of the 'Document Root' class.
+ *
+ *
+ * @generated
+ * @ordered
+ */
+ public static final int DOCUMENT_ROOT_FEATURE_COUNT = 5;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass creditReportEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass customerEClass = null;
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private EClass documentRootEClass = null;
+
+ /**
+ * Creates an instance of the model Package, registered with
+ * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * package URI value.
+ *
Note: the correct way to create the package is via the static
+ * factory method {@link #init init()}, which also performs
+ * initialization of the package, or returns the registered package,
+ * if one already exists.
+ *
+ *
+ * @see org.eclipse.emf.ecore.EPackage.Registry
+ * @see org.example.creditscore.doclit.DoclitPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private DoclitPackage()
+ {
+ super(eNS_URI, ((EFactory)DoclitFactory.INSTANCE));
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private static boolean isInited = false;
+
+ /**
+ * Creates, registers, and initializes the Package for this
+ * model, and for any others upon which it depends. Simple
+ * dependencies are satisfied by calling this method on all
+ * dependent packages before doing anything else. This method drives
+ * initialization for interdependent packages directly, in parallel
+ * with this package, itself.
+ *
Of this package and its interdependencies, all packages which
+ * have not yet been registered by their URI values are first created
+ * and registered. The packages are then initialized in two steps:
+ * meta-model objects for all of the packages are created before any
+ * are initialized, since one package's meta-model objects may refer to
+ * those of another.
+ *
Invocation of this method will not affect any packages that have
+ * already been initialized.
+ *
+ *
+ * @see #eNS_URI
+ * @see #createPackageContents()
+ * @see #initializePackageContents()
+ * @generated
+ */
+ public static DoclitPackage init()
+ {
+ if (isInited) return (DoclitPackage)EPackage.Registry.INSTANCE.getEPackage(DoclitPackage.eNS_URI);
+
+ // Obtain or create and register package
+ DoclitPackage theDoclitPackage = (DoclitPackage)(EPackage.Registry.INSTANCE.getEPackage(eNS_URI) instanceof DoclitPackage ? EPackage.Registry.INSTANCE.getEPackage(eNS_URI) : new DoclitPackage());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ SDOPackageImpl.eINSTANCE.eClass();
+ ModelPackageImpl.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theDoclitPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theDoclitPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theDoclitPackage.freeze();
+
+ return theDoclitPackage;
+ }
+
+
+ /**
+ * Returns the meta object for class '{@link org.example.creditscore.doclit.CreditReport Credit Report}'.
+ *
+ *
+ * @return the meta object for class 'Credit Report'.
+ * @see org.example.creditscore.doclit.CreditReport
+ * @generated
+ */
+ public EClass getCreditReport()
+ {
+ return creditReportEClass;
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.creditscore.doclit.CreditReport#getScore Score}'.
+ *
+ *
+ * @return the meta object for the attribute 'Score'.
+ * @see org.example.creditscore.doclit.CreditReport#getScore()
+ * @see #getCreditReport()
+ * @generated
+ */
+ public EAttribute getCreditReport_Score()
+ {
+ return (EAttribute)creditReportEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * Returns the meta object for class '{@link org.example.creditscore.doclit.Customer Customer}'.
+ *
+ *
+ * @return the meta object for class 'Customer'.
+ * @see org.example.creditscore.doclit.Customer
+ * @generated
+ */
+ public EClass getCustomer()
+ {
+ return customerEClass;
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.creditscore.doclit.Customer#getSsn Ssn}'.
+ *
+ *
+ * @return the meta object for the attribute 'Ssn'.
+ * @see org.example.creditscore.doclit.Customer#getSsn()
+ * @see #getCustomer()
+ * @generated
+ */
+ public EAttribute getCustomer_Ssn()
+ {
+ return (EAttribute)customerEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.creditscore.doclit.Customer#getFirstName First Name}'.
+ *
+ *
+ * @return the meta object for the attribute 'First Name'.
+ * @see org.example.creditscore.doclit.Customer#getFirstName()
+ * @see #getCustomer()
+ * @generated
+ */
+ public EAttribute getCustomer_FirstName()
+ {
+ return (EAttribute)customerEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * Returns the meta object for the attribute '{@link org.example.creditscore.doclit.Customer#getLastName Last Name}'.
+ *
+ *
+ * @return the meta object for the attribute 'Last Name'.
+ * @see org.example.creditscore.doclit.Customer#getLastName()
+ * @see #getCustomer()
+ * @generated
+ */
+ public EAttribute getCustomer_LastName()
+ {
+ return (EAttribute)customerEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.emf.ecore.EObject Document Root}'.
+ *
+ *
+ * @return the meta object for class 'Document Root'.
+ * @see org.eclipse.emf.ecore.EObject
+ * @generated
+ */
+ public EClass getDocumentRoot()
+ {
+ return documentRootEClass;
+ }
+
+ /**
+ * Returns the meta object for the attribute list '{@link org.eclipse.emf.ecore.EObject#getMixed Mixed}'.
+ *
+ *
+ * @return the meta object for the attribute list 'Mixed'.
+ * @see org.eclipse.emf.ecore.EObject#getMixed()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ public EAttribute getDocumentRoot_Mixed()
+ {
+ return (EAttribute)documentRootEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap XMLNS Prefix Map}'.
+ *
+ *
+ * @return the meta object for the map 'XMLNS Prefix Map'.
+ * @see org.eclipse.emf.ecore.EObject#getXMLNSPrefixMap()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ public EReference getDocumentRoot_XMLNSPrefixMap()
+ {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * Returns the meta object for the map '{@link org.eclipse.emf.ecore.EObject#getXSISchemaLocation XSI Schema Location}'.
+ *
+ *
+ * @return the meta object for the map 'XSI Schema Location'.
+ * @see org.eclipse.emf.ecore.EObject#getXSISchemaLocation()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ public EReference getDocumentRoot_XSISchemaLocation()
+ {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(2);
+ }
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecore.EObject#getGetCreditScoreRequest Get Credit Score Request}'.
+ *
+ *
+ * @return the meta object for the containment reference 'Get Credit Score Request'.
+ * @see org.eclipse.emf.ecore.EObject#getGetCreditScoreRequest()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ public EReference getDocumentRoot_GetCreditScoreRequest()
+ {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * Returns the meta object for the containment reference '{@link org.eclipse.emf.ecore.EObject#getGetCreditScoreResponse Get Credit Score Response}'.
+ *
+ *
+ * @return the meta object for the containment reference 'Get Credit Score Response'.
+ * @see org.eclipse.emf.ecore.EObject#getGetCreditScoreResponse()
+ * @see #getDocumentRoot()
+ * @generated
+ */
+ public EReference getDocumentRoot_GetCreditScoreResponse()
+ {
+ return (EReference)documentRootEClass.getEStructuralFeatures().get(4);
+ }
+
+ /**
+ * Returns the factory that creates the instances of the model.
+ *
+ *
+ * @return the factory that creates the instances of the model.
+ * @generated
+ */
+ public DoclitFactory getDoclitFactory()
+ {
+ return (DoclitFactory)getEFactoryInstance();
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private boolean isCreated = false;
+
+ /**
+ * Creates the meta-model objects for the package. This method is
+ * guarded to have no affect on any invocation but its first.
+ *
+ *
+ * @generated
+ */
+ public void createPackageContents()
+ {
+ if (isCreated) return;
+ isCreated = true;
+
+ // Create classes and their features
+ creditReportEClass = createEClass(CREDIT_REPORT);
+ createEAttribute(creditReportEClass, CREDIT_REPORT__SCORE);
+
+ customerEClass = createEClass(CUSTOMER);
+ createEAttribute(customerEClass, CUSTOMER__SSN);
+ createEAttribute(customerEClass, CUSTOMER__FIRST_NAME);
+ createEAttribute(customerEClass, CUSTOMER__LAST_NAME);
+
+ documentRootEClass = createEClass(DOCUMENT_ROOT);
+ createEAttribute(documentRootEClass, DOCUMENT_ROOT__MIXED);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XMLNS_PREFIX_MAP);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__XSI_SCHEMA_LOCATION);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__GET_CREDIT_SCORE_REQUEST);
+ createEReference(documentRootEClass, DOCUMENT_ROOT__GET_CREDIT_SCORE_RESPONSE);
+ }
+
+ /**
+ *
+ *
+ * @generated
+ */
+ private boolean isInitialized = false;
+
+ /**
+ * Complete the initialization of the package and its meta-model. This
+ * method is guarded to have no affect on any invocation but its first.
+ *
+ *
+ * @generated
+ */
+ public void initializePackageContents()
+ {
+ if (isInitialized) return;
+ isInitialized = true;
+
+ // Initialize package
+ setName(eNAME);
+ setNsPrefix(eNS_PREFIX);
+ setNsURI(eNS_URI);
+
+ // Obtain other dependent packages
+ ModelPackageImpl theModelPackageImpl = (ModelPackageImpl)EPackage.Registry.INSTANCE.getEPackage(ModelPackageImpl.eNS_URI);
+
+ // Add supertypes to classes
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(creditReportEClass, CreditReport.class, "CreditReport", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCreditReport_Score(), theModelPackageImpl.getInt(), "score", null, 1, 1, CreditReport.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(customerEClass, Customer.class, "Customer", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getCustomer_Ssn(), theModelPackageImpl.getString(), "ssn", null, 1, 1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCustomer_FirstName(), theModelPackageImpl.getString(), "firstName", null, 1, 1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEAttribute(getCustomer_LastName(), theModelPackageImpl.getString(), "lastName", null, 1, 1, Customer.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ initEClass(documentRootEClass, null, "DocumentRoot", !IS_ABSTRACT, !IS_INTERFACE, !IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getDocumentRoot_Mixed(), ecorePackage.getEFeatureMapEntry(), "mixed", null, 0, -1, null, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_XMLNSPrefixMap(), ecorePackage.getEStringToStringMapEntry(), null, "xMLNSPrefixMap", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_XSISchemaLocation(), ecorePackage.getEStringToStringMapEntry(), null, "xSISchemaLocation", null, 0, -1, null, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_GetCreditScoreRequest(), this.getCustomer(), null, "getCreditScoreRequest", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getDocumentRoot_GetCreditScoreResponse(), this.getCreditReport(), null, "getCreditScoreResponse", null, 0, -2, null, IS_TRANSIENT, IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http:///org/eclipse/emf/ecore/util/ExtendedMetaData
+ createExtendedMetaDataAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for http:///org/eclipse/emf/ecore/util/ExtendedMetaData.
+ *
+ *
+ * @generated
+ */
+ protected void createExtendedMetaDataAnnotations()
+ {
+ String source = "http:///org/eclipse/emf/ecore/util/ExtendedMetaData";
+ addAnnotation
+ (creditReportEClass,
+ source,
+ new String[]
+ {
+ "name", "CreditReport",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getCreditReport_Score(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "score"
+ });
+ addAnnotation
+ (customerEClass,
+ source,
+ new String[]
+ {
+ "name", "Customer",
+ "kind", "elementOnly"
+ });
+ addAnnotation
+ (getCustomer_Ssn(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "ssn"
+ });
+ addAnnotation
+ (getCustomer_FirstName(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "firstName"
+ });
+ addAnnotation
+ (getCustomer_LastName(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "lastName"
+ });
+ addAnnotation
+ (documentRootEClass,
+ source,
+ new String[]
+ {
+ "name", "",
+ "kind", "mixed"
+ });
+ addAnnotation
+ (getDocumentRoot_Mixed(),
+ source,
+ new String[]
+ {
+ "kind", "elementWildcard",
+ "name", ":mixed"
+ });
+ addAnnotation
+ (getDocumentRoot_XMLNSPrefixMap(),
+ source,
+ new String[]
+ {
+ "kind", "attribute",
+ "name", "xmlns:prefix"
+ });
+ addAnnotation
+ (getDocumentRoot_XSISchemaLocation(),
+ source,
+ new String[]
+ {
+ "kind", "attribute",
+ "name", "xsi:schemaLocation"
+ });
+ addAnnotation
+ (getDocumentRoot_GetCreditScoreRequest(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "getCreditScoreRequest",
+ "namespace", "##targetNamespace"
+ });
+ addAnnotation
+ (getDocumentRoot_GetCreditScoreResponse(),
+ source,
+ new String[]
+ {
+ "kind", "element",
+ "name", "getCreditScoreResponse",
+ "namespace", "##targetNamespace"
+ });
+ }
+
+ /**
+ *
+ * Defines literals for the meta objects that represent
+ *
+ *
each class,
+ *
each feature of each class,
+ *
each enum,
+ *
and each data type
+ *
+ *
+ * @generated
+ */
+ public interface Literals
+ {
+ /**
+ * The meta object literal for the '{@link org.example.creditscore.doclit.CreditReport Credit Report}' class.
+ *
+ *
+ * @see org.example.creditscore.doclit.CreditReport
+ * @see org.example.creditscore.doclit.DoclitPackage#getCreditReport()
+ * @generated
+ */
+ public static final EClass CREDIT_REPORT = eINSTANCE.getCreditReport();
+
+ /**
+ * The meta object literal for the 'Score' attribute feature.
+ *
+ *
+ * @generated
+ */
+ public static final EAttribute CREDIT_REPORT__SCORE = eINSTANCE.getCreditReport_Score();
+
+ /**
+ * The meta object literal for the '{@link org.example.creditscore.doclit.Customer Customer}' class.
+ *
+ *
+ * @see org.example.creditscore.doclit.Customer
+ * @see org.example.creditscore.doclit.DoclitPackage#getCustomer()
+ * @generated
+ */
+ public static final EClass CUSTOMER = eINSTANCE.getCustomer();
+
+ /**
+ * The meta object literal for the 'Ssn' attribute feature.
+ *
+ *
+ * @generated
+ */
+ public static final EAttribute CUSTOMER__SSN = eINSTANCE.getCustomer_Ssn();
+
+ /**
+ * The meta object literal for the 'First Name' attribute feature.
+ *
+ *
+ * @generated
+ */
+ public static final EAttribute CUSTOMER__FIRST_NAME = eINSTANCE.getCustomer_FirstName();
+
+ /**
+ * The meta object literal for the 'Last Name' attribute feature.
+ *
+ *
+ * @generated
+ */
+ public static final EAttribute CUSTOMER__LAST_NAME = eINSTANCE.getCustomer_LastName();
+
+ /**
+ * The meta object literal for the '{@link org.example.creditscore.doclit.DocumentRoot Document Root}' class.
+ *
+ *
+ * @see org.example.creditscore.doclit.DocumentRoot
+ * @see org.example.creditscore.doclit.DoclitPackage#getDocumentRoot()
+ * @generated
+ */
+ public static final EClass DOCUMENT_ROOT = eINSTANCE.getDocumentRoot();
+
+ /**
+ * The meta object literal for the 'Mixed' attribute list feature.
+ *
+ *
+ * @generated
+ */
+ public static final EAttribute DOCUMENT_ROOT__MIXED = eINSTANCE.getDocumentRoot_Mixed();
+
+ /**
+ * The meta object literal for the 'XMLNS Prefix Map' map feature.
+ *
+ *
+ * @generated
+ */
+ public static final EReference DOCUMENT_ROOT__XMLNS_PREFIX_MAP = eINSTANCE.getDocumentRoot_XMLNSPrefixMap();
+
+ /**
+ * The meta object literal for the 'XSI Schema Location' map feature.
+ *
+ *
+ * @generated
+ */
+ public static final EReference DOCUMENT_ROOT__XSI_SCHEMA_LOCATION = eINSTANCE.getDocumentRoot_XSISchemaLocation();
+
+ /**
+ * The meta object literal for the 'Get Credit Score Request' containment reference feature.
+ *
+ *
+ * @generated
+ */
+ public static final EReference DOCUMENT_ROOT__GET_CREDIT_SCORE_REQUEST = eINSTANCE.getDocumentRoot_GetCreditScoreRequest();
+
+ /**
+ * The meta object literal for the 'Get Credit Score Response' containment reference feature.
+ *
+ *
+ * @generated
+ */
+ public static final EReference DOCUMENT_ROOT__GET_CREDIT_SCORE_RESPONSE = eINSTANCE.getDocumentRoot_GetCreditScoreResponse();
+
+ }
+
+} //DoclitPackage
diff --git a/branches/sca-java-M2/sca/tools/src/test/java/org/soapinterop/CreditScoreDocLit.java b/branches/sca-java-M2/sca/tools/src/test/java/org/soapinterop/CreditScoreDocLit.java
new file mode 100644
index 0000000000..e9e8aa882a
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/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/branches/sca-java-M2/sca/tools/src/test/resources/AccountService.wsdl b/branches/sca-java-M2/sca/tools/src/test/resources/AccountService.wsdl
new file mode 100644
index 0000000000..e7be3ce5ba
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/resources/AccountService.wsdl
@@ -0,0 +1,242 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/sca-java-M2/sca/tools/src/test/resources/helloworld.wsdl b/branches/sca-java-M2/sca/tools/src/test/resources/helloworld.wsdl
new file mode 100644
index 0000000000..051f604bb2
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/resources/helloworld.wsdl
@@ -0,0 +1,121 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/sca-java-M2/sca/tools/src/test/resources/interopdoc.wsdl b/branches/sca-java-M2/sca/tools/src/test/resources/interopdoc.wsdl
new file mode 100644
index 0000000000..820c26ca34
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/resources/interopdoc.wsdl
@@ -0,0 +1,180 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/branches/sca-java-M2/sca/tools/src/test/resources/sequences.xsd b/branches/sca-java-M2/sca/tools/src/test/resources/sequences.xsd
new file mode 100644
index 0000000000..a565f3fa65
--- /dev/null
+++ b/branches/sca-java-M2/sca/tools/src/test/resources/sequences.xsd
@@ -0,0 +1,100 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
--
cgit v1.2.3