From 3a569a2f00bf172cddfd567149774ee808a2a242 Mon Sep 17 00:00:00 2001 From: nash Date: Wed, 30 Mar 2011 19:50:51 +0000 Subject: Create branch for 1.6.2 git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1087059 13f79535-47bb-0310-9956-ffa450edef68 --- .../demos/mortgage-creditcheck/README | 6 ++ .../demos/mortgage-creditcheck/build.xml | 64 +++++++++++++++++ .../demos/mortgage-creditcheck/pom.xml | 75 ++++++++++++++++++++ .../src/main/java/credit/CreditCheck.java | 26 +++++++ .../src/main/java/credit/CreditCheckImpl.java | 34 +++++++++ .../src/main/java/credit/CreditCheckServer.java | 40 +++++++++++ .../src/main/resources/CreditCheck.composite | 37 ++++++++++ .../src/main/resources/wsdl/credit.wsdl | 81 ++++++++++++++++++++++ .../src/main/webapp/META-INF/sca-contribution.xml | 23 ++++++ .../src/main/webapp/WEB-INF/web.xml | 37 ++++++++++ 10 files changed, 423 insertions(+) create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/README create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/build.xml create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/pom.xml create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml create mode 100644 sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml (limited to 'sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck') diff --git a/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/README b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/README new file mode 100644 index 0000000000..b785802920 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/README @@ -0,0 +1,6 @@ +Mortgage Loan Approval Demo +=========================== +Please refer to the README under mortgage-loanapproval for information on how to run this demo. + +Mortgage-creditcheck is part of a larger demo that is explained there. + diff --git a/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/build.xml b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/build.xml new file mode 100644 index 0000000000..42220239fd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/build.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/pom.xml b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/pom.xml new file mode 100644 index 0000000000..5cc96ac9e4 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/pom.xml @@ -0,0 +1,75 @@ + + + + 4.0.0 + + org.apache.tuscany.sca + tuscany-demos + 1.6.1-SNAPSHOT + ../pom.xml + + demo-mortgage-creditcheck + jar + Apache Tuscany SCA Demo Mortgage Credit Check + A sample Mortgage application made of several SCA components wired together. + + + + org.apache.tuscany.sca + tuscany-host-embedded + 1.6.1-SNAPSHOT + + + + org.apache.tuscany.sca + tuscany-implementation-java-runtime + 1.6.1-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-binding-ws-axis2 + 1.6.1-SNAPSHOT + runtime + + + + org.apache.tuscany.sca + tuscany-host-jetty + 1.6.1-SNAPSHOT + runtime + + + + junit + junit + 4.5 + test + + + + + + ${artifactId} + + + + diff --git a/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java new file mode 100644 index 0000000000..ec95a60227 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheck.java @@ -0,0 +1,26 @@ +/* + * 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 credit; + +import org.osoa.sca.annotations.Remotable; + +@Remotable +public interface CreditCheck { + int getCreditScore(String ssn); +} diff --git a/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java new file mode 100644 index 0000000000..f19e8a1250 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckImpl.java @@ -0,0 +1,34 @@ +/* + * 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 credit; + +import org.osoa.sca.annotations.Service; + +/** + * An implementation of the CreditReportService service + */ +@Service(CreditCheck.class) +public class CreditCheckImpl implements CreditCheck { + + public int getCreditScore(String ssn) { + int score = (int)(700 + (Math.random() - 0.5) * 100); + System.out.println("Credit score for " + ssn + ": " + score); + return score; + } +} diff --git a/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java new file mode 100644 index 0000000000..870ea1941d --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/java/credit/CreditCheckServer.java @@ -0,0 +1,40 @@ +/* + * 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 credit; + +import org.apache.tuscany.sca.host.embedded.SCADomain; + +/** + * @version $Rev$ $Date$ + */ +public class CreditCheckServer { + public static void main(String[] args) throws Exception { + + System.out.println("Starting the CreditCheck Service..."); + + SCADomain domain = SCADomain.newInstance("http://localhost", "/", "CreditCheck.composite"); + + System.out.println("Press Enter to Exit..."); + System.in.read(); + + domain.close(); + System.out.println("Bye"); + } +} diff --git a/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite new file mode 100644 index 0000000000..5c828f5a39 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/resources/CreditCheck.composite @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl new file mode 100644 index 0000000000..9c2acc96d3 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/resources/wsdl/credit.wsdl @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml new file mode 100644 index 0000000000..3e9e4539bd --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/webapp/META-INF/sca-contribution.xml @@ -0,0 +1,23 @@ + + + + + \ No newline at end of file diff --git a/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 0000000000..d7b2e32dd1 --- /dev/null +++ b/sca-java-1.x/branches/sca-java-1.6.2/demos/mortgage-creditcheck/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,37 @@ + + + + + + + Apache Tuscany Credit Check Demo + + + tuscany + org.apache.tuscany.sca.host.webapp.TuscanyServletFilter + + + + tuscany + /* + + + -- cgit v1.2.3