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 --- .../sca/samples/MyValue/Client/Makefile.am | 11 ++ .../sca/samples/MyValue/Client/MyValueClient.cpp | 184 +++++++++++++++++++++ .../sca/samples/MyValue/Makefile.am | 22 +++ .../MyValue/MyValueComposite/CustomerInfo.fragment | 39 +++++ .../MyValueComposite/CustomerInfo/CustomerInfo.h | 32 ++++ .../CustomerInfo/CustomerInfoImpl.componentType | 33 ++++ .../CustomerInfo/CustomerInfoImpl.cpp | 81 +++++++++ .../CustomerInfo/CustomerInfoImpl.h | 38 +++++ .../MyValueComposite/CustomerInfo/Makefile.am | 15 ++ .../samples/MyValue/MyValueComposite/Makefile.am | 10 ++ .../MyValue/MyValueComposite/MyValue/Makefile.am | 17 ++ .../MyValue/MyValueComposite/MyValue/MyValue.h | 34 ++++ .../MyValue/MyValueImpl.componentType | 39 +++++ .../MyValueComposite/MyValue/MyValueImpl.cpp | 147 ++++++++++++++++ .../MyValue/MyValueComposite/MyValue/MyValueImpl.h | 37 +++++ .../MyValueComposite/MyValue/MyValueService.wsdl | 84 ++++++++++ .../MyValueComposite/MyValue/MyValueService.xsd | 42 +++++ .../StockQuoteService/StockQuoteService.h | 34 ++++ .../StockQuoteService/StockQuoteService.wsdl | 157 ++++++++++++++++++ .../samples/MyValue/MyValueComposite/sca.composite | 55 ++++++ .../samples/MyValue/MyValueSubsystem/sca.subsystem | 30 ++++ .../sca/samples/MyValue/runMyValueClient.sh | 53 ++++++ .../sca/samples/MyValue/server.wsdd | 40 +++++ 23 files changed, 1234 insertions(+) create mode 100644 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Client/Makefile.am create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Client/MyValueClient.cpp create mode 100644 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Makefile.am create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo.fragment create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfo.h create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.componentType create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.cpp create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.h create mode 100644 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/Makefile.am create mode 100644 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/Makefile.am create mode 100644 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/Makefile.am create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValue.h create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.componentType create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.cpp create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.h create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.wsdl create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.xsd create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.h create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.wsdl create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/sca.composite create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueSubsystem/sca.subsystem create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/runMyValueClient.sh create mode 100755 tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/server.wsdd (limited to 'tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue') diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Client/Makefile.am b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Client/Makefile.am new file mode 100644 index 0000000000..b1586cc752 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Client/Makefile.am @@ -0,0 +1,11 @@ +prgbindir=$(prefix)/samples/bin +prgbin_PROGRAMS = MyValueClient + +MyValueClient_SOURCES = MyValueClient.cpp + +MyValueClient_LDADD = -L$(top_builddir)/runtime/core/src -ltuscany_sca \ + -L${TUSCANY_SDOCPP}/lib -ltuscany_sdo -lxml2 + +INCLUDES = -I.. \ + -I$(top_builddir)/runtime/core/src \ + -I${TUSCANY_SDOCPP}/include diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Client/MyValueClient.cpp b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Client/MyValueClient.cpp new file mode 100755 index 0000000000..0919c539da --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Client/MyValueClient.cpp @@ -0,0 +1,184 @@ +/* + * 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. + */ + +/* $Rev$ $Date$ */ + +#pragma warning(disable: 4786) + +#include "commonj/sdo/Logger.h" +#include "commonj/sdo/SDO.h" +#include "commonj/sdo/HelperProvider.h" +#include "osoa/sca/sca.h" +#include "tuscany/sca/util/Logger.h" +#include "tuscany/sca/util/Utils.h" +#include + +using namespace std; +using namespace osoa::sca; +using namespace tuscany::sca; +using namespace commonj::sdo; +using namespace tuscany::sca::ws; + +void usage(); + +// +// MyValueClient is a sample application that invokes operations on the +// MyValueService Web Service. +// +int main(int argc, char* argv[]) +{ + + // + // Schema file for the types used by MyValueService + // + char *pszXSD; + + // + // The WebService endpoint uri. + // + char *pszEndpoint; + + // + // TargetNamespace + // + const char *pszTargetNamespace; + + // + // SOAPAction + // + // Axis 1.5: SoapAction must be #. + const char *pcszSoapAction = "MyValueService#getMyValue"; + + // + // Operation Name + // + const char *pcszOperationName = "getMyValue"; + + // + // Operation Response Name + // + const char *pcszOperationResponseName = "getMyValueResponse"; + + + // Get the input parameters. + if (argc == 3) + { + // Schema file. + pszXSD = argv[1]; + // Web Service endpoint. + pszEndpoint = argv[2]; + } + else + { + usage(); + } + + // The current version of SDO does not support the embedded schema in the wsdl file, + // so we have to load an external schema. + XSDHelperPtr xsdHelper = HelperProvider::getXSDHelper(); + + try + { + cout << "define file: " << pszXSD <defineFile(pszXSD); + } + catch (SDORuntimeException ex) + { + cout << ex << endl; + exit(1); + } + cout << "define file done: " << pszTargetNamespace <getDataFactory(); + DataObjectPtr requestDO = 0; + + try + { + // Create the root element for the operation and then add the parameters + // we need to invoke the operation. + requestDO = factory->create(pszTargetNamespace, pcszOperationName); + requestDO->setCString("customerID", "12345"); + } + catch (SDORuntimeException e) + { + cout << "SDORuntimeException: " << e << endl; + exit(1); + } + + // + // Create an SDOStub that will use the request SDO to invoke the operation. + // + SDOStub *stub = new SDOStub(); + stub->setEndpoint(pszEndpoint); + stub->setOperationName(pcszOperationName); + stub->setTargetNamespace(pszTargetNamespace); + stub->setOperationResponseName(pcszOperationResponseName); + stub->setSoapAction(pcszSoapAction); + // DEBUG - Don't let the soap transport timeout while debugging. + stub->setTransportTimeout(0); + // DEBUG + + try + { + // Invoke the operation. + DataObjectPtr responseDO = stub->invoke(requestDO, factory); + // Print the response. + if (responseDO != 0) + { + cout << "MyValueClient: response DataObject = " << endl; + Utils::printDO(responseDO); + cout << endl; + float fValue = responseDO->getFloat("myValue"); + cout << "MyValueClient: myValue = " << fValue; + } + else + { + cout << "MyValueClient: MyValueService did not return a result" << endl; + } + } + catch (SDORuntimeException& e) + { + cout << "SDORuntimeException: " << e << endl; + } + catch (ServiceRuntimeException& e) + { + cout << "ServiceRuntimeException: " << e << endl; + } + catch(exception& e) + { + cout << "Exception: " << e.what() << endl; + } + + + return 0; +} + +// +// Print usage message. +// +void usage() +{ + cout << "MyValueClient.exe: Invoke operations on MyValueService Web Service" << endl; + cout << "Usage: MyValueClient XSD endpoint" << endl; + cout << "where XSD = path and name of XSD file that defines the MyValue types" << endl; + cout << " endpoint = web service endpoint" << endl; + exit(1); +} diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Makefile.am b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Makefile.am new file mode 100644 index 0000000000..ede24623cf --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/Makefile.am @@ -0,0 +1,22 @@ +SUBDIRS = MyValueComposite Client + +deploy_dir = $(top_builddir)/samples/runtime +deploy_composite = $(deploy_dir)/packages/MyValueComposite + +install-exec-local: + cp MyValueSubsystem/sca.subsystem $(deploy_dir)/configuration/MyValueSubsystem + cp MyValueComposite/sca.composite $(deploy_composite) + cp MyValueComposite/CustomerInfo.fragment $(deploy_composite) + cp MyValueComposite/CustomerInfo/CustomerInfoImpl.componentType $(deploy_composite)/CustomerInfo + cp MyValueComposite/CustomerInfo/.libs/libCustomerInfo$libsuffix) $(deploy_composite)/CustomerInfo + cp MyValueComposite/CustomerInfo/CustomerInfo.h $(deploy_composite)/CustomerInfo + cp MyValueComposite/CustomerInfo/CustomerInfoImpl.h $(deploy_composite)/CustomerInfo + cp MyValueComposite/MyValue/MyValueImpl.componentType $(deploy_composite)/MyValue + cp MyValueComposite/MyValue/MyValue.h $(deploy_composite)/MyValue + cp MyValueComposite/MyValue/MyValueImpl.h $(deploy_composite)/MyValue + cp MyValueComposite/MyValue/MyValueService.wsdl $(deploy_composite)/MyValue + cp MyValueComposite/MyValue/.libs/libMyValue$libsuffix) $(deploy_composite)/MyValue + cp MyValueComposite/StockQuoteService/StockQuoteService.h $(deploy_composite)/StockQuoteService + cp MyValueComposite/StockQuoteService/StockQuoteService.wsdl $(deploy_composite)/StockQuoteService + + diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo.fragment b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo.fragment new file mode 100755 index 0000000000..2227f730dd --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo.fragment @@ -0,0 +1,39 @@ + + + + + + + + + + x + 23 + 42 + + + + + + + \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfo.h b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfo.h new file mode 100755 index 0000000000..61d3e18133 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfo.h @@ -0,0 +1,32 @@ +/* + * 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. + */ + +/* $Rev$ $Date$ */ + +#ifndef CustomerInfo_h +#define CustomerInfo_h + +class CustomerInfo +{ +public: + virtual const char* getCustomerInformation(const char* customerID) = 0; + +}; + +#endif diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.componentType b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.componentType new file mode 100755 index 0000000000..caed4c5327 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.componentType @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.cpp b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.cpp new file mode 100755 index 0000000000..1a50dd4426 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/CustomerInfo/CustomerInfoImpl.cpp @@ -0,0 +1,81 @@ +/* + * 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. + */ + +/* $Rev$ $Date$ */ + +#include "CustomerInfoImpl.h" +#include +#include +#include "osoa/sca/sca.h" +#include "commonj/sdo/DataObjectInstance.h" +using namespace osoa::sca; +using namespace commonj::sdo; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +CustomerInfoImpl::CustomerInfoImpl() +{ + cout << "Construct CustomerInfoImpl" << endl; + +} + +CustomerInfoImpl::~CustomerInfoImpl() +{ + cout << "Destroy CustomerInfoImpl" << endl; +} + +////////////////////////////////////////////////////////////////////// +// Other methods +////////////////////////////////////////////////////////////////////// +const char* CustomerInfoImpl::getCustomerInformation(const char* customerID) +{ + cout << "In getCustomerInformation with customerid: " << customerID << endl; + + + + ComponentContext myContext = ComponentContext::getCurrent(); + + DataObjectInstance properties = myContext.getProperties(); + DataObjectInstance props2 = properties; + if (properties) + { + const char* fredVal = properties->getCString("Fred"); + cout << "Property Fred value: " << fredVal <getList("Joe"); + for (int i=0; i + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.cpp b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.cpp new file mode 100755 index 0000000000..5c0d5506d3 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.cpp @@ -0,0 +1,147 @@ +/* + * 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. + */ + +/* $Rev$ $Date$ */ + +// +// MyValueImpl.cpp: implementation of the MyValueImpl class. +// + +#include "commonj/sdo/HelperProvider.h" +#include "commonj/sdo/SDO.h" +#include "osoa/sca/sca.h" +#include "MyValueImpl.h" +#include "CustomerInfo/CustomerInfo.h" +#include "StockQuoteService/StockQuoteService.h" +#include + +using namespace std; +using namespace osoa::sca; +using namespace commonj::sdo; + +////////////////////////////////////////////////////////////////////// +// Construction/Destruction +////////////////////////////////////////////////////////////////////// + +MyValueImpl::MyValueImpl() +{ + cout << "Construct MyValueImpl" << endl; + +} + +MyValueImpl::~MyValueImpl() +{ + cout << "Destroy MyValueImpl" << endl; +} + +////////////////////////////////////////////////////////////////////// +// Other methods +////////////////////////////////////////////////////////////////////// +DataObjectPtr MyValueImpl::getMyValue(DataObjectPtr inDataObject) +{ + DataObjectPtr responseDO = 0; + + string customerID = inDataObject->getCString("customerID"); + cout << "In getMyValue with customerid: " << customerID << endl; + + // Get the CustomerInfo service. + ComponentContext myContext = ComponentContext::getCurrent(); + CustomerInfo* customerInfoService = (CustomerInfo*)myContext.getService("customerInfo"); + + if (customerInfoService == 0) + { + cout << "Unable to find customer info service" << endl; + + return responseDO; + } + + // Get the name of the stock for customer 'customerID' from the customerInfoService. + const char * stock; + try + { + stock = customerInfoService->getCustomerInformation(customerID.c_str()); + } + catch(const char* x) + { + cout << "Exception caught: " << x <getCustomerInformation(customerID.c_str()); + cout << "Stock from getServices " << i << " : " << stock <create("http://swanandmokashi.com", "GetQuotes"); + stockQuoteRequestDO->setCString("QuoteTicker", stock); + + // Invoke the StockQuoteService + DataObjectPtr stockQuoteResponseDO = stockQuoteService->GetStockQuotes(stockQuoteRequestDO); + + // DEBUG (Print the response from the StockQuoteService) + XMLHelperPtr xmlHelper = HelperProvider::getXMLHelper(factory);; + XMLDocumentPtr responseDoc = + xmlHelper->createDocument(stockQuoteResponseDO, "http://swanandmokashi.com", "GetQuotesResponse"); + responseDoc->setXMLDeclaration(false); + char *responseXML = xmlHelper->save(responseDoc); + cout << "Response XML from StockQuoteService = " << endl; + cout << responseXML << endl; + cout << endl; + // DEBUG + + // Create the MyValueService response DataObject using the results of the StockQuoteService. + responseDO = factory->create("http://www.myvalue.org/MyValueService/", "getMyValueResponse"); + DataObjectPtr getQuotesResultDO = stockQuoteResponseDO->getDataObject("GetQuotesResult"); + DataObjectList& quoteList = getQuotesResultDO->getList("Quote"); + float fQuote = quoteList[0]->getFloat("StockQuote"); + + responseDO->setFloat("myValue", fQuote); + } + catch (SDORuntimeException sdoE) + { + cout << sdoE; + } + + return responseDO; + +} + diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.h b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.h new file mode 100755 index 0000000000..6380dac5e0 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueImpl.h @@ -0,0 +1,37 @@ +/* + * 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. + */ + +/* $Rev$ $Date$ */ + + +#ifndef MyValueImpl_h +#define MyValueImpl_h + +#include "MyValue.h" + + +class MyValueImpl : public MyValue +{ +public: + MyValueImpl(); + virtual ~MyValueImpl(); + virtual DataObjectPtr getMyValue(DataObjectPtr inDataObject); +}; + +#endif diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.wsdl b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.wsdl new file mode 100755 index 0000000000..6ea196e311 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.wsdl @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.xsd b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.xsd new file mode 100755 index 0000000000..ab2f25a826 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/MyValue/MyValueService.xsd @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.h b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.h new file mode 100755 index 0000000000..fda8a80e89 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.h @@ -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. + */ + +/* $Rev$ $Date$ */ + +#ifndef StockQuoteService_h +#define StockQuoteService_h +#include +#include "commonj/sdo/SDO.h" +using std::string; +class StockQuoteService +{ +public: + virtual commonj::sdo::DataObjectPtr GetStockQuotes(commonj::sdo::DataObjectPtr request) = 0; + +}; + +#endif // StockQuoteService_h diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.wsdl b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.wsdl new file mode 100755 index 0000000000..159d15c2d8 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/StockQuoteService/StockQuoteService.wsdl @@ -0,0 +1,157 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/sca.composite b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/sca.composite new file mode 100755 index 0000000000..52461c7650 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueComposite/sca.composite @@ -0,0 +1,55 @@ + + + + + + + + + + + MyValueServiceComponent + + + + + + + + CustomerInfoComponent + StockQuoteService + + + + + + + + + + + + \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueSubsystem/sca.subsystem b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueSubsystem/sca.subsystem new file mode 100755 index 0000000000..7336b818b7 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/MyValueSubsystem/sca.subsystem @@ -0,0 +1,30 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/runMyValueClient.sh b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/runMyValueClient.sh new file mode 100755 index 0000000000..6a8a60c490 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/runMyValueClient.sh @@ -0,0 +1,53 @@ +#!/bin/sh + +# 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. + +APFULLDIR=`pwd` + +export SCA4CPP_HOME="$APFULLDIR" +if [ x$SCA4CPP = x ]; then +export TUSCANY_SCACPP="$SCA4CPP_HOME" +fi +echo "Using SCA installed at $SCA4CPP_HOME" + +if [ x$AXISCPP_DEPLOY = x ]; then +echo "AXISCPP_DEPLOY not set" +exit; +fi +echo "Using Axis C++ installed at $AXISCPP_DEPLOY" + +if [ x$XERCES_DEPLOY = x ]; then +echo "XERCES_DEPLOY not set" +exit; +fi +echo "Using Xerces C++ installed at $XERCES_DEPLOY" + +if [ x$TUSCANY_SDOCPP = x ]; then +echo "TUSCANY_SDOCPP not set"exit; +fi +echo "Using SDO installed at $TUSCANY_SDOCPP" + +TEST_ROOT=$SCA4CPP_HOME/runtime/core/test + +export LD_LIBRARY_PATH=$TUSCANY_SCACPP/lib:$TUSCANY_SDOCPP/lib:$LD_LIBRARY_PATH:$AXISCPP_DEPLOY/lib:$XERCES_DEPLOY/lib + +export TUSCANY_SCACPP_SYSTEM_ROOT=$TEST_ROOT/testSCASystem +export TUSCANY_SCACPP_DEFAULT_COMPOSITE=SubSystem1 + +cd $TUSCANY_SCACPP/bin/test +./tuscany_sca_test diff --git a/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/server.wsdd b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/server.wsdd new file mode 100755 index 0000000000..1a82ab85a7 --- /dev/null +++ b/tags/cpp-1.0-incubating-M2-RC1/sca/samples/MyValue/server.wsdd @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + -- cgit v1.2.3