You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/09/22 02:32:14 UTC
svn commit: r448749 - in /incubator/tuscany/cpp/sca/samples: ./
BigBank/bigbank.client/ RubyBank/ RubyBank/bigbank.account/
RubyBank/bigbank.accountmanagement/ RubyBank/bigbank.client/
RubyCalculator/sample.calculator/
Author: jsdelfino
Date: Thu Sep 21 17:32:13 2006
New Revision: 448749
URL: http://svn.apache.org/viewvc?view=rev&rev=448749
Log:
Added a Ruby version of the BigBank scenario. It does not invoke the StockQuoteWebService yet but it's just a matter of writing the Ruby logic to do it.
Added:
incubator/tuscany/cpp/sca/samples/RubyBank/
incubator/tuscany/cpp/sca/samples/RubyBank/Makefile.am
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountDataServiceImpl.rb
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountService.wsdl
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountServiceImpl.rb
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/Makefile.am
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteServiceImpl.rb
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd (with props)
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteWebService.wsdl
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/bigbank.account.composite
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.bat
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.sh (with props)
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.accountmanagement/
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.accountmanagement/bigbank.accountmanagement.composite
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/AccountClient.rb
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/Makefile.am
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.bat
incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.sh (with props)
Modified:
incubator/tuscany/cpp/sca/samples/BigBank/bigbank.client/AccountClient.cpp
incubator/tuscany/cpp/sca/samples/Makefile.am
incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Makefile.am
incubator/tuscany/cpp/sca/samples/configure.ac
Modified: incubator/tuscany/cpp/sca/samples/BigBank/bigbank.client/AccountClient.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/BigBank/bigbank.client/AccountClient.cpp?view=diff&rev=448749&r1=448748&r2=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/BigBank/bigbank.client/AccountClient.cpp (original)
+++ incubator/tuscany/cpp/sca/samples/BigBank/bigbank.client/AccountClient.cpp Thu Sep 21 17:32:13 2006
@@ -56,7 +56,11 @@
DataObjectPtr report =
accountService->getAccountReport(argv[1]);
-
+
+ XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(myContext.getDataFactory());
+ char* doc = xmlHelper->save(report, report->getType().getURI(), report->getType().getName());
+ cout << "XML: " << doc <<endl;
+
if (report != 0)
{
int i;
Modified: incubator/tuscany/cpp/sca/samples/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/Makefile.am?view=diff&rev=448749&r1=448748&r2=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/Makefile.am (original)
+++ incubator/tuscany/cpp/sca/samples/Makefile.am Thu Sep 21 17:32:13 2006
@@ -1,3 +1,3 @@
-SUBDIRS = Calculator BigBank RubyCalculator PythonCalculator
+SUBDIRS = Calculator BigBank RubyCalculator RubyBank PythonCalculator
EXTRA_DIST = GettingStarted.html
Added: incubator/tuscany/cpp/sca/samples/RubyBank/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/Makefile.am?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/Makefile.am (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/Makefile.am Thu Sep 21 17:32:13 2006
@@ -0,0 +1,4 @@
+deploydir=$(prefix)/samples/RubyBank/deploy/configuration/bigbank.accountmanagement
+SUBDIRS = bigbank.account bigbank.client
+EXTRA_DIST = bigbank.accountmanagement
+deploy_DATA = bigbank.accountmanagement/bigbank.accountmanagement.composite
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountDataServiceImpl.rb
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountDataServiceImpl.rb?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountDataServiceImpl.rb (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountDataServiceImpl.rb Thu Sep 21 17:32:13 2006
@@ -0,0 +1,72 @@
+# 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.
+#
+
+require "rexml/document"
+include REXML
+
+class AccountDataServiceImpl
+
+ def initialize()
+ print "Ruby - AccountDataServiceImpl.initialize\n"
+ end
+
+ def getCheckingAccount(id)
+ print "Ruby - AccountDataServiceImpl.getCheckingAccount ", id, "\n"
+
+ result = Document.new <<-eof
+ <CheckingAccount xmlns="http://www.bigbank.com/AccountService"
+ xsi:type="CheckingAccount" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <accountNumber>#{ id.to_s + "_CHA12345"}</accountNumber>
+ <balance>1500.0</balance>
+ </CheckingAccount>
+ eof
+
+ return result
+ end
+
+ def getSavingsAccount(id)
+ print "Ruby - AccountDataServiceImpl.getSavingsAccount ", id, "\n"
+
+ result = Document.new <<-eof
+ <SavingsAccount xmlns="http://www.bigbank.com/AccountService"
+ xsi:type="SavingsAccount" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <accountNumber>#{ id.to_s + "_SAA12345"}</accountNumber>
+ <balance>1500.0</balance>
+ </SavingsAccount>
+ eof
+
+ return result
+ end
+
+ def getStockAccount(id)
+ print "Ruby - AccountDataServiceImpl.getStockAccount ", id, "\n"
+
+ result = Document.new <<-eof
+ <StockAccount xmlns="http://www.bigbank.com/AccountService"
+ xsi:type="StockAccount" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <accountNumber>#{ id.to_s + "_STA12345"}</accountNumber>
+ <symbol>IBM</symbol>
+ <quantity>100</quantity>
+ <balance></balance>
+ </StockAccount>
+ eof
+
+ return result
+ end
+
+end
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountService.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountService.wsdl?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountService.wsdl (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountService.wsdl Thu Sep 21 17:32:13 2006
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed 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:tns="http://www.bigbank.com/AccountService"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema"
+ targetNamespace="http://www.bigbank.com/AccountService"
+ name="AccountService">
+
+ <wsdl:types>
+ <xsd:schema
+ targetNamespace="http://www.bigbank.com/AccountService"
+ xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+
+ <xsd:element name="getAccountReport">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="customerID"
+ type="xsd:string" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:element name="getAccountReportResponse">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="result"
+ type="tns:AccountReport" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:element>
+
+ <xsd:complexType name="AccountReport">
+ <xsd:sequence>
+ <xsd:element name="checking"
+ type="tns:CheckingAccount" maxOccurs="unbounded" />
+ <xsd:element name="savings"
+ type="tns:SavingsAccount" maxOccurs="unbounded" />
+ <xsd:element name="stocks" type="tns:StockAccount"
+ maxOccurs="unbounded" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="StockAccount">
+ <xsd:sequence>
+ <xsd:element name="accountNumber" type="xsd:string" />
+ <xsd:element name="symbol" type="xsd:string" />
+ <xsd:element name="quantity" type="xsd:integer" />
+ <xsd:element name="balance" type="xsd:float" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="CheckingAccount">
+ <xsd:sequence>
+ <xsd:element name="accountNumber" type="xsd:string" />
+ <xsd:element name="balance" type="xsd:float" />
+ </xsd:sequence>
+ </xsd:complexType>
+
+ <xsd:complexType name="SavingsAccount">
+ <xsd:sequence>
+ <xsd:element name="accountNumber" type="xsd:string" />
+ <xsd:element name="balance" type="xsd:float" />
+ </xsd:sequence>
+ </xsd:complexType>
+ </xsd:schema>
+ </wsdl:types>
+
+ <wsdl:message name="getAccountReportRequest">
+ <wsdl:part element="tns:getAccountReport"
+ name="getAccountReportRequest" />
+ </wsdl:message>
+
+ <wsdl:message name="getAccountReportResponse">
+ <wsdl:part element="tns:getAccountReportResponse"
+ name="getAccountReportResponse" />
+ </wsdl:message>
+
+ <wsdl:portType name="AccountService">
+ <wsdl:operation name="getAccountReport">
+ <wsdl:input message="tns:getAccountReportRequest" />
+ <wsdl:output message="tns:getAccountReportResponse" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:binding name="AccountServiceSOAP" type="tns:AccountService">
+ <soap:binding style="document"
+ transport="http://schemas.xmlsoap.org/soap/http" />
+ <wsdl:operation name="getAccountReport">
+ <soap:operation
+ soapAction="http://www.bigbank.com/AccountService/getAccountReport" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+
+ <wsdl:service name="AccountService">
+ <wsdl:port binding="tns:AccountServiceSOAP"
+ name="AccountServiceSOAP">
+ <soap:address
+ location="http://localhost:9090/axis2/services/AccountService" />
+ </wsdl:port>
+ </wsdl:service>
+</wsdl:definitions>
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountServiceImpl.rb
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountServiceImpl.rb?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountServiceImpl.rb (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/AccountServiceImpl.rb Thu Sep 21 17:32:13 2006
@@ -0,0 +1,74 @@
+# 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.
+#
+
+require "rexml/document"
+include REXML
+
+class AccountServiceImpl
+
+ attr_writer :accountDataService
+ attr_writer :stockQuoteService
+ attr_writer :currency
+
+ def initialize()
+ print "Ruby - AccountServiceImpl.initialize\n"
+ end
+
+ def getAccountReport(customerID)
+
+ report = Document.new <<-eof
+ <AccountReport xmlns="http://www.bigbank.com/AccountService"
+ xsi:type="AccountReport" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ eof
+
+ checking = @accountDataService.getCheckingAccount(customerID)
+ checking.root.elements["balance"].text = fromUSDollarToCurrency(checking.root.elements["balance"].text)
+
+ ne = report.root.add_element("checking")
+ checking.root.each_element() {|e| ne.add_element(e)}
+
+ savings = @accountDataService.getSavingsAccount(customerID)
+ savings.root.elements["balance"].text = fromUSDollarToCurrency(savings.root.elements["balance"].text)
+
+ ne = report.root.add_element("savings")
+ savings.root.each_element() {|e| ne.add_element(e)}
+
+ stock = @accountDataService.getStockAccount(customerID);
+ symbol = stock.root.elements["symbol"].text
+ quantity = stock.root.elements["quantity"].text
+
+ price = @stockQuoteService.getQuote(symbol);
+
+ balance = fromUSDollarToCurrency(price.to_f * quantity.to_f)
+ stock.root.elements["balance"].text = balance.to_s
+
+ ne = report.root.add_element("stock")
+ stock.root.each_element() {|e| ne.add_element(e)}
+
+ print report
+
+ return report
+ end
+
+ def fromUSDollarToCurrency(value)
+ print "Currency is: ", @currency, "\n"
+ return value * 0.8 if @currency == "EURO"
+ return value
+ end
+
+end
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/Makefile.am?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/Makefile.am (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/Makefile.am Thu Sep 21 17:32:13 2006
@@ -0,0 +1,8 @@
+deploydir=$(prefix)/samples/RubyBank/deploy
+compositedir=$(deploydir)/packages/bigbank.account
+prgbindir=$(deploydir)/bin
+
+prgbin_SCRIPTS = runwsserver.sh
+
+composite_DATA = *.composite *.wsdl *.xsd *.rb
+EXTRA_DIST = *.composite *.wsdl *.xsd runwsserver.sh *.rb
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteServiceImpl.rb
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteServiceImpl.rb?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteServiceImpl.rb (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteServiceImpl.rb Thu Sep 21 17:32:13 2006
@@ -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.
+#
+
+require "rexml/document"
+include REXML
+
+class StockQuoteServiceImpl
+
+ attr_writer :webService
+
+ def initialize()
+ print "Ruby - StockQuoteServiceImpl.initialize\n"
+ end
+
+ def getQuote(symbol)
+ print "Ruby - StockQuoteServiceImpl.getQuote ", symbol, "\n"
+
+ return 80.0
+ end
+
+end
\ No newline at end of file
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd Thu Sep 21 17:32:13 2006
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!--
+ Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed 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.
+ -->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
+
+ <xs:element name="StockQuotes" type="tStockQuotes"/>
+ <xs:complexType name="tStockQuotes">
+ <xs:sequence>
+ <xs:element name="Stock" type="tStock" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##any" processContents="lax"/>
+ </xs:complexType>
+
+ <xs:complexType name="tStock">
+ <xs:sequence>
+ <xs:element minOccurs="0" maxOccurs="1" name="Symbol" type="xs:string"/>
+ <xs:element minOccurs="0" maxOccurs="1" name="Last" type="xs:float"/>
+ <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:anyAttribute namespace="##any" processContents="lax"/>
+ </xs:complexType>
+</xs:schema>
\ No newline at end of file
Propchange: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteTypes.xsd
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteWebService.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteWebService.wsdl?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteWebService.wsdl (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/StockQuoteWebService.wsdl Thu Sep 21 17:32:13 2006
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed 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:http="http://schemas.xmlsoap.org/wsdl/http/"
+ xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+ xmlns:s="http://www.w3.org/2001/XMLSchema"
+ xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
+ xmlns:tns="http://www.webserviceX.NET/"
+ xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/"
+ xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
+ targetNamespace="http://www.webserviceX.NET/"
+ xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
+ <wsdl:types>
+ <s:schema elementFormDefault="qualified"
+ targetNamespace="http://www.webserviceX.NET/">
+ <s:element name="GetQuote">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="symbol" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+
+ </s:element>
+ <s:element name="GetQuoteResponse">
+ <s:complexType>
+ <s:sequence>
+ <s:element minOccurs="0" maxOccurs="1"
+ name="GetQuoteResult" type="s:string" />
+ </s:sequence>
+ </s:complexType>
+ </s:element>
+ <s:element name="string" nillable="true" type="s:string" />
+
+ </s:schema>
+ </wsdl:types>
+ <wsdl:message name="GetQuoteSoapIn">
+ <wsdl:part name="parameters" element="tns:GetQuote" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteSoapOut">
+ <wsdl:part name="parameters" element="tns:GetQuoteResponse" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpGetIn">
+
+ <wsdl:part name="symbol" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpGetOut">
+ <wsdl:part name="Body" element="tns:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpPostIn">
+ <wsdl:part name="symbol" type="s:string" />
+ </wsdl:message>
+ <wsdl:message name="GetQuoteHttpPostOut">
+
+ <wsdl:part name="Body" element="tns:string" />
+ </wsdl:message>
+ <wsdl:portType name="StockQuoteSoap">
+ <wsdl:operation name="GetQuote">
+ <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
+ Get Stock quote for a company Symbol
+ </documentation>
+ <wsdl:input message="tns:GetQuoteSoapIn" />
+ <wsdl:output message="tns:GetQuoteSoapOut" />
+ </wsdl:operation>
+
+ </wsdl:portType>
+ <wsdl:portType name="StockQuoteHttpGet">
+ <wsdl:operation name="GetQuote">
+ <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
+ Get Stock quote for a company Symbol
+ </documentation>
+ <wsdl:input message="tns:GetQuoteHttpGetIn" />
+ <wsdl:output message="tns:GetQuoteHttpGetOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+
+ <wsdl:portType name="StockQuoteHttpPost">
+ <wsdl:operation name="GetQuote">
+ <documentation xmlns="http://schemas.xmlsoap.org/wsdl/">
+ Get Stock quote for a company Symbol
+ </documentation>
+ <wsdl:input message="tns:GetQuoteHttpPostIn" />
+ <wsdl:output message="tns:GetQuoteHttpPostOut" />
+ </wsdl:operation>
+ </wsdl:portType>
+ <wsdl:binding name="StockQuoteSoap" type="tns:StockQuoteSoap">
+
+ <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
+ style="document" />
+ <wsdl:operation name="GetQuote">
+ <soap:operation
+ soapAction="http://www.webserviceX.NET/GetQuote" style="document" />
+ <wsdl:input>
+ <soap:body use="literal" />
+ </wsdl:input>
+ <wsdl:output>
+ <soap:body use="literal" />
+ </wsdl:output>
+
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="StockQuoteHttpGet"
+ type="tns:StockQuoteHttpGet">
+ <http:binding verb="GET" />
+ <wsdl:operation name="GetQuote">
+ <http:operation location="/GetQuote" />
+ <wsdl:input>
+ <http:urlEncoded />
+ </wsdl:input>
+
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:binding name="StockQuoteHttpPost"
+ type="tns:StockQuoteHttpPost">
+ <http:binding verb="POST" />
+ <wsdl:operation name="GetQuote">
+ <http:operation location="/GetQuote" />
+
+ <wsdl:input>
+ <mime:content type="application/x-www-form-urlencoded" />
+ </wsdl:input>
+ <wsdl:output>
+ <mime:mimeXml part="Body" />
+ </wsdl:output>
+ </wsdl:operation>
+ </wsdl:binding>
+ <wsdl:service name="StockQuote">
+
+ <wsdl:port name="StockQuoteSoap" binding="tns:StockQuoteSoap">
+ <soap:address
+ location="http://www.webservicex.net/stockquote.asmx" />
+ </wsdl:port>
+ <wsdl:port name="StockQuoteHttpGet"
+ binding="tns:StockQuoteHttpGet">
+ <http:address
+ location="http://www.webservicex.net/stockquote.asmx" />
+ </wsdl:port>
+ <wsdl:port name="StockQuoteHttpPost"
+ binding="tns:StockQuoteHttpPost">
+ <http:address
+ location="http://www.webservicex.net/stockquote.asmx" />
+ </wsdl:port>
+
+ </wsdl:service>
+</wsdl:definitions>
\ No newline at end of file
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/bigbank.account.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/bigbank.account.composite?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/bigbank.account.composite (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/bigbank.account.composite Thu Sep 21 17:32:13 2006
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright (c) 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed 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.
+ -->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="bigbank.account">
+
+ <service name="AccountService">
+ <interface.wsdl interface="http://www.bigbank.com/AccountService#wsdl.interface(AccountService)"/>
+ <!-- The endpoint is optional -->
+ <!-- <binding.ws endpoint="http://www.bigbank.com/AccountService#wsdl.endpoint(AccountService/AccountServiceSOAP)"/> -->
+ <binding.ws/>
+ <reference>AccountServiceComponent</reference>
+ </service>
+
+ <component name="AccountServiceComponent">
+ <implementation.ruby script="AccountServiceImpl.rb" class="AccountServiceImpl"/>
+ <reference name="accountDataService">AccountDataServiceComponent</reference>
+ <reference name="stockQuoteService">StockQuoteServiceComponent</reference>
+ <property name="currency">EURO</property>
+ </component>
+
+ <component name="AccountDataServiceComponent">
+ <implementation.ruby script="AccountDataServiceImpl.rb" class="AccountDataServiceImpl"/>
+ </component>
+
+ <component name="StockQuoteServiceComponent">
+ <implementation.ruby script="StockQuoteServiceImpl.rb" class="StockQuoteServiceImpl"/>
+ <reference name="webService">StockQuoteWebService</reference>
+ </component>
+
+ <reference name="StockQuoteWebService">
+ <interface.wsdl interface="http://www.webserviceX.NET/#wsdl.interface(StockQuoteSoap)"/>
+ <binding.ws endpoint="http://www.webserviceX.NET/#wsdl.endpoint(StockQuote/StockQuoteSoap)"/>
+ </reference>
+
+</composite>
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.bat
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.bat?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.bat (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.bat Thu Sep 21 17:32:13 2006
@@ -0,0 +1,48 @@
+@echo off
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+setlocal
+
+if "%TUSCANY_SCACPP%" == "" (
+echo "TUSCANY_SCACPP not set"
+goto end
+)
+echo Using SCA installed at %TUSCANY_SCACPP%
+
+if "%TUSCANY_SDOCPP%" == "" (
+echo "TUSCANY_SDOCPP not set"
+goto end
+)
+echo Using SDO installed at %TUSCANY_SDOCPP%
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+echo Using Axis2C installed at %AXIS2C_HOME%
+
+set APFULLDIR=%~d0%~p0
+set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\
+set TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent
+
+rem Run the client
+set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SCACPP%\extensions\cpp\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
+
+cd %AXIS2C_HOME%\bin
+.\axis2_http_server.exe
+
+:end
+endlocal
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.sh
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.sh?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.sh (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.sh Thu Sep 21 17:32:13 2006
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+# Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+#
+# Licensed 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.
+
+APFULLDIR=`pwd`
+
+if [ x$TUSCANY_SCACPP = x ]; then
+echo "TUSCANY_SCACPP not set"
+exit;
+fi
+echo "Using SCA installed at $TUSCANY_SCACPP"
+
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"
+exit;
+fi
+echo "Using SDO installed at $TUSCANY_SDOCPP"
+
+if [ x$AXIS2C_HOME = x ]; then
+echo "AXIS2C_HOME not set"
+exit;
+fi
+echo "Using Axis2C installed at $AXIS2C_HOME"
+
+TEST_SYSTEM=$APFULLDIR/../
+
+export LD_LIBRARY_PATH=$TUSCANY_SCACPP/extensions/cpp/lib:$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM
+export TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent
+
+cd $AXIS2C_HOME/bin
+./axis2_http_server
Propchange: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.account/runwsserver.sh
------------------------------------------------------------------------------
svn:executable = *
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.accountmanagement/bigbank.accountmanagement.composite
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.accountmanagement/bigbank.accountmanagement.composite?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.accountmanagement/bigbank.accountmanagement.composite (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.accountmanagement/bigbank.accountmanagement.composite Thu Sep 21 17:32:13 2006
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+
+ Licensed 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.
+ -->
+
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0"
+ name="bigbank.accountmanagement">
+
+ <component name="bigbank.AccountManagementComponent">
+ <implementation.composite name="bigbank.account"/>
+ </component>
+
+</composite>
+
\ No newline at end of file
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/AccountClient.rb
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/AccountClient.rb?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/AccountClient.rb (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/AccountClient.rb Thu Sep 21 17:32:13 2006
@@ -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.
+#
+#
+
+require("tuscany_sca_ruby")
+
+accountService = SCA::locateService("AccountServiceComponent")
+
+report = accountService.getAccountReport(1234)
+
+print report
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/Makefile.am?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/Makefile.am (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/Makefile.am Thu Sep 21 17:32:13 2006
@@ -0,0 +1,7 @@
+deploydir=$(prefix)/samples/RubyBank/deploy
+clientdir=$(deploydir)/packages/bigbank.client
+prgbindir=$(deploydir)/bin
+
+client_DATA = *.rb
+prgbin_SCRIPTS = runclient.sh
+EXTRA_DIST = runclient.sh *.rb
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.bat
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.bat?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.bat (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.bat Thu Sep 21 17:32:13 2006
@@ -0,0 +1,48 @@
+@echo off
+
+@REM Copyright 2006 The Apache Software Foundation or its licensors, as applicable.
+@REM
+@REM Licensed under the Apache License, Version 2.0 (the "License");
+@REM you may not use this file except in compliance with the License.
+@REM You may obtain a copy of the License at
+@REM
+@REM http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing, software
+@REM distributed under the License is distributed on an "AS IS" BASIS,
+@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@REM See the License for the specific language governing permissions and
+@REM limitations under the License.
+
+setlocal
+
+if "%TUSCANY_SCACPP%" == "" (
+echo "TUSCANY_SCACPP not set"
+goto end
+)
+echo Using SCA installed at %TUSCANY_SCACPP%
+
+if "%TUSCANY_SDOCPP%" == "" (
+echo "TUSCANY_SDOCPP not set"
+goto end
+)
+echo Using SDO installed at %TUSCANY_SDOCPP%
+
+if "%AXIS2C_HOME%" == "" (
+echo "AXIS2C_HOME not set"
+goto end
+)
+echo Using Axis2C installed at %AXIS2C_HOME%
+
+set APFULLDIR=%~d0%~p0
+set TUSCANY_SCACPP_SYSTEM_ROOT=%~d0%~p0\..\
+set TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent
+
+rem Run the client
+set PATH=%TUSCANY_SCACPP%\bin;%TUSCANY_SDOCPP%\bin;%AXIS2C_HOME%\lib;%PATH%
+
+cd %TUSCANY_SCACPP_SYSTEM_ROOT%\packages\bigbank.client
+ruby -I%TUSCANY_SCACPP%\extensions\ruby\lib AccountClient.rb
+
+:end
+endlocal
Added: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.sh
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.sh?view=auto&rev=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.sh (added)
+++ incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.sh Thu Sep 21 17:32:13 2006
@@ -0,0 +1,45 @@
+#!/bin/sh
+
+# Copyright 2005 The Apache Software Foundation or its licensors, as applicable.
+#
+# Licensed 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.
+
+APFULLDIR=`pwd`
+
+if [ x$TUSCANY_SCACPP = x ]; then
+echo "TUSCANY_SCACPP not set"
+exit;
+fi
+echo "Using SCA installed at $TUSCANY_SCACPP"
+
+if [ x$TUSCANY_SDOCPP = x ]; then
+echo "TUSCANY_SDOCPP not set"
+exit;
+fi
+echo "Using SDO installed at $TUSCANY_SDOCPP"
+
+if [ x$AXIS2C_HOME = x ]; then
+echo "AXIS2C_HOME not set"
+exit;
+fi
+echo "Using Axis2C installed at $AXIS2C_HOME"
+
+TEST_SYSTEM=$APFULLDIR/../
+
+export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$AXIS2C_HOME/lib:$LD_LIBRARY_PATH
+
+export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_SYSTEM
+export TUSCANY_SCACPP_DEFAULT_COMPONENT=bigbank.AccountManagementComponent
+
+cd $TUSCANY_SCACPP_SYSTEM_ROOT/packages/bigbank.client
+ruby -I$TUSCANY_SCACPP/extensions/ruby/lib AccountClient.rb
Propchange: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.sh
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/samples/RubyBank/bigbank.client/runclient.sh
------------------------------------------------------------------------------
svn:executable = *
Modified: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Makefile.am?view=diff&rev=448749&r1=448748&r2=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Makefile.am (original)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Makefile.am Thu Sep 21 17:32:13 2006
@@ -2,6 +2,7 @@
compositedir=$(deploydir)/packages/sample.calculator
prgbindir=$(deploydir)/bin
-composite_DATA = *.composite *.wsdl *.rb
prgbin_SCRIPTS = runwsserver.sh
+
+composite_DATA = *.composite *.wsdl *.rb
EXTRA_DIST = *.composite *.wsdl *.rb runwsserver.sh
Modified: incubator/tuscany/cpp/sca/samples/configure.ac
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/configure.ac?view=diff&rev=448749&r1=448748&r2=448749
==============================================================================
--- incubator/tuscany/cpp/sca/samples/configure.ac (original)
+++ incubator/tuscany/cpp/sca/samples/configure.ac Thu Sep 21 17:32:13 2006
@@ -41,6 +41,9 @@
BigBank/bigbank.account/Makefile
BigBank/bigbank.client/Makefile
BigBank/bigbank.wsclient/Makefile
+ RubyBank/Makefile
+ RubyBank/bigbank.account/Makefile
+ RubyBank/bigbank.client/Makefile
])
AC_OUTPUT
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org