diff options
Diffstat (limited to 'tags/cpp-0.1.incubating-M1-RC3b/sca/test')
46 files changed, 3922 insertions, 0 deletions
diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.c b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.c new file mode 100644 index 0000000000..66e90c2fc2 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.c @@ -0,0 +1,414 @@ +/* + * Copyright 2004,2005 The Apache Software Foundation. + * + * 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. + */ + +#include <stdio.h> +#include <axiom.h> +#include <axis2_util.h> +#include <axiom_soap.h> +#include <axis2_client.h> + +axiom_node_t * +build_om_payload_for_doDataObject(axis2_env_t *env); + +axiom_node_t * +build_om_payload_for_doDataObject_Failure(axis2_env_t *env); + +axiom_node_t * +build_om_payload_for_doAny(axis2_env_t *env); + +axiom_node_t * +build_om_payload_for_doMixed(axis2_env_t *env); + +axiom_node_t * +build_om_payload_for_doSingleData(axis2_env_t *env, char* name, char* data); + +void runCall(axis2_env_t* env, char* endpoint, char* opName, axiom_node_t* payload, int expectFailure); + +int main(int argc, char** argv) +{ + axis2_env_t *env = NULL; + axis2_char_t *address = NULL; + axis2_endpoint_ref_t* endpoint_ref = NULL; + axis2_options_t *options = NULL; + axis2_char_t *client_home = NULL; + axis2_svc_client_t* svc_client = NULL; + axiom_node_t *payload = NULL; + axiom_node_t *ret_node = NULL; + + /* Set up the envioronment */ + env = axis2_env_create_all("wsentrypointtest.log", AXIS2_LOG_LEVEL_TRACE); + + /* Set end point reference of echo service */ + address = "http://localhost:9090/axis2/services/WSEntryPointTest"; + if (argc > 1 ) + address = argv[1]; + if (AXIS2_STRCMP(address, "-h") == 0) + { + printf("Usage : %s [endpoint_url]\n", argv[0]); + printf("use -h for help\n"); + return 0; + } + printf ("Using endpoint : %s\n", address); + + + /* do all the single data types */ + payload = build_om_payload_for_doSingleData(env, "doChars", "Here is some char* data"); + runCall(env, address, "doChars", payload, 0); + payload = build_om_payload_for_doSingleData(env, "doLong", "123456789"); + runCall(env, address, "doLong", payload, 0); + payload = build_om_payload_for_doSingleData(env, "doInt", "123456789"); + runCall(env, address, "doInt", payload, 0); + payload = build_om_payload_for_doSingleData(env, "doFloat", "123.45"); + runCall(env, address, "doFloat", payload, 0); + payload = build_om_payload_for_doSingleData(env, "doLongDouble", "12345.67891"); + runCall(env, address, "doLongDouble", payload, 0); + payload = build_om_payload_for_doSingleData(env, "doDouble", "1234.4567"); + runCall(env, address, "doDouble", payload, 0); + payload = build_om_payload_for_doSingleData(env, "doBool", "true"); + runCall(env, address, "doBool", payload, 0); + payload = build_om_payload_for_doSingleData(env, "doShort", "12345"); + runCall(env, address, "doShort", payload, 0); + payload = build_om_payload_for_doSingleData(env, "doBytes", "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"); + runCall(env, address, "doBytes", payload, 0); + payload = build_om_payload_for_doSingleData(env, "doByte", "66"); + runCall(env, address, "doByte", payload, 0); + payload = build_om_payload_for_doDataObject(env); + runCall(env, address, "doDataObject", payload, 0); + payload = build_om_payload_for_doMixed(env); + runCall(env, address, "doMixed", payload, 0); + payload = build_om_payload_for_doAny(env); + runCall(env, address, "doAny", payload, 0); + + payload = build_om_payload_for_doDataObject_Failure(env); + runCall(env, address, "doDataObject", payload, 1); + + return 0; +} + +void runCall(axis2_env_t *env, char* endpoint, char* opName, axiom_node_t* payload, int expectFailure) +{ + axis2_char_t *address = endpoint; + axis2_endpoint_ref_t* endpoint_ref = NULL; + axis2_options_t *options = NULL; + axis2_char_t *client_home = NULL; + axis2_svc_client_t* svc_client = NULL; + axiom_node_t *ret_node = NULL; + char action [100]; + int len = 0; + + printf("runSingleDataCall with endpoint %s, opName %s\n", endpoint, opName); + + client_home = AXIS2_GETENV("AXIS2C_HOME"); + + /* Create EPR with given address */ + endpoint_ref = axis2_endpoint_ref_create(env, address); + + svc_client = axis2_svc_client_create(env, client_home); + if (!svc_client) + { + printf("Error creating service client\n"); + AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" + " %d :: %s", env->error->error_number, + AXIS2_ERROR_GET_MESSAGE(env->error)); + } + + options = axis2_options_create(env); + + AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref); + + len = sprintf(action, "http://www.WSEntryPointTest.org/WSEntryPointTest/%s", opName); + AXIS2_OPTIONS_SET_ACTION(options, env, action); + + /* Set service client options */ + AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, env, options); + + /* Engage addressing module */ + AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, env, AXIS2_MODULE_ADDRESSING); + + /* Send request */ + ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload); + if(ret_node) + { + axis2_char_t *om_str = NULL; + om_str = AXIOM_NODE_TO_STRING(ret_node, env); + if (om_str) + printf("\nReceived OM : %s\n", om_str); + printf("\nWSEntryPointTest %s invoke SUCCESSFUL!\n", opName); + } + else + { + if(expectFailure) + { + printf("\nWSEntryPointTest %s failure as expected: SUCCESSFUL!\n", opName); + } + else + { + AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" + " %d :: %s", env->error->error_number, + AXIS2_ERROR_GET_MESSAGE(env->error)); + printf("WSEntryPointTest %s invoke FAILED!\n", opName); + } + } + + if (svc_client) + { + AXIS2_SVC_CLIENT_FREE(svc_client, env); + svc_client = NULL; + } + if (endpoint_ref) + { + AXIS2_ENDPOINT_REF_FREE(endpoint_ref, env); + endpoint_ref = NULL; + } +} + +/* build SOAP request message content using OM */ +axiom_node_t * +build_om_payload_for_doDataObject(axis2_env_t *env) +{ + axiom_node_t* req_om_node = NULL; + axiom_element_t* req_om_elem = NULL; + axiom_node_t* someData_om_node = NULL; + axiom_element_t* someData_om_elem = NULL; + axiom_node_t* someStringData_om_node = NULL; + axiom_element_t* someStringData_om_elem = NULL; + axiom_node_t* someIntData_om_node = NULL; + axiom_element_t* someIntData_om_elem = NULL; + axiom_node_t* someFloatData_om_node = NULL; + axiom_element_t* someFloatData_om_elem = NULL; + axiom_node_t* someDateData_om_node = NULL; + axiom_element_t* someDateData_om_elem = NULL; + axiom_node_t* someListData_om_node = NULL; + axiom_element_t* someListData_om_elem = NULL; + axiom_node_t* listItem1_om_node = NULL; + axiom_element_t* listItem1_om_elem = NULL; + axiom_node_t* listItem2_om_node = NULL; + axiom_element_t* listItem2_om_elem = NULL; + axiom_namespace_t *ns1 = NULL; + axis2_char_t *om_str = NULL; + + ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1"); + req_om_elem = axiom_element_create(env, NULL, "doDataObject", ns1, &req_om_node); + someData_om_elem = axiom_element_create(env, req_om_node, "someData", ns1, &someData_om_node); + someStringData_om_elem = axiom_element_create(env, someData_om_node, "someStringData", ns1, &someStringData_om_node); + AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "Here is some string data", someStringData_om_node); + someIntData_om_elem = axiom_element_create(env, someData_om_node, "someIntData", ns1, &someIntData_om_node); + AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node); + someFloatData_om_elem = axiom_element_create(env, someData_om_node, "someFloatData", ns1, &someFloatData_om_node); + AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node); + someDateData_om_elem = axiom_element_create(env, someData_om_node, "someDateData", ns1, &someDateData_om_node); + AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node); + someListData_om_elem = axiom_element_create(env, someData_om_node, "someListData", ns1, &someListData_om_node); + listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node); + AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node); + listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node); + AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node); + + om_str = AXIOM_NODE_TO_STRING(req_om_node, env); + if (om_str) + printf("\nSending OM : %s\n", om_str); + + return req_om_node; +} + +/* build SOAP request message content using OM */ +axiom_node_t * +build_om_payload_for_doDataObject_Failure(axis2_env_t *env) +{ + axiom_node_t* req_om_node = NULL; + axiom_element_t* req_om_elem = NULL; + axiom_node_t* someData_om_node = NULL; + axiom_element_t* someData_om_elem = NULL; + axiom_node_t* someStringData_om_node = NULL; + axiom_element_t* someStringData_om_elem = NULL; + axiom_node_t* someIntData_om_node = NULL; + axiom_element_t* someIntData_om_elem = NULL; + axiom_node_t* someFloatData_om_node = NULL; + axiom_element_t* someFloatData_om_elem = NULL; + axiom_node_t* someDateData_om_node = NULL; + axiom_element_t* someDateData_om_elem = NULL; + axiom_node_t* someListData_om_node = NULL; + axiom_element_t* someListData_om_elem = NULL; + axiom_node_t* listItem1_om_node = NULL; + axiom_element_t* listItem1_om_elem = NULL; + axiom_node_t* listItem2_om_node = NULL; + axiom_element_t* listItem2_om_elem = NULL; + axiom_namespace_t *ns1 = NULL; + axis2_char_t *om_str = NULL; + + // Create bad Axiom doc + ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1"); + req_om_elem = axiom_element_create(env, NULL, "doDataObject", ns1, &req_om_node); + someData_om_elem = axiom_element_create(env, req_om_node, "someUnknownData", ns1, &someData_om_node); + someStringData_om_elem = axiom_element_create(env, someData_om_node, "someStringData", ns1, &someStringData_om_node); + AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "Here is some string data", someStringData_om_node); + someIntData_om_elem = axiom_element_create(env, someData_om_node, "someIntData", ns1, &someIntData_om_node); + AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node); + someFloatData_om_elem = axiom_element_create(env, someData_om_node, "someFloatData", ns1, &someFloatData_om_node); + AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node); + someDateData_om_elem = axiom_element_create(env, someData_om_node, "someDateData", ns1, &someDateData_om_node); + AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node); + someListData_om_elem = axiom_element_create(env, someData_om_node, "someListData", ns1, &someListData_om_node); + listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node); + AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node); + listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node); + AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node); + + om_str = AXIOM_NODE_TO_STRING(req_om_node, env); + if (om_str) + printf("\nSending OM : %s\n", om_str); + + return req_om_node; +} + + + +/* build SOAP request message content using OM */ +axiom_node_t * +build_om_payload_for_doMixed(axis2_env_t *env) +{ + axiom_node_t* req_om_node = NULL; + axiom_element_t* req_om_elem = NULL; + axiom_node_t* arg1_om_node = NULL; + axiom_element_t* arg1_om_elem = NULL; + axiom_node_t* arg2_om_node = NULL; + axiom_element_t* arg2_om_elem = NULL; + axiom_node_t* arg3_om_node = NULL; + axiom_element_t* arg3_om_elem = NULL; + axiom_node_t* arg4_om_node = NULL; + axiom_element_t* arg4_om_elem = NULL; + axiom_node_t* arg5_om_node = NULL; + axiom_element_t* arg5_om_elem = NULL; + axiom_node_t* someStringData_om_node = NULL; + axiom_element_t* someStringData_om_elem = NULL; + axiom_node_t* someIntData_om_node = NULL; + axiom_element_t* someIntData_om_elem = NULL; + axiom_node_t* someFloatData_om_node = NULL; + axiom_element_t* someFloatData_om_elem = NULL; + axiom_node_t* someDateData_om_node = NULL; + axiom_element_t* someDateData_om_elem = NULL; + axiom_node_t* someListData_om_node = NULL; + axiom_element_t* someListData_om_elem = NULL; + axiom_node_t* listItem1_om_node = NULL; + axiom_element_t* listItem1_om_elem = NULL; + axiom_node_t* listItem2_om_node = NULL; + axiom_element_t* listItem2_om_elem = NULL; + axiom_namespace_t *ns1 = NULL; + axis2_char_t *om_str = NULL; + + ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1"); + req_om_elem = axiom_element_create(env, NULL, "doMixed", ns1, &req_om_node); + arg1_om_elem = axiom_element_create(env, req_om_node, "arg1", ns1, &arg1_om_node); + AXIOM_ELEMENT_SET_TEXT(arg1_om_elem, env, "Here is some char* data", arg1_om_node); + arg2_om_elem = axiom_element_create(env, req_om_node, "arg2", ns1, &arg2_om_node); + AXIOM_ELEMENT_SET_TEXT(arg2_om_elem, env, "123456789", arg2_om_node); + arg3_om_elem = axiom_element_create(env, req_om_node, "arg3", ns1, &arg3_om_node); + arg4_om_elem = axiom_element_create(env, req_om_node, "arg4", ns1, &arg4_om_node); + AXIOM_ELEMENT_SET_TEXT(arg4_om_elem, env, "true", arg4_om_node); + arg5_om_elem = axiom_element_create(env, req_om_node, "arg5", ns1, &arg5_om_node); + AXIOM_ELEMENT_SET_TEXT(arg5_om_elem, env, "1234.5678", arg5_om_node); + someStringData_om_elem = axiom_element_create(env, arg3_om_node, "someStringData", ns1, &someStringData_om_node); + AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "Here is some string data", someStringData_om_node); + someIntData_om_elem = axiom_element_create(env, arg3_om_node, "", ns1, &someIntData_om_node); + AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node); + someFloatData_om_elem = axiom_element_create(env, arg3_om_node, "someFloatData", ns1, &someFloatData_om_node); + AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node); + someDateData_om_elem = axiom_element_create(env, arg3_om_node, "someDateData", ns1, &someDateData_om_node); + AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node); + someListData_om_elem = axiom_element_create(env, arg3_om_node, "someListData", ns1, &someListData_om_node); + listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node); + AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node); + listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node); + AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node); + + om_str = AXIOM_NODE_TO_STRING(req_om_node, env); + if (om_str) + printf("\nSending OM : %s\n", om_str); + + return req_om_node; +} + + +axiom_node_t * +build_om_payload_for_doSingleData(axis2_env_t *env, char* name, char* data) +{ + axiom_node_t* req_om_node = NULL; + axiom_element_t* req_om_elem = NULL; + axiom_node_t* someData_om_node = NULL; + axiom_element_t* someData_om_elem = NULL; + axiom_namespace_t *ns1 = NULL; + axis2_char_t *om_str = NULL; + + ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1"); + req_om_elem = axiom_element_create(env, NULL, name, ns1, &req_om_node); + someData_om_elem = axiom_element_create(env, req_om_node, "someData", ns1, &someData_om_node); + AXIOM_ELEMENT_SET_TEXT(someData_om_elem, env, data, someData_om_node); + + om_str = AXIOM_NODE_TO_STRING(req_om_node, env); + if (om_str) + printf("\nSending OM : %s\n", om_str); + + return req_om_node; +} + + +axiom_node_t * +build_om_payload_for_doAny(axis2_env_t *env) +{ + axiom_node_t* req_om_node = NULL; + axiom_element_t* req_om_elem = NULL; + axiom_node_t* someData_om_node = NULL; + axiom_element_t* someData_om_elem = NULL; + axiom_node_t* someStringData_om_node = NULL; + axiom_element_t* someStringData_om_elem = NULL; + axiom_node_t* someIntData_om_node = NULL; + axiom_element_t* someIntData_om_elem = NULL; + axiom_node_t* someFloatData_om_node = NULL; + axiom_element_t* someFloatData_om_elem = NULL; + axiom_node_t* someDateData_om_node = NULL; + axiom_element_t* someDateData_om_elem = NULL; + axiom_node_t* someListData_om_node = NULL; + axiom_element_t* someListData_om_elem = NULL; + axiom_node_t* listItem1_om_node = NULL; + axiom_element_t* listItem1_om_elem = NULL; + axiom_node_t* listItem2_om_node = NULL; + axiom_element_t* listItem2_om_elem = NULL; + axiom_namespace_t *ns1 = NULL; + axis2_char_t *om_str = NULL; + + ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTest/", "ns1"); + req_om_elem = axiom_element_create(env, NULL, "doAny", ns1, &req_om_node); + someData_om_elem = axiom_element_create(env, req_om_node, "anElem", ns1, &someData_om_node); + someStringData_om_elem = axiom_element_create(env, someData_om_node, "hello", ns1, &someStringData_om_node); + AXIOM_ELEMENT_SET_TEXT(someStringData_om_elem, env, "world", someStringData_om_node); + someIntData_om_elem = axiom_element_create(env, someData_om_node, "someIntData", ns1, &someIntData_om_node); + AXIOM_ELEMENT_SET_TEXT(someIntData_om_elem, env, "12345678", someIntData_om_node); + someFloatData_om_elem = axiom_element_create(env, someData_om_node, "someFloatData", ns1, &someFloatData_om_node); + AXIOM_ELEMENT_SET_TEXT(someFloatData_om_elem, env, "1234.5678", someFloatData_om_node); + someDateData_om_elem = axiom_element_create(env, someData_om_node, "someDateData", ns1, &someDateData_om_node); + AXIOM_ELEMENT_SET_TEXT(someDateData_om_elem, env, "1977-06-27", someDateData_om_node); + someListData_om_elem = axiom_element_create(env, someData_om_node, "someListData", ns1, &someListData_om_node); + listItem1_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem1_om_node); + AXIOM_ELEMENT_SET_TEXT(listItem1_om_elem, env, "Here is list item 1", listItem1_om_node); + listItem2_om_elem = axiom_element_create(env, someListData_om_node, "listItem", ns1, &listItem2_om_node); + AXIOM_ELEMENT_SET_TEXT(listItem2_om_elem, env, "Here is list item 2", listItem2_om_node); + + om_str = AXIOM_NODE_TO_STRING(req_om_node, env); + if (om_str) + printf("\nSending OM : %s\n", om_str); + + return req_om_node; +} diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.vcproj b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.vcproj new file mode 100644 index 0000000000..e540e44c49 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestClient/WSEntryPointTestClient.vcproj @@ -0,0 +1,136 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="WSEntryPointTestClient" + ProjectGUID="{70DD49A1-4E7B-4CE4-B7A3-FD7AFE2A0DDC}" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="$(AXIS2C_HOME)/include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4" + CompileAs="1"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="axiom.lib axis2_engine.lib axis2_parser.lib axis2_util.lib" + OutputFile="$(OutDir)/WSEntryPointTestClient.exe" + LinkIncremental="2" + AdditionalLibraryDirectories="$(AXIS2C_HOME)/lib" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(OutDir)/WSEntryPointTestClient.pdb" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="4" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/WSEntryPointTestClient.exe" + LinkIncremental="1" + GenerateDebugInformation="TRUE" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <File + RelativePath=".\WSEntryPointTestClient.c"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/Tuscany-model.config b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/Tuscany-model.config new file mode 100644 index 0000000000..982f7bc271 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/Tuscany-model.config @@ -0,0 +1,24 @@ +<?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. + --> + +<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0"> + <wsdl> + <file name="WSEntryPointTest.wsdl"/> + </wsdl> + <xsd> + </xsd> +</tuscany-model> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.h new file mode 100644 index 0000000000..19f7aa0b75 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.h @@ -0,0 +1,53 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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. | ++----------------------------------------------------------------------+ +*/ + +#ifndef WSEENTRYPOINTTEST_H +#define WSEENTRYPOINTTEST_H + +#include <commonj/sdo/SDO.h> +#include <stdio.h> + +class WSEntryPointTest +{ +public: + virtual char* doChars(char* arg1) = 0; + virtual long doLong(long arg1) = 0; + virtual int doInt(int arg1) = 0; + virtual float doFloat(float arg1) = 0; + virtual long double doLongDouble(long double arg1) = 0; + virtual double doDouble(double arg1) = 0; + virtual bool doBool(bool arg1) = 0; + virtual short doShort(short arg1) = 0; + virtual char* doBytes(char* arg1) = 0; + virtual char doByte(char arg1) = 0; + virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5) = 0; + virtual DataObjectPtr doDataObject(DataObjectPtr arg1) = 0; + virtual DataObjectPtr doAny(DataObjectPtr arg1) = 0; +// These don't work because they are passing pointers around +// virtual int[] doIntArray(int[] arg1, int arg2); +// virtual string doString(string arg1); +// This doesn't work because there is no mapping from XSD types to SDO CharacterType +// virtual wchar_t doWChar(wchar_t arg1); +// This doesn't work because Operation does not support int64_t yet +// virtual int64_t doInt64(int64_t arg1); +}; + +#endif + + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.wsdl b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.wsdl new file mode 100644 index 0000000000..b6328f46f6 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTest.wsdl @@ -0,0 +1,526 @@ +<?xml version="1.0" encoding="UTF-8"?> +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTest/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WSEntryPointTest" targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTest/"> + <wsdl:types> + <xsd:schema targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTest/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:element name="doChars"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:string" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doCharsResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:string" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doString"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:string" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doLong"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:int" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doLongResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:int" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doInt"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:int" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doIntResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:int" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doFloat"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:float" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doFloatResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:float" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doLongDouble"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:double" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doLongDoubleResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:double" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doDouble"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:double" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doDoubleResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:double" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doBool"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:boolean" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doBoolResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:boolean" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doShort"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:short" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doShortResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:short" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doBytes"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:hexBinary" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doBytesResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:hexBinary" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doByte"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:byte" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doByteResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:byte" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + + + <xsd:element name="doMixed"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="arg1" type="xsd:string" minOccurs="1"/> + <xsd:element name="arg2" type="xsd:int" minOccurs="1"/> + <xsd:element name="arg3" type="dataObjectData" minOccurs="1"/> + <xsd:element name="arg4" type="xsd:boolean" minOccurs="1"/> + <xsd:element name="arg5" type="xsd:float" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doMixedResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="dataObjectData" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doDataObject"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="dataObjectData" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doDataObjectResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="dataObjectData" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="dataObjectData"> + <xsd:sequence> + <xsd:element name="someStringData" type="xsd:string" minOccurs="1"/> + <xsd:element name="someIntData" type="xsd:int" minOccurs="1"/> + <xsd:element name="someFloatData" type="xsd:float" minOccurs="1"/> + <xsd:element name="someDateData" type="xsd:date" minOccurs="1"/> + <xsd:element name="someListData" type="tns:listData" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="listData"> + <xsd:sequence> + <xsd:element name="listItem" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:element name="doAny"> + <xsd:complexType> + <xsd:sequence> + <xsd:any minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doAnyResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:any minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <!-- Can't do wchar - no mapping from XSD type to SDO:Character type + + <xsd:element name="doWChar"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" minOccurs="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:string"> + <xsd:length value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doWChar"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" minOccurs="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:string"> + <xsd:length value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + --> + + <!-- Int64 not yet supported - see Jira TUSCANY-439 + <xsd:element name="doInt64"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:long" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doInt64Response"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:long" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + --> + + <!-- Can't do doIntArray --> + </xsd:schema> + </wsdl:types> + + <wsdl:message name="doDataObjectRequestMsg"> + <wsdl:part element="tns:doDataObject" name="doDataObjectRequestPart"/> + </wsdl:message> + <wsdl:message name="doDataObjectResponseMsg"> + <wsdl:part element="tns:doDataObjectResponse" name="doDataObjectResponsePart"/> + </wsdl:message> + + <wsdl:message name="doCharsRequestMsg"> + <wsdl:part element="tns:doChars" name="doCharsRequestPart"/> + </wsdl:message> + <wsdl:message name="doCharsResponseMsg"> + <wsdl:part element="tns:doCharsResponse" name="doCharsResponsePart"/> + </wsdl:message> + + <wsdl:message name="doStringRequestMsg"> + <wsdl:part element="tns:doString" name="doStringRequestPart"/> + </wsdl:message> + <wsdl:message name="doStringResponseMsg"> + <wsdl:part element="tns:doCharsResponse" name="doStringResponsePart"/> + </wsdl:message> + + <wsdl:message name="doLongRequestMsg"> + <wsdl:part element="tns:doLong" name="doLongRequestPart"/> + </wsdl:message> + <wsdl:message name="doLongResponseMsg"> + <wsdl:part element="tns:doLongResponse" name="doLongResponsePart"/> + </wsdl:message> + + <wsdl:message name="doIntRequestMsg"> + <wsdl:part element="tns:doInt" name="doIntRequestPart"/> + </wsdl:message> + <wsdl:message name="doIntResponseMsg"> + <wsdl:part element="tns:doIntResponse" name="doIntResponsePart"/> + </wsdl:message> + + <wsdl:message name="doFloatRequestMsg"> + <wsdl:part element="tns:doFloat" name="doFloatRequestPart"/> + </wsdl:message> + <wsdl:message name="doFloatResponseMsg"> + <wsdl:part element="tns:doFloatResponse" name="doFloatResponsePart"/> + </wsdl:message> + + <wsdl:message name="doLongDoubleRequestMsg"> + <wsdl:part element="tns:doLongDouble" name="doLongDoubleRequestPart"/> + </wsdl:message> + <wsdl:message name="doLongDoubleResponseMsg"> + <wsdl:part element="tns:doLongDoubleResponse" name="doLongDoubleResponsePart"/> + </wsdl:message> + + <wsdl:message name="doDoubleRequestMsg"> + <wsdl:part element="tns:doDouble" name="doDoubleRequestPart"/> + </wsdl:message> + <wsdl:message name="doDoubleResponseMsg"> + <wsdl:part element="tns:doDoubleResponse" name="doDoubleResponsePart"/> + </wsdl:message> + + <wsdl:message name="doBoolRequestMsg"> + <wsdl:part element="tns:doBool" name="doBoolRequestPart"/> + </wsdl:message> + <wsdl:message name="doBoolResponseMsg"> + <wsdl:part element="tns:doBoolResponse" name="doBoolResponsePart"/> + </wsdl:message> + + <wsdl:message name="doShortRequestMsg"> + <wsdl:part element="tns:doShort" name="doShortRequestPart"/> + </wsdl:message> + <wsdl:message name="doShortResponseMsg"> + <wsdl:part element="tns:doShortResponse" name="doShortResponsePart"/> + </wsdl:message> + + <wsdl:message name="doBytesRequestMsg"> + <wsdl:part element="tns:doBytes" name="doBytesRequestPart"/> + </wsdl:message> + <wsdl:message name="doBytesResponseMsg"> + <wsdl:part element="tns:doBytesResponse" name="doBytesResponsePart"/> + </wsdl:message> + + <wsdl:message name="doByteRequestMsg"> + <wsdl:part element="tns:doByte" name="doByteRequestPart"/> + </wsdl:message> + <wsdl:message name="doByteResponseMsg"> + <wsdl:part element="tns:doByteResponse" name="doByteResponsePart"/> + </wsdl:message> + + <wsdl:message name="doMixedRequestMsg"> + <wsdl:part element="tns:doMixed" name="doMixedRequestPart"/> + </wsdl:message> + <wsdl:message name="doMixedResponseMsg"> + <wsdl:part element="tns:doMixedResponse" name="doMixedResponsePart"/> + </wsdl:message> + + <wsdl:message name="doAnyRequestMsg"> + <wsdl:part element="tns:doAny" name="doAnyRequestPart"/> + </wsdl:message> + <wsdl:message name="doAnyResponseMsg"> + <wsdl:part element="tns:doAnyResponse" name="doAnyResponsePart"/> + </wsdl:message> + + + <wsdl:portType name="WSEntryPointTest"> + <wsdl:operation name="doDataObject"> + <wsdl:input message="tns:doDataObjectRequestMsg"/> + <wsdl:output message="tns:doDataObjectResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doChars"> + <wsdl:input message="tns:doCharsRequestMsg"/> + <wsdl:output message="tns:doCharsResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doString"> + <wsdl:input message="tns:doStringRequestMsg"/> + <wsdl:output message="tns:doStringResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doLong"> + <wsdl:input message="tns:doLongRequestMsg"/> + <wsdl:output message="tns:doLongResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doInt"> + <wsdl:input message="tns:doIntRequestMsg"/> + <wsdl:output message="tns:doIntResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doFloat"> + <wsdl:input message="tns:doFloatRequestMsg"/> + <wsdl:output message="tns:doFloatResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doLongDouble"> + <wsdl:input message="tns:doLongDoubleRequestMsg"/> + <wsdl:output message="tns:doLongDoubleResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doDouble"> + <wsdl:input message="tns:doDoubleRequestMsg"/> + <wsdl:output message="tns:doDoubleResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doBool"> + <wsdl:input message="tns:doBoolRequestMsg"/> + <wsdl:output message="tns:doBoolResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doShort"> + <wsdl:input message="tns:doShortRequestMsg"/> + <wsdl:output message="tns:doShortResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doBytes"> + <wsdl:input message="tns:doBytesRequestMsg"/> + <wsdl:output message="tns:doBytesResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doByte"> + <wsdl:input message="tns:doByteRequestMsg"/> + <wsdl:output message="tns:doByteResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doMixed"> + <wsdl:input message="tns:doMixedRequestMsg"/> + <wsdl:output message="tns:doMixedResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doAny"> + <wsdl:input message="tns:doAnyRequestMsg"/> + <wsdl:output message="tns:doAnyResponseMsg"/> + </wsdl:operation> + </wsdl:portType> + + + <wsdl:binding name="WSEntryPointTestSOAP" type="tns:WSEntryPointTest"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="doDataObject"> + <soap:operation soapAction="WSEntryPointTest/doDataObject"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="doChars"> + <soap:operation soapAction="WSEntryPointTest/doChars"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doString"> + <soap:operation soapAction="WSEntryPointTest/doString"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doLong"> + <soap:operation soapAction="WSEntryPointTest/doLong"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doInt"> + <soap:operation soapAction="WSEntryPointTest/doInt"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doFloat"> + <soap:operation soapAction="WSEntryPointTest/doFloat"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doLongDouble"> + <soap:operation soapAction="WSEntryPointTest/doLongDouble"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doDouble"> + <soap:operation soapAction="WSEntryPointTest/doDouble"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doBool"> + <soap:operation soapAction="WSEntryPointTest/doBool"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doShort"> + <soap:operation soapAction="WSEntryPointTest/doShort"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doBytes"> + <soap:operation soapAction="WSEntryPointTest/doBytes"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doByte"> + <soap:operation soapAction="WSEntryPointTest/doByte"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doMixed"> + <soap:operation soapAction="WSEntryPointTest/doMixed"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doAny"> + <soap:operation soapAction="WSEntryPointTest/doAny"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="WSEntryPointTest"> + <wsdl:port binding="tns:WSEntryPointTestSOAP" name="WSEntryPointTestSOAP"> + <soap:address location="http://localhost:9090/axis2/services/WSEntryPointTest"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.componentType b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.componentType new file mode 100644 index 0000000000..cd58a345e6 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.componentType @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="ASCII"?> +<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <service name="WSEntryPointTestService"> + <interface.cpp header="WSEntryPointTest.h"> + </interface.cpp> + </service> + +</componentType> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.cpp b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.cpp new file mode 100644 index 0000000000..462ee1ac4d --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.cpp @@ -0,0 +1,159 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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. | ++----------------------------------------------------------------------+ +*/ + +#include "WSEntryPointTestImpl.h" +#include <stdio.h> +#include <tuscany/sca/util/Utils.h> +using namespace tuscany::sca; +#include <commonj/sdo/SDO.h> +#include <sdo_axiom.h> +using namespace commonj::sdo; +using namespace commonj::sdo_axiom; + +WSEntryPointTestImpl::WSEntryPointTestImpl() +{ +} + +WSEntryPointTestImpl::~WSEntryPointTestImpl() +{ +} + +// WSEntryPointTest interface +char* WSEntryPointTestImpl::doChars(char* arg1) +{ + printf("WSEntryPointTestImpl::doChars %s\n", arg1); + return arg1; +} + + +long WSEntryPointTestImpl::doLong(long arg1) +{ + printf("WSEntryPointTestImpl::doLong %d\n", arg1); + return arg1; +} + +int WSEntryPointTestImpl::doInt(int arg1) +{ + printf("WSEntryPointTestImpl::doInt %d\n", arg1); + return arg1; +} + +float WSEntryPointTestImpl::doFloat(float arg1) +{ + printf("WSEntryPointTestImpl::doFloat %f\n", arg1); + return arg1; +} + +long double WSEntryPointTestImpl::doLongDouble(long double arg1) +{ + printf("WSEntryPointTestImpl::doLongDouble %f\n", arg1); + return arg1; +} + +double WSEntryPointTestImpl::doDouble(double arg1) +{ + printf("WSEntryPointTestImpl::doDouble %f\n", arg1); + return arg1; +} + + +bool WSEntryPointTestImpl::doBool(bool arg1) +{ + printf("WSEntryPointTestImpl::doBool %d\n", arg1); + return arg1; +} + +short WSEntryPointTestImpl::doShort(short arg1) +{ + printf("WSEntryPointTestImpl::doShort %d\n", arg1); + return arg1; +} + +char* WSEntryPointTestImpl::doBytes(char* arg1) +{ + printf("WSEntryPointTestImpl::doBytes %s\n", arg1); + return arg1; +} + +char WSEntryPointTestImpl::doByte(char arg1) +{ + printf("WSEntryPointTestImpl::doByte %c\n", arg1); + return arg1; +} + +DataObjectPtr WSEntryPointTestImpl::doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5) +{ + printf("WSEntryPointTestImpl::doMixed %s %d %s %d %d\n", arg1, arg2, arg3->getType().getURI(), arg4, arg5); + Utils::printDO(arg3); + return arg3; +} + +DataObjectPtr WSEntryPointTestImpl::doDataObject(DataObjectPtr arg1) +{ + printf("WSEntryPointTestImpl::doDataObject %s\n", arg1->getType().getURI()); + Utils::printDO(arg1); + return arg1; +} + +DataObjectPtr WSEntryPointTestImpl::doAny(DataObjectPtr arg1) +{ + printf("WSEntryPointTestImpl::doAny %s#%s\n", arg1->getType().getURI(), arg1->getType().getName()); + Utils::printDO(arg1); + //return arg1; + + DataFactoryPtr factory = arg1->getDataFactory(); + DataObjectPtr data = factory->create(Type::SDOTypeNamespaceURI, "OpenDataObject"); + data->setCString("stringData", "Here is some string data"); + data->setBoolean("boolData", true); + DataObjectList& list = data->getList("intDataList"); + list.append((long)123456789); + list.append((long)111111111); + list.append((long)222222222); + Utils::printDO(data); + return data; +} + +//int[] WSEntryPointTestImpl::doIntArray(int[] arg1, int arg2) +//{ +// printf("WSEntryPointTestImpl::doIntArray with length %d\n", arg2); +// for(int i=0; i<arg2; i++) +// { +// printf("%d\n", arg1[i]); +// } +// return arg1; +//} +// +//string WSEntryPointTestImpl::doString(string arg1) +//{ +// printf("WSEntryPointTestImpl::doString %s\n", arg1.c_str()); +// return arg1; +//} +// +//wchar_t WSEntryPointTestImpl::doWChar(wchar_t arg1) +//{ +// printf("WSEntryPointTestImpl::doWChar %s\n", arg1); +// return arg1; +//} +// +//int64_t WSEntryPointTestImpl::doInt64(int64_t arg1) +//{ +// printf("WSEntryPointTestImpl::doInt64 %d\n", arg1); +// return arg1; +//} + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.h new file mode 100644 index 0000000000..926b6073d4 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl.h @@ -0,0 +1,57 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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. | ++----------------------------------------------------------------------+ +*/ + +#ifndef WSEENTRYPOINTTESTIMPL_H +#define WSEENTRYPOINTTESTIMPL_H + +#include "WSEntryPointTest.h" + +class WSEntryPointTestImpl : public WSEntryPointTest +{ +public: + WSEntryPointTestImpl(); + virtual ~WSEntryPointTestImpl(); + + // WSEntryPointTest interface + virtual char* doChars(char* arg1); + virtual long doLong(long arg1); + virtual int doInt(int arg1); + virtual float doFloat(float arg1); + virtual long double doLongDouble(long double arg1); + virtual double doDouble(double arg1); + virtual bool doBool(bool arg1); + virtual short doShort(short arg1); + virtual char* doBytes(char* arg1); + virtual char doByte(char arg1); + virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5); + virtual DataObjectPtr doDataObject(DataObjectPtr arg1); + virtual DataObjectPtr doAny(DataObjectPtr arg1); + +// These don't work because they are passing pointers around +// virtual int[] doIntArray(int[] arg1, int arg2); +// virtual string doString(string arg1); +// This doesn't work because there is no mapping from XSD types to SDO CharacterType +// virtual wchar_t doWChar(wchar_t arg1); +// This doesn't work because Operation does not support int64_t yet +// virtual int64_t doInt64(int64_t arg1); + +}; + +#endif + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.cpp b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.cpp new file mode 100644 index 0000000000..8f564ff5bc --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.cpp @@ -0,0 +1,187 @@ +/* + * 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. + */ + +#include "WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h" + +#include "osoa/sca/sca.h" +using namespace osoa::sca; +using namespace tuscany::sca; + +extern "C" +{ + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + WSEntryPointTestImpl_WSEntryPointTestService_Proxy* WSEntryPointTestImpl_WSEntryPointTestService_Proxy_Factory(ServiceWrapper* target) + { + return new WSEntryPointTestImpl_WSEntryPointTestService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void WSEntryPointTestImpl_WSEntryPointTestService_Proxy_Destructor(void* proxy) + { + delete (WSEntryPointTestImpl_WSEntryPointTestService_Proxy*)proxy; + } +} + +WSEntryPointTestImpl_WSEntryPointTestService_Proxy::WSEntryPointTestImpl_WSEntryPointTestService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +WSEntryPointTestImpl_WSEntryPointTestService_Proxy::~WSEntryPointTestImpl_WSEntryPointTestService_Proxy() +{ + if (target) + delete target; +} + +char* WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doChars( char* arg0) +{ + Operation operation("doChars"); + operation.addParameter(&arg0); + char* ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +long WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doLong( long arg0) +{ + Operation operation("doLong"); + operation.addParameter(&arg0); + long ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +int WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doInt( int arg0) +{ + Operation operation("doInt"); + operation.addParameter(&arg0); + int ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +float WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doFloat( float arg0) +{ + Operation operation("doFloat"); + operation.addParameter(&arg0); + float ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +long double WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doLongDouble( long double arg0) +{ + Operation operation("doLongDouble"); + operation.addParameter(&arg0); + long double ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +double WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doDouble( double arg0) +{ + Operation operation("doDouble"); + operation.addParameter(&arg0); + double ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +bool WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doBool( bool arg0) +{ + Operation operation("doBool"); + operation.addParameter(&arg0); + bool ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +short WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doShort( short arg0) +{ + Operation operation("doShort"); + operation.addParameter(&arg0); + short ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +char* WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doBytes( char* arg0) +{ + Operation operation("doBytes"); + operation.addParameter(&arg0); + char* ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +char WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doByte( char arg0) +{ + Operation operation("doByte"); + operation.addParameter(&arg0); + char ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +DataObjectPtr WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doMixed( char* arg0, long arg1, DataObjectPtr arg2, bool arg3, double arg4) +{ + Operation operation("doMixed"); + operation.addParameter(&arg0); + operation.addParameter(&arg1); + operation.addParameter(&arg2); + operation.addParameter(&arg3); + operation.addParameter(&arg4); + DataObjectPtr ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +DataObjectPtr WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doDataObject( DataObjectPtr arg0) +{ + Operation operation("doDataObject"); + operation.addParameter(&arg0); + DataObjectPtr ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + +DataObjectPtr WSEntryPointTestImpl_WSEntryPointTestService_Proxy::doAny( DataObjectPtr arg0) +{ + Operation operation("doAny"); + operation.addParameter(&arg0); + DataObjectPtr ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h new file mode 100644 index 0000000000..9dca8a61bc --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h @@ -0,0 +1,50 @@ +/* + * 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. + */ + +#ifndef WSEntryPointTestImpl_WSEntryPointTestService_Proxy_h +#define WSEntryPointTestImpl_WSEntryPointTestService_Proxy_h + +#if defined(WIN32) || defined (_WINDOWS) +#pragma warning(disable: 4786) +#endif + +#include "WSEntryPointTest.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class WSEntryPointTestImpl_WSEntryPointTestService_Proxy : public WSEntryPointTest +{ +public: + WSEntryPointTestImpl_WSEntryPointTestService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~WSEntryPointTestImpl_WSEntryPointTestService_Proxy(); + virtual char* doChars( char* arg1); + virtual long doLong( long arg1); + virtual int doInt( int arg1); + virtual float doFloat( float arg1); + virtual long double doLongDouble( long double arg1); + virtual double doDouble( double arg1); + virtual bool doBool( bool arg1); + virtual short doShort( short arg1); + virtual char* doBytes( char* arg1); + virtual char doByte( char arg1); + virtual DataObjectPtr doMixed( char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5); + virtual DataObjectPtr doDataObject( DataObjectPtr arg1); + virtual DataObjectPtr doAny( DataObjectPtr arg1); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // WSEntryPointTestImpl_WSEntryPointTestService_Proxy_h + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.cpp b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.cpp new file mode 100644 index 0000000000..7a879a310b --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.cpp @@ -0,0 +1,145 @@ +/* + * 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. + */ + +#include "WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h" + +#include "osoa/sca/sca.h" +using namespace osoa::sca; +using namespace tuscany::sca; + + + +extern "C" +{ + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + WSEntryPointTestImpl_WSEntryPointTestService_Wrapper* WSEntryPointTestImpl_WSEntryPointTestService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new WSEntryPointTestImpl_WSEntryPointTestService_Wrapper(target); + } +} + +WSEntryPointTestImpl_WSEntryPointTestService_Wrapper::WSEntryPointTestImpl_WSEntryPointTestService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (WSEntryPointTestImpl*)getImplementation(); +} + +WSEntryPointTestImpl_WSEntryPointTestService_Wrapper::~WSEntryPointTestImpl_WSEntryPointTestService_Wrapper() +{ + releaseImplementation(); +} + +void* WSEntryPointTestImpl_WSEntryPointTestService_Wrapper::newImplementation() +{ + return new WSEntryPointTestImpl; +} + +void WSEntryPointTestImpl_WSEntryPointTestService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void WSEntryPointTestImpl_WSEntryPointTestService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "doChars") + { + char* p0 = *( char**)operation.getParameterValue(0); + *(char**)operation.getReturnValue() = impl->doChars(p0); + return; + } + if (operationName == "doLong") + { + long& p0 = *( long*)operation.getParameterValue(0); + *(long*)operation.getReturnValue() = impl->doLong(p0); + return; + } + if (operationName == "doInt") + { + int& p0 = *( int*)operation.getParameterValue(0); + *(int*)operation.getReturnValue() = impl->doInt(p0); + return; + } + if (operationName == "doFloat") + { + float& p0 = *( float*)operation.getParameterValue(0); + *(float*)operation.getReturnValue() = impl->doFloat(p0); + return; + } + if (operationName == "doLongDouble") + { + long double& p0 = *( long double*)operation.getParameterValue(0); + *(long double*)operation.getReturnValue() = impl->doLongDouble(p0); + return; + } + if (operationName == "doDouble") + { + double& p0 = *( double*)operation.getParameterValue(0); + *(double*)operation.getReturnValue() = impl->doDouble(p0); + return; + } + if (operationName == "doBool") + { + bool& p0 = *( bool*)operation.getParameterValue(0); + *(bool*)operation.getReturnValue() = impl->doBool(p0); + return; + } + if (operationName == "doShort") + { + short& p0 = *( short*)operation.getParameterValue(0); + *(short*)operation.getReturnValue() = impl->doShort(p0); + return; + } + if (operationName == "doBytes") + { + char* p0 = *( char**)operation.getParameterValue(0); + *(char**)operation.getReturnValue() = impl->doBytes(p0); + return; + } + if (operationName == "doByte") + { + char& p0 = *( char*)operation.getParameterValue(0); + *(char*)operation.getReturnValue() = impl->doByte(p0); + return; + } + if (operationName == "doMixed") + { + char* p0 = *( char**)operation.getParameterValue(0); + long& p1 = *( long*)operation.getParameterValue(1); + DataObjectPtr& p2 = *(DataObjectPtr*)operation.getParameterValue(2); bool& p3 = *( bool*)operation.getParameterValue(3); + double& p4 = *( double*)operation.getParameterValue(4); + *(DataObjectPtr*)operation.getReturnValue() = impl->doMixed(p0, p1, p2, p3, p4); + return; + } + if (operationName == "doDataObject") + { + DataObjectPtr& p0 = *(DataObjectPtr*)operation.getParameterValue(0); *(DataObjectPtr*)operation.getReturnValue() = impl->doDataObject(p0); + return; + } + if (operationName == "doAny") + { + DataObjectPtr& p0 = *(DataObjectPtr*)operation.getParameterValue(0); *(DataObjectPtr*)operation.getReturnValue() = impl->doAny(p0); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h new file mode 100644 index 0000000000..7bcd09b7c8 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h @@ -0,0 +1,40 @@ +/* + * 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. + */ + +#ifndef WSEntryPointTestImpl_WSEntryPointTestService_Wrapper_h +#define WSEntryPointTestImpl_WSEntryPointTestService_Wrapper_h + +#if defined(WIN32) || defined (_WINDOWS) +#pragma warning(disable: 4786) +#endif + +#include "WSEntryPointTestImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class WSEntryPointTestImpl_WSEntryPointTestService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + WSEntryPointTestImpl_WSEntryPointTestService_Wrapper(tuscany::sca::model::Service* target); + virtual ~WSEntryPointTestImpl_WSEntryPointTestService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + WSEntryPointTestImpl* impl; +}; + +#endif // WSEntryPointTestImpl_WSEntryPointTestService_Wrapper_h + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestModule.vcproj b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestModule.vcproj new file mode 100644 index 0000000000..6ff73c3f1c --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/WSEntryPointTestModule.vcproj @@ -0,0 +1,173 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="WSEntryPointTestModule" + ProjectGUID="{19C4CE76-4E08-4C22-8198-010B837C565A}" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="2" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="$(TUSCANY_SCACPP)/include,$(TUSCANY_SDOCPP)/include,$(AXIS2C_HOME)/include" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WSENTRYPOINTTESTMODULE_EXPORTS" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="tuscany_sca.lib tuscany_sdo.lib tuscany_sdo_axiom.lib axis2_parser.lib axis2_util.lib axiom.lib" + OutputFile="$(OutDir)/WSEntryPointTestModule.dll" + LinkIncremental="2" + AdditionalLibraryDirectories="$(TUSCANY_SCACPP)/lib,$(TUSCANY_SDOCPP)/lib,$(AXIS2C_HOME)/lib" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(OutDir)/WSEntryPointTestModule.pdb" + SubSystem="2" + ImportLibrary="$(OutDir)/WSEntryPointTestModule.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="2" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WSENTRYPOINTTESTMODULE_EXPORTS" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/WSEntryPointTestModule.dll" + LinkIncremental="1" + GenerateDebugInformation="TRUE" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + ImportLibrary="$(OutDir)/WSEntryPointTestModule.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <File + RelativePath=".\WSEntryPointTestImpl.cpp"> + </File> + <File + RelativePath=".\WSEntryPointTestImpl_WSEntryPointTestService_Proxy.cpp"> + </File> + <File + RelativePath=".\WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.cpp"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + <File + RelativePath=".\WSEntryPointTest.h"> + </File> + <File + RelativePath=".\WSEntryPointTestImpl.h"> + </File> + <File + RelativePath=".\WSEntryPointTestImpl_WSEntryPointTestService_Proxy.h"> + </File> + <File + RelativePath=".\WSEntryPointTestImpl_WSEntryPointTestService_Wrapper.h"> + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + <File + RelativePath=".\sca.module"> + </File> + <File + RelativePath="..\WSEntryPointTestSubsystem\sca.subsystem"> + </File> + <File + RelativePath=".\services.xml"> + </File> + <File + RelativePath=".\Tuscany-model.config"> + </File> + <File + RelativePath=".\WSEntryPointTest.wsdl"> + </File> + <File + RelativePath=".\WSEntryPointTestImpl.componentType"> + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/sca.module b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/sca.module new file mode 100644 index 0000000000..f92fae8110 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/sca.module @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="ASCII"?> +<module xmlns="http://www.osoa.org/xmlns/sca/0.9" + xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9" + name="WSEntryPointTestModule"> + + <!-- Expose as a web service --> + <entryPoint name="WSEntryPointTestEntrypoint" multiplicity="1..1"> + <interface.wsdl interface="WSEntryPointTest.wsdl" callbackInterface=""></interface.wsdl> + <binding.ws port="http://www.WSEntryPointTest.org/WSEntryPointTest/#wsdl.endpoint(WSEntryPointTest/WSEntryPointTestSOAP)"></binding.ws> + <reference>WSEntryPointTestServiceComponent</reference> + </entryPoint> + + + <component name="WSEntryPointTestServiceComponent"> + <implementation.cpp dll="WSEntryPointTestModule.dll" header="WSEntryPointTestImpl.h"></implementation.cpp> + <properties> </properties> + <references> </references> + </component> +</module> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/services.xml b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/services.xml new file mode 100644 index 0000000000..b863c79409 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestModule/services.xml @@ -0,0 +1,62 @@ + +<!-- + 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. + --> +<service name="WSEntryPointTest"> + <parameter name="ServiceClass" locked="xsd:false">tuscany_sca_ws_service</parameter> + <parameter name="TuscanySystemRoot" locked="xsd:false">D:/tuscany/cpp/sca/test/WSEntryPointTest/runtime</parameter> + <parameter name="TuscanyEntryPoint" locked="xsd:false">WSEntryPointTestSubsystem/WSEntryPointTestService/WSEntryPointTestEntrypoint</parameter> + + <description> + This is a testing service , to test the system is working or not + </description> + + <operation name="doChars"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doLong"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doInt"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doFloat"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doLongDouble"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doDouble"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doBool"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doShort"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doBytes"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doMixed"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doDataObject"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + <operation name="doAny"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> +</service> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestSubsystem/sca.subsystem b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestSubsystem/sca.subsystem new file mode 100644 index 0000000000..45ae34fd42 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/WSEntryPointTestSubsystem/sca.subsystem @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + 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. + --> + +<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9" name="WSEntryPointTestSubsystem"> + + <moduleComponent name="WSEntryPointTestService" module="WSEntryPointTestModule" /> + +</subsystem> + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/Tuscany-model.config b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/Tuscany-model.config new file mode 100644 index 0000000000..982f7bc271 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/Tuscany-model.config @@ -0,0 +1,24 @@ +<?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. + --> + +<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0"> + <wsdl> + <file name="WSEntryPointTest.wsdl"/> + </wsdl> + <xsd> + </xsd> +</tuscany-model> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.h new file mode 100644 index 0000000000..19f7aa0b75 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.h @@ -0,0 +1,53 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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. | ++----------------------------------------------------------------------+ +*/ + +#ifndef WSEENTRYPOINTTEST_H +#define WSEENTRYPOINTTEST_H + +#include <commonj/sdo/SDO.h> +#include <stdio.h> + +class WSEntryPointTest +{ +public: + virtual char* doChars(char* arg1) = 0; + virtual long doLong(long arg1) = 0; + virtual int doInt(int arg1) = 0; + virtual float doFloat(float arg1) = 0; + virtual long double doLongDouble(long double arg1) = 0; + virtual double doDouble(double arg1) = 0; + virtual bool doBool(bool arg1) = 0; + virtual short doShort(short arg1) = 0; + virtual char* doBytes(char* arg1) = 0; + virtual char doByte(char arg1) = 0; + virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5) = 0; + virtual DataObjectPtr doDataObject(DataObjectPtr arg1) = 0; + virtual DataObjectPtr doAny(DataObjectPtr arg1) = 0; +// These don't work because they are passing pointers around +// virtual int[] doIntArray(int[] arg1, int arg2); +// virtual string doString(string arg1); +// This doesn't work because there is no mapping from XSD types to SDO CharacterType +// virtual wchar_t doWChar(wchar_t arg1); +// This doesn't work because Operation does not support int64_t yet +// virtual int64_t doInt64(int64_t arg1); +}; + +#endif + + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.wsdl b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.wsdl new file mode 100644 index 0000000000..294ae076a7 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTest.wsdl @@ -0,0 +1,526 @@ +<?xml version="1.0" encoding="UTF-8"?> +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTest/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WSEntryPointTest" targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTest/"> + <wsdl:types> + <xsd:schema targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTest/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + + <xsd:element name="doChars"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:string" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doCharsResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:string" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doString"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:string" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doLong"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:int" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doLongResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:int" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doInt"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:int" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doIntResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:int" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doFloat"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:float" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doFloatResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:float" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doLongDouble"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:double" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doLongDoubleResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:double" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doDouble"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:double" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doDoubleResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:double" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doBool"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:boolean" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doBoolResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:boolean" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doShort"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:short" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doShortResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:short" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doBytes"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:hexBinary" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doBytesResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:hexBinary" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doByte"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:byte" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doByteResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:byte" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + + + <xsd:element name="doMixed"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="arg1" type="xsd:string" minOccurs="1"/> + <xsd:element name="arg2" type="xsd:int" minOccurs="1"/> + <xsd:element name="arg3" type="dataObjectData" minOccurs="1"/> + <xsd:element name="arg4" type="xsd:boolean" minOccurs="1"/> + <xsd:element name="arg5" type="xsd:float" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doMixedResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="dataObjectData" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doDataObject"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="dataObjectData" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doDataObjectResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="dataObjectData" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:complexType name="dataObjectData"> + <xsd:sequence> + <xsd:element name="someStringData" type="xsd:string" minOccurs="1"/> + <xsd:element name="someIntData" type="xsd:int" minOccurs="1"/> + <xsd:element name="someFloatData" type="xsd:float" minOccurs="1"/> + <xsd:element name="someDateData" type="xsd:date" minOccurs="1"/> + <xsd:element name="someListData" type="listData" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:complexType name="listData"> + <xsd:sequence> + <xsd:element name="listItem" type="xsd:string" minOccurs="0" maxOccurs="unbounded"/> + </xsd:sequence> + </xsd:complexType> + + <xsd:element name="doAny"> + <xsd:complexType> + <xsd:sequence> + <xsd:any minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <xsd:element name="doAnyResponse"> + <xsd:complexType> + <xsd:sequence> + <xsd:any minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + + <!-- Can't do wchar - no mapping from XSD type to SDO:Character type + + <xsd:element name="doWChar"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" minOccurs="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:string"> + <xsd:length value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doWChar"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" minOccurs="1"> + <xsd:simpleType> + <xsd:restriction base="xsd:string"> + <xsd:length value="1"/> + </xsd:restriction> + </xsd:simpleType> + </xsd:element> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + --> + + <!-- Int64 not yet supported - see Jira TUSCANY-439 + <xsd:element name="doInt64"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:long" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + <xsd:element name="doInt64Response"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="someData" type="xsd:long" minOccurs="1"/> + </xsd:sequence> + </xsd:complexType> + </xsd:element> + --> + + <!-- Can't do doIntArray --> + </xsd:schema> + </wsdl:types> + + <wsdl:message name="doDataObjectRequestMsg"> + <wsdl:part element="tns:doDataObject" name="doDataObjectRequestPart"/> + </wsdl:message> + <wsdl:message name="doDataObjectResponseMsg"> + <wsdl:part element="tns:doDataObjectResponse" name="doDataObjectResponsePart"/> + </wsdl:message> + + <wsdl:message name="doCharsRequestMsg"> + <wsdl:part element="tns:doChars" name="doCharsRequestPart"/> + </wsdl:message> + <wsdl:message name="doCharsResponseMsg"> + <wsdl:part element="tns:doCharsResponse" name="doCharsResponsePart"/> + </wsdl:message> + + <wsdl:message name="doStringRequestMsg"> + <wsdl:part element="tns:doString" name="doStringRequestPart"/> + </wsdl:message> + <wsdl:message name="doStringResponseMsg"> + <wsdl:part element="tns:doCharsResponse" name="doStringResponsePart"/> + </wsdl:message> + + <wsdl:message name="doLongRequestMsg"> + <wsdl:part element="tns:doLong" name="doLongRequestPart"/> + </wsdl:message> + <wsdl:message name="doLongResponseMsg"> + <wsdl:part element="tns:doLongResponse" name="doLongResponsePart"/> + </wsdl:message> + + <wsdl:message name="doIntRequestMsg"> + <wsdl:part element="tns:doInt" name="doIntRequestPart"/> + </wsdl:message> + <wsdl:message name="doIntResponseMsg"> + <wsdl:part element="tns:doIntResponse" name="doIntResponsePart"/> + </wsdl:message> + + <wsdl:message name="doFloatRequestMsg"> + <wsdl:part element="tns:doFloat" name="doFloatRequestPart"/> + </wsdl:message> + <wsdl:message name="doFloatResponseMsg"> + <wsdl:part element="tns:doFloatResponse" name="doFloatResponsePart"/> + </wsdl:message> + + <wsdl:message name="doLongDoubleRequestMsg"> + <wsdl:part element="tns:doLongDouble" name="doLongDoubleRequestPart"/> + </wsdl:message> + <wsdl:message name="doLongDoubleResponseMsg"> + <wsdl:part element="tns:doLongDoubleResponse" name="doLongDoubleResponsePart"/> + </wsdl:message> + + <wsdl:message name="doDoubleRequestMsg"> + <wsdl:part element="tns:doDouble" name="doDoubleRequestPart"/> + </wsdl:message> + <wsdl:message name="doDoubleResponseMsg"> + <wsdl:part element="tns:doDoubleResponse" name="doDoubleResponsePart"/> + </wsdl:message> + + <wsdl:message name="doBoolRequestMsg"> + <wsdl:part element="tns:doBool" name="doBoolRequestPart"/> + </wsdl:message> + <wsdl:message name="doBoolResponseMsg"> + <wsdl:part element="tns:doBoolResponse" name="doBoolResponsePart"/> + </wsdl:message> + + <wsdl:message name="doShortRequestMsg"> + <wsdl:part element="tns:doShort" name="doShortRequestPart"/> + </wsdl:message> + <wsdl:message name="doShortResponseMsg"> + <wsdl:part element="tns:doShortResponse" name="doShortResponsePart"/> + </wsdl:message> + + <wsdl:message name="doBytesRequestMsg"> + <wsdl:part element="tns:doBytes" name="doBytesRequestPart"/> + </wsdl:message> + <wsdl:message name="doBytesResponseMsg"> + <wsdl:part element="tns:doBytesResponse" name="doBytesResponsePart"/> + </wsdl:message> + + <wsdl:message name="doByteRequestMsg"> + <wsdl:part element="tns:doByte" name="doByteRequestPart"/> + </wsdl:message> + <wsdl:message name="doByteResponseMsg"> + <wsdl:part element="tns:doByteResponse" name="doByteResponsePart"/> + </wsdl:message> + + <wsdl:message name="doMixedRequestMsg"> + <wsdl:part element="tns:doMixed" name="doMixedRequestPart"/> + </wsdl:message> + <wsdl:message name="doMixedResponseMsg"> + <wsdl:part element="tns:doMixedResponse" name="doMixedResponsePart"/> + </wsdl:message> + + <wsdl:message name="doAnyRequestMsg"> + <wsdl:part element="tns:doAny" name="doAnyRequestPart"/> + </wsdl:message> + <wsdl:message name="doAnyResponseMsg"> + <wsdl:part element="tns:doAnyResponse" name="doAnyResponsePart"/> + </wsdl:message> + + + <wsdl:portType name="WSEntryPointTest"> + <wsdl:operation name="doDataObject"> + <wsdl:input message="tns:doDataObjectRequestMsg"/> + <wsdl:output message="tns:doDataObjectResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doChars"> + <wsdl:input message="tns:doCharsRequestMsg"/> + <wsdl:output message="tns:doCharsResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doString"> + <wsdl:input message="tns:doStringRequestMsg"/> + <wsdl:output message="tns:doStringResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doLong"> + <wsdl:input message="tns:doLongRequestMsg"/> + <wsdl:output message="tns:doLongResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doInt"> + <wsdl:input message="tns:doIntRequestMsg"/> + <wsdl:output message="tns:doIntResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doFloat"> + <wsdl:input message="tns:doFloatRequestMsg"/> + <wsdl:output message="tns:doFloatResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doLongDouble"> + <wsdl:input message="tns:doLongDoubleRequestMsg"/> + <wsdl:output message="tns:doLongDoubleResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doDouble"> + <wsdl:input message="tns:doDoubleRequestMsg"/> + <wsdl:output message="tns:doDoubleResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doBool"> + <wsdl:input message="tns:doBoolRequestMsg"/> + <wsdl:output message="tns:doBoolResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doShort"> + <wsdl:input message="tns:doShortRequestMsg"/> + <wsdl:output message="tns:doShortResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doBytes"> + <wsdl:input message="tns:doBytesRequestMsg"/> + <wsdl:output message="tns:doBytesResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doByte"> + <wsdl:input message="tns:doByteRequestMsg"/> + <wsdl:output message="tns:doByteResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doMixed"> + <wsdl:input message="tns:doMixedRequestMsg"/> + <wsdl:output message="tns:doMixedResponseMsg"/> + </wsdl:operation> + <wsdl:operation name="doAny"> + <wsdl:input message="tns:doAnyRequestMsg"/> + <wsdl:output message="tns:doAnyResponseMsg"/> + </wsdl:operation> + </wsdl:portType> + + + <wsdl:binding name="WSEntryPointTestSOAP" type="tns:WSEntryPointTest"> + <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="doDataObject"> + <soap:operation soapAction="WSEntryPointTest/doDataObject"/> + <wsdl:input> + <soap:body use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body use="literal"/> + </wsdl:output> + </wsdl:operation> + <wsdl:operation name="doChars"> + <soap:operation soapAction="WSEntryPointTest/doChars"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doString"> + <soap:operation soapAction="WSEntryPointTest/doString"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doLong"> + <soap:operation soapAction="WSEntryPointTest/doLong"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doInt"> + <soap:operation soapAction="WSEntryPointTest/doInt"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doFloat"> + <soap:operation soapAction="WSEntryPointTest/doFloat"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doLongDouble"> + <soap:operation soapAction="WSEntryPointTest/doLongDouble"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doDouble"> + <soap:operation soapAction="WSEntryPointTest/doDouble"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doBool"> + <soap:operation soapAction="WSEntryPointTest/doBool"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doShort"> + <soap:operation soapAction="WSEntryPointTest/doShort"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doBytes"> + <soap:operation soapAction="WSEntryPointTest/doBytes"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doByte"> + <soap:operation soapAction="WSEntryPointTest/doByte"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doMixed"> + <soap:operation soapAction="WSEntryPointTest/doMixed"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + <wsdl:operation name="doAny"> + <soap:operation soapAction="WSEntryPointTest/doAny"/> + <wsdl:input><soap:body use="literal"/></wsdl:input> + <wsdl:output><soap:body use="literal"/></wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="WSEntryPointTest"> + <wsdl:port binding="tns:WSEntryPointTestSOAP" name="WSEntryPointTestSOAP"> + <soap:address location="http://localhost:9090/axis2/services/WSEntryPointTest"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.componentType b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.componentType new file mode 100644 index 0000000000..cd58a345e6 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.componentType @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="ASCII"?> +<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <service name="WSEntryPointTestService"> + <interface.cpp header="WSEntryPointTest.h"> + </interface.cpp> + </service> + +</componentType> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.h new file mode 100644 index 0000000000..926b6073d4 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/WSEntryPointTestImpl.h @@ -0,0 +1,57 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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. | ++----------------------------------------------------------------------+ +*/ + +#ifndef WSEENTRYPOINTTESTIMPL_H +#define WSEENTRYPOINTTESTIMPL_H + +#include "WSEntryPointTest.h" + +class WSEntryPointTestImpl : public WSEntryPointTest +{ +public: + WSEntryPointTestImpl(); + virtual ~WSEntryPointTestImpl(); + + // WSEntryPointTest interface + virtual char* doChars(char* arg1); + virtual long doLong(long arg1); + virtual int doInt(int arg1); + virtual float doFloat(float arg1); + virtual long double doLongDouble(long double arg1); + virtual double doDouble(double arg1); + virtual bool doBool(bool arg1); + virtual short doShort(short arg1); + virtual char* doBytes(char* arg1); + virtual char doByte(char arg1); + virtual DataObjectPtr doMixed(char* arg1, long arg2, DataObjectPtr arg3, bool arg4, double arg5); + virtual DataObjectPtr doDataObject(DataObjectPtr arg1); + virtual DataObjectPtr doAny(DataObjectPtr arg1); + +// These don't work because they are passing pointers around +// virtual int[] doIntArray(int[] arg1, int arg2); +// virtual string doString(string arg1); +// This doesn't work because there is no mapping from XSD types to SDO CharacterType +// virtual wchar_t doWChar(wchar_t arg1); +// This doesn't work because Operation does not support int64_t yet +// virtual int64_t doInt64(int64_t arg1); + +}; + +#endif + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/sca.module b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/sca.module new file mode 100644 index 0000000000..f92fae8110 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/modules/WSEntryPointTestModule/sca.module @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="ASCII"?> +<module xmlns="http://www.osoa.org/xmlns/sca/0.9" + xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9" + name="WSEntryPointTestModule"> + + <!-- Expose as a web service --> + <entryPoint name="WSEntryPointTestEntrypoint" multiplicity="1..1"> + <interface.wsdl interface="WSEntryPointTest.wsdl" callbackInterface=""></interface.wsdl> + <binding.ws port="http://www.WSEntryPointTest.org/WSEntryPointTest/#wsdl.endpoint(WSEntryPointTest/WSEntryPointTestSOAP)"></binding.ws> + <reference>WSEntryPointTestServiceComponent</reference> + </entryPoint> + + + <component name="WSEntryPointTestServiceComponent"> + <implementation.cpp dll="WSEntryPointTestModule.dll" header="WSEntryPointTestImpl.h"></implementation.cpp> + <properties> </properties> + <references> </references> + </component> +</module> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/subsystems/WSEntryPointTestSubsystem/sca.subsystem b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/subsystems/WSEntryPointTestSubsystem/sca.subsystem new file mode 100644 index 0000000000..45ae34fd42 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTest/runtime/subsystems/WSEntryPointTestSubsystem/sca.subsystem @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + 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. + --> + +<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9" name="WSEntryPointTestSubsystem"> + + <moduleComponent name="WSEntryPointTestService" module="WSEntryPointTestModule" /> + +</subsystem> + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c new file mode 100644 index 0000000000..c23e845691 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.c @@ -0,0 +1,148 @@ +/* + * Copyright 2004,2005 The Apache Software Foundation. + * + * 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. + */ + +#include <stdio.h> +#include <axiom.h> +#include <axis2_util.h> +#include <axiom_soap.h> +#include <axis2_client.h> + +axiom_node_t * +build_om_payload_for_WSEntryPointTestRPC_svc(axis2_env_t *env); + + +int main(int argc, char** argv) +{ + axis2_env_t *env = NULL; + axis2_char_t *address = NULL; + axis2_endpoint_ref_t* endpoint_ref = NULL; + axis2_options_t *options = NULL; + axis2_char_t *client_home = NULL; + axis2_svc_client_t* svc_client = NULL; + axiom_node_t *payload = NULL; + axiom_node_t *ret_node = NULL; + + /* Set up the envioronment */ + env = axis2_env_create_all("wsentrypointtestrpc.log", AXIS2_LOG_LEVEL_TRACE); + + /* Set end point reference of echo service */ + address = "http://localhost:9090/axis2/services/WSEntryPointTestRPC"; + if (argc > 1 ) + address = argv[1]; + if (AXIS2_STRCMP(address, "-h") == 0) + { + printf("Usage : %s [endpoint_url]\n", argv[0]); + printf("use -h for help\n"); + return 0; + } + printf ("Using endpoint : %s\n", address); + + /* Create EPR with given address */ + endpoint_ref = axis2_endpoint_ref_create(env, address); + + /* Setup options */ + options = axis2_options_create(env); + AXIS2_OPTIONS_SET_TO(options, env, endpoint_ref); + AXIS2_OPTIONS_SET_ACTION(options, env, + "http://www.WSEntryPointTest.org/WSEntryPointTestRPC/doString"); + + /* Set up deploy folder. It is from the deploy folder, the configuration is picked up + * using the axis2.xml file. + * In this sample client_home points to the Axis2/C default deploy folder. The client_home can + * be different from this folder on your system. For example, you may have a different folder + * (say, my_client_folder) with its own axis2.xml file. my_client_folder/modules will have the + * modules that the client uses + */ + client_home = AXIS2_GETENV("AXIS2C_HOME"); + if (!client_home) + { + printf("Please ensure AXIS2C_HOME is set as an env variable\n"); + return 0; + } + + /* Create service client */ + svc_client = axis2_svc_client_create(env, client_home); + if (!svc_client) + { + printf("Error creating service client\n"); + AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" + " %d :: %s", env->error->error_number, + AXIS2_ERROR_GET_MESSAGE(env->error)); + } + + /* Set service client options */ + AXIS2_SVC_CLIENT_SET_OPTIONS(svc_client, &env, options); + + /* Engage addressing module */ + AXIS2_SVC_CLIENT_ENGAGE_MODULE(svc_client, &env, AXIS2_MODULE_ADDRESSING); + + /* Build the SOAP request message payload using OM API.*/ + payload = build_om_payload_for_WSEntryPointTestRPC_svc(env); + + /* Send request */ + ret_node = AXIS2_SVC_CLIENT_SEND_RECEIVE(svc_client, env, payload); + + if(ret_node) + { + axis2_char_t *om_str = NULL; + om_str = AXIOM_NODE_TO_STRING(ret_node, env); + if (om_str) + printf("\nReceived OM : %s\n", om_str); + printf("\nWSEntryPointTestRPC client invoke SUCCESSFUL!\n"); + } + else + { + AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "Stub invoke FAILED: Error code:" + " %d :: %s", env->error->error_number, + AXIS2_ERROR_GET_MESSAGE(env->error)); + printf("WSEntryPointTestRPC client invoke FAILED!\n"); + } + + if (svc_client) + { + AXIS2_SVC_CLIENT_FREE(svc_client, env); + svc_client = NULL; + } + if (endpoint_ref) + { + AXIS2_ENDPOINT_REF_FREE(endpoint_ref, &env); + endpoint_ref = NULL; + } + return 0; +} + +/* build SOAP request message content using OM */ +axiom_node_t * +build_om_payload_for_WSEntryPointTestRPC_svc(axis2_env_t *env) +{ + axiom_node_t* req_om_node = NULL; + axiom_element_t* req_om_elem = NULL; + axiom_node_t* param_om_node = NULL; + axiom_element_t* param_om_elem = NULL; + axiom_namespace_t *ns1 = NULL; + axis2_char_t *om_str = NULL; + + ns1 = axiom_namespace_create (env, "http://www.WSEntryPointTest.org/WSEntryPointTestRPC/", "ns1"); + req_om_elem = axiom_element_create(env, NULL, "doString", ns1, &req_om_node); + param_om_elem = axiom_element_create(env, req_om_node, "doStringRequest", ns1, ¶m_om_node); + AXIOM_ELEMENT_SET_TEXT(param_om_elem, env, "WSEntryPointTestRPC Client Call", param_om_node); + + om_str = AXIOM_NODE_TO_STRING(req_om_node, env); + if (om_str) + printf("\nSending OM : %s\n", om_str); + + return req_om_node; +} diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj new file mode 100644 index 0000000000..5c48a3a683 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCClient/WSEntryPointTestRPCClient.vcproj @@ -0,0 +1,135 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="WSEntryPointTestRPCClient" + ProjectGUID="{F0972250-9F56-45B3-AFB9-0A4124A8B3D2}" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="1" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="$(AXIS2C_HOME)/include" + PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="5" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="axiom.lib axis2_engine.lib axis2_parser.lib axis2_util.lib" + OutputFile="$(OutDir)/WSEntryPointTestRPCClient.exe" + LinkIncremental="2" + AdditionalLibraryDirectories="$(AXIS2C_HOME)/lib" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(OutDir)/WSEntryPointTestRPCClient.pdb" + SubSystem="1" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="1" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE" + RuntimeLibrary="4" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/WSEntryPointTestRPCClient.exe" + LinkIncremental="1" + GenerateDebugInformation="TRUE" + SubSystem="1" + OptimizeReferences="2" + EnableCOMDATFolding="2" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <File + RelativePath=".\WSEntryPointTestRPCClient.c"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config new file mode 100644 index 0000000000..42ad3ccfe3 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/Tuscany-model.config @@ -0,0 +1,24 @@ +<?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. + --> + +<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0"> + <wsdl> + <file name="WSEntryPointTestRPC.wsdl"/> + </wsdl> + <xsd> + </xsd> +</tuscany-model> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h new file mode 100644 index 0000000000..5bd20f103a --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h @@ -0,0 +1,30 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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. | ++----------------------------------------------------------------------+ +*/ + +#ifndef WSEENTRYPOINTTESTRPC_H +#define WSEENTRYPOINTTESTRPC_H +class WSEntryPointTestRPC +{ +public: + virtual char* doString(char* arg1) = 0; +}; + +#endif + + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl new file mode 100644 index 0000000000..1706534042 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WSEntryPointTestRPC" targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/"> + + <wsdl:types> + <xs:schema targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" + elementFormDefault="qualified"> + + <xs:element name="doStringRequest"> + <xs:simpleType> + <xs:restriction base="xs:string"/> + </xs:simpleType> + </xs:element> + <xs:element name="doStringResponse"> + <xs:simpleType> + <xs:restriction base="xs:string"/> + </xs:simpleType> + </xs:element> + + </xs:schema> + </wsdl:types> + + <wsdl:message name="doStringResponseMsg"> + <wsdl:part name="doStringResponse" element="tns:doStringResponse"/> + </wsdl:message> + <wsdl:message name="doStringRequestMsg"> + <wsdl:part name="doStringRequest" element="tns:doStringRequest"/> + </wsdl:message> + +<!-- + <wsdl:message name="doStringResponseMsg"> + <wsdl:part name="doStringResponse" type="xsd:string"/> + </wsdl:message> + <wsdl:message name="doStringRequestMsg"> + <wsdl:part name="doStringRequest" type="xsd:string"/> + </wsdl:message> +--> + <wsdl:portType name="WSEntryPointTestRPC"> + <wsdl:operation name="doString"> + <wsdl:input message="tns:doStringRequestMsg"/> + <wsdl:output message="tns:doStringResponseMsg"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="WSEntryPointTestRPCSOAP" type="tns:WSEntryPointTestRPC"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="doString"> + <soap:operation soapAction="WSEntryPointTestRPC/doString"/> + <wsdl:input> + <soap:body namespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body namespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="WSEntryPointTestRPC"> + <wsdl:port binding="tns:WSEntryPointTestRPCSOAP" name="WSEntryPointTestRPCSOAP"> + <soap:address location="http://localhost:9090/axis2/services/WSEntryPointTestRPC"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType new file mode 100644 index 0000000000..15287150e0 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="ASCII"?> +<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <service name="WSEntryPointTestRPCService"> + <interface.cpp header="WSEntryPointTestRPC.h"> + </interface.cpp> + </service> + +</componentType> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp new file mode 100644 index 0000000000..f46d64db18 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.cpp @@ -0,0 +1,38 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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. | ++----------------------------------------------------------------------+ +*/ + +#include "WSEntryPointTestRPCImpl.h" +#include <stdio.h> + +WSEntryPointTestRPCImpl::WSEntryPointTestRPCImpl() +{ +} + +WSEntryPointTestRPCImpl::~WSEntryPointTestRPCImpl() +{ +} + +// WSEntryPointTestRPC interface +char* WSEntryPointTestRPCImpl::doString(char* arg1) +{ + printf("WSEntryPointTestRPCImpl::doString %s\n", arg1); + + return "WSEntryPointTestRPCImpl::doString response"; +} + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h new file mode 100644 index 0000000000..82023992c7 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h @@ -0,0 +1,36 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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. | ++----------------------------------------------------------------------+ +*/ + +#ifndef WSEENTRYPOINTTESTRPCIMPL_H +#define WSEENTRYPOINTTESTRPCIMPL_H + +#include "WSEntryPointTestRPC.h" + +class WSEntryPointTestRPCImpl : public WSEntryPointTestRPC +{ +public: + WSEntryPointTestRPCImpl(); + virtual ~WSEntryPointTestRPCImpl(); + + // WSEntryPointTestRPC interface + virtual char* doString(char* arg1); +}; + +#endif + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp new file mode 100644 index 0000000000..b3799db850 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp @@ -0,0 +1,63 @@ +/* + * 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. + */ + +#include "WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h" + +#include "osoa/sca/sca.h" +using namespace osoa::sca; +using namespace tuscany::sca; + +extern "C" +{ + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_Factory(ServiceWrapper* target) + { + return new WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(target); + } + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + void WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_Destructor(void* proxy) + { + delete (WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy*)proxy; + } +} + +WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy::WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(ServiceWrapper* targ) : target(targ) +{ +} + +WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy::~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy() +{ + if (target) + delete target; +} + +char* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy::doString( char* arg0) +{ + Operation operation("doString"); + operation.addParameter(&arg0); + char* ret; + operation.setReturnValue(&ret); + target->invoke(operation); + return ret; +} + + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h new file mode 100644 index 0000000000..36aa7a6992 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h @@ -0,0 +1,34 @@ +/* + * 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. + */ + +#ifndef WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_h +#define WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_h + +#include "WSEntryPointTestRPC.h" +#include "tuscany/sca/core/ServiceWrapper.h" + +class WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy : public WSEntryPointTestRPC +{ +public: + WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(tuscany::sca::ServiceWrapper*); + virtual ~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy(); + virtual char* doString( char* arg1); +private: + tuscany::sca::ServiceWrapper* target; +}; + +#endif // WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy_h + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp new file mode 100644 index 0000000000..c20a5fb027 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp @@ -0,0 +1,70 @@ +/* + * 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. + */ + +#include "WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h" + +#include "osoa/sca/sca.h" +using namespace osoa::sca; +using namespace tuscany::sca; + +extern "C" +{ + + #if defined(WIN32) || defined(_WINDOWS) + __declspec(dllexport) + #endif + WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_Factory(tuscany::sca::model::Service* target) + { + return new WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(target); + } +} + +WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(Service* target) : ComponentServiceWrapper(target) +{ + impl = (WSEntryPointTestRPCImpl*)getImplementation(); +} + +WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper() +{ + releaseImplementation(); +} + +void* WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::newImplementation() +{ + return new WSEntryPointTestRPCImpl; +} + +void WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::deleteImplementation() +{ + delete impl; +} + +void WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper::invokeService(Operation& operation) +{ + const string& operationName = operation.getName(); + + if (operationName == "doString") + { + char* p0 = *( char**)operation.getParameterValue(0); + *(char**)operation.getReturnValue() = impl->doString(p0); + return; + } + + + throw ServiceRuntimeException("Invalid operation"); + +} + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h new file mode 100644 index 0000000000..875143461a --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h @@ -0,0 +1,36 @@ +/* + * 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. + */ + +#ifndef WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_h +#define WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_h + +#include "WSEntryPointTestRPCImpl.h" +#include "tuscany/sca/core/ComponentServiceWrapper.h" + +class WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper : public tuscany::sca::ComponentServiceWrapper +{ +public: + WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(tuscany::sca::model::Service* target); + virtual ~WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper(); + virtual void invokeService(tuscany::sca::Operation& operation); + virtual void* newImplementation(); + virtual void deleteImplementation(); +private: + WSEntryPointTestRPCImpl* impl; +}; + +#endif // WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper_h + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj new file mode 100644 index 0000000000..d3bc172bcd --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/WSEntryPointTestRPCModule.vcproj @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="7.10" + Name="WSEntryPointTestRPCModule" + ProjectGUID="{6F98DD05-6B3D-4C06-9E1C-AF3256DCA7EA}" + Keyword="Win32Proj"> + <Platforms> + <Platform + Name="Win32"/> + </Platforms> + <Configurations> + <Configuration + Name="Debug|Win32" + OutputDirectory="Debug" + IntermediateDirectory="Debug" + ConfigurationType="2" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + Optimization="0" + AdditionalIncludeDirectories="$(TUSCANY_SCACPP)/include,$(TUSCANY_SDOCPP)/include" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;WSENTRYPOINTTESTRPCMODULE_EXPORTS" + MinimalRebuild="TRUE" + BasicRuntimeChecks="3" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="4"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + AdditionalDependencies="tuscany_sca.lib tuscany_sdo.lib" + OutputFile="$(OutDir)/WSEntryPointTestRPCModule.dll" + LinkIncremental="2" + AdditionalLibraryDirectories="$(TUSCANY_SCACPP)/lib,$(TUSCANY_SDOCPP)/lib" + GenerateDebugInformation="TRUE" + ProgramDatabaseFile="$(OutDir)/WSEntryPointTestRPCModule.pdb" + SubSystem="2" + ImportLibrary="$(OutDir)/WSEntryPointTestRPCModule.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + <Configuration + Name="Release|Win32" + OutputDirectory="Release" + IntermediateDirectory="Release" + ConfigurationType="2" + CharacterSet="2"> + <Tool + Name="VCCLCompilerTool" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;WSENTRYPOINTTESTRPCMODULE_EXPORTS" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + Detect64BitPortabilityProblems="TRUE" + DebugInformationFormat="3"/> + <Tool + Name="VCCustomBuildTool"/> + <Tool + Name="VCLinkerTool" + OutputFile="$(OutDir)/WSEntryPointTestRPCModule.dll" + LinkIncremental="1" + GenerateDebugInformation="TRUE" + SubSystem="2" + OptimizeReferences="2" + EnableCOMDATFolding="2" + ImportLibrary="$(OutDir)/WSEntryPointTestRPCModule.lib" + TargetMachine="1"/> + <Tool + Name="VCMIDLTool"/> + <Tool + Name="VCPostBuildEventTool"/> + <Tool + Name="VCPreBuildEventTool"/> + <Tool + Name="VCPreLinkEventTool"/> + <Tool + Name="VCResourceCompilerTool"/> + <Tool + Name="VCWebServiceProxyGeneratorTool"/> + <Tool + Name="VCXMLDataGeneratorTool"/> + <Tool + Name="VCWebDeploymentTool"/> + <Tool + Name="VCManagedWrapperGeneratorTool"/> + <Tool + Name="VCAuxiliaryManagedWrapperGeneratorTool"/> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"> + <File + RelativePath=".\WSEntryPointTestRPCImpl.cpp"> + </File> + <File + RelativePath=".\WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.cpp"> + </File> + <File + RelativePath=".\WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.cpp"> + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"> + <File + RelativePath=".\WSEntryPointTestRPC.h"> + </File> + <File + RelativePath=".\WSEntryPointTestRPCImpl.h"> + </File> + <File + RelativePath=".\WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Proxy.h"> + </File> + <File + RelativePath=".\WSEntryPointTestRPCImpl_WSEntryPointTestRPCService_Wrapper.h"> + </File> + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"> + <File + RelativePath=".\sca.module"> + </File> + <File + RelativePath=".\services.xml"> + </File> + <File + RelativePath=".\Tuscany-model.config"> + </File> + <File + RelativePath=".\WSEntryPointTestRPC.wsdl"> + </File> + <File + RelativePath=".\WSEntryPointTestRPCImpl.componentType"> + </File> + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module new file mode 100644 index 0000000000..a6d397653e --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/sca.module @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="ASCII"?> +<module xmlns="http://www.osoa.org/xmlns/sca/0.9" + xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9" + name="WSEntryPointTestRPCModule"> + + <!-- Expose as a web service --> + <entryPoint name="WSEntryPointTestRPCEntrypoint" multiplicity="1..1"> + <interface.wsdl interface="WSEntryPointTestRPC.wsdl" callbackInterface=""></interface.wsdl> + <binding.ws port="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/#wsdl.endpoint(WSEntryPointTestRPC/WSEntryPointTestRPCSOAP)"></binding.ws> + <reference>WSEntryPointTestRPCServiceComponent</reference> + </entryPoint> + + + <component name="WSEntryPointTestRPCServiceComponent"> + <implementation.cpp dll="WSEntryPointTestRPCModule.dll" header="WSEntryPointTestRPCImpl.h"></implementation.cpp> + <properties> </properties> + <references> </references> + </component> +</module> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml new file mode 100644 index 0000000000..2fd4580526 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCModule/services.xml @@ -0,0 +1,30 @@ + +<!-- + 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. + --> +<service name="WSEntryPointTestRPC"> + <parameter name="ServiceClass" locked="xsd:false">tuscany_sca</parameter> + <parameter name="TuscanySystemRoot" locked="xsd:false">D:/tuscany/cpp/sca/test/WSEntryPointTestRPC/runtime</parameter> + <parameter name="TuscanyEntryPoint" locked="xsd:false">WSEntryPointTestRPCSubsystem/WSEntryPointTestRPCService/WSEntryPointTestRPCEntrypoint</parameter> + + <description> + This is a testing service , to test the system is working or not + </description> + + <operation name="doString"> + <!--messageReceiver class="axis2_receivers" /--> + </operation> + +</service> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem new file mode 100644 index 0000000000..c37d656a57 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/WSEntryPointTestRPCSubsystem/sca.subsystem @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + 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. + --> + +<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9" name="WSEntryPointTestRPCSubsystem"> + + <moduleComponent name="WSEntryPointTestRPCService" module="WSEntryPointTestRPCModule" /> + +</subsystem> + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/Tuscany-model.config b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/Tuscany-model.config new file mode 100644 index 0000000000..42ad3ccfe3 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/Tuscany-model.config @@ -0,0 +1,24 @@ +<?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. + --> + +<tuscany-model xmlns="http://org.apache.tuscany/xmlns/cpp/1.0"> + <wsdl> + <file name="WSEntryPointTestRPC.wsdl"/> + </wsdl> + <xsd> + </xsd> +</tuscany-model> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h new file mode 100644 index 0000000000..5bd20f103a --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.h @@ -0,0 +1,30 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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. | ++----------------------------------------------------------------------+ +*/ + +#ifndef WSEENTRYPOINTTESTRPC_H +#define WSEENTRYPOINTTESTRPC_H +class WSEntryPointTestRPC +{ +public: + virtual char* doString(char* arg1) = 0; +}; + +#endif + + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl new file mode 100644 index 0000000000..1706534042 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPC.wsdl @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WSEntryPointTestRPC" targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/"> + + <wsdl:types> + <xs:schema targetNamespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" + xmlns:xs="http://www.w3.org/2001/XMLSchema" + xmlns:tns="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" + elementFormDefault="qualified"> + + <xs:element name="doStringRequest"> + <xs:simpleType> + <xs:restriction base="xs:string"/> + </xs:simpleType> + </xs:element> + <xs:element name="doStringResponse"> + <xs:simpleType> + <xs:restriction base="xs:string"/> + </xs:simpleType> + </xs:element> + + </xs:schema> + </wsdl:types> + + <wsdl:message name="doStringResponseMsg"> + <wsdl:part name="doStringResponse" element="tns:doStringResponse"/> + </wsdl:message> + <wsdl:message name="doStringRequestMsg"> + <wsdl:part name="doStringRequest" element="tns:doStringRequest"/> + </wsdl:message> + +<!-- + <wsdl:message name="doStringResponseMsg"> + <wsdl:part name="doStringResponse" type="xsd:string"/> + </wsdl:message> + <wsdl:message name="doStringRequestMsg"> + <wsdl:part name="doStringRequest" type="xsd:string"/> + </wsdl:message> +--> + <wsdl:portType name="WSEntryPointTestRPC"> + <wsdl:operation name="doString"> + <wsdl:input message="tns:doStringRequestMsg"/> + <wsdl:output message="tns:doStringResponseMsg"/> + </wsdl:operation> + </wsdl:portType> + <wsdl:binding name="WSEntryPointTestRPCSOAP" type="tns:WSEntryPointTestRPC"> + <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> + <wsdl:operation name="doString"> + <soap:operation soapAction="WSEntryPointTestRPC/doString"/> + <wsdl:input> + <soap:body namespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" use="literal"/> + </wsdl:input> + <wsdl:output> + <soap:body namespace="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/" use="literal"/> + </wsdl:output> + </wsdl:operation> + </wsdl:binding> + <wsdl:service name="WSEntryPointTestRPC"> + <wsdl:port binding="tns:WSEntryPointTestRPCSOAP" name="WSEntryPointTestRPCSOAP"> + <soap:address location="http://localhost:9090/axis2/services/WSEntryPointTestRPC"/> + </wsdl:port> + </wsdl:service> +</wsdl:definitions> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType new file mode 100644 index 0000000000..15287150e0 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.componentType @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="ASCII"?> +<componentType xmlns="http://www.osoa.org/xmlns/sca/0.9" + xmlns:xs="http://www.w3.org/2001/XMLSchema"> + + <service name="WSEntryPointTestRPCService"> + <interface.cpp header="WSEntryPointTestRPC.h"> + </interface.cpp> + </service> + +</componentType> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h new file mode 100644 index 0000000000..82023992c7 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/WSEntryPointTestRPCImpl.h @@ -0,0 +1,36 @@ +/* ++----------------------------------------------------------------------+ +| (c) Copyright IBM Corporation 2005. | +| All Rights Reserved. | ++----------------------------------------------------------------------+ +| | +| 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. | ++----------------------------------------------------------------------+ +*/ + +#ifndef WSEENTRYPOINTTESTRPCIMPL_H +#define WSEENTRYPOINTTESTRPCIMPL_H + +#include "WSEntryPointTestRPC.h" + +class WSEntryPointTestRPCImpl : public WSEntryPointTestRPC +{ +public: + WSEntryPointTestRPCImpl(); + virtual ~WSEntryPointTestRPCImpl(); + + // WSEntryPointTestRPC interface + virtual char* doString(char* arg1); +}; + +#endif + diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/sca.module b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/sca.module new file mode 100644 index 0000000000..a6d397653e --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/modules/WSEntryPointTestRPCModule/sca.module @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="ASCII"?> +<module xmlns="http://www.osoa.org/xmlns/sca/0.9" + xmlns:v="http://www.osoa.org/xmlns/sca/values/0.9" + name="WSEntryPointTestRPCModule"> + + <!-- Expose as a web service --> + <entryPoint name="WSEntryPointTestRPCEntrypoint" multiplicity="1..1"> + <interface.wsdl interface="WSEntryPointTestRPC.wsdl" callbackInterface=""></interface.wsdl> + <binding.ws port="http://www.WSEntryPointTest.org/WSEntryPointTestRPC/#wsdl.endpoint(WSEntryPointTestRPC/WSEntryPointTestRPCSOAP)"></binding.ws> + <reference>WSEntryPointTestRPCServiceComponent</reference> + </entryPoint> + + + <component name="WSEntryPointTestRPCServiceComponent"> + <implementation.cpp dll="WSEntryPointTestRPCModule.dll" header="WSEntryPointTestRPCImpl.h"></implementation.cpp> + <properties> </properties> + <references> </references> + </component> +</module> diff --git a/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/subsystems/WSEntryPointTestRPCSubsystem/sca.subsystem b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/subsystems/WSEntryPointTestRPCSubsystem/sca.subsystem new file mode 100644 index 0000000000..c37d656a57 --- /dev/null +++ b/tags/cpp-0.1.incubating-M1-RC3b/sca/test/WSEntryPointTestRPC/runtime/subsystems/WSEntryPointTestRPCSubsystem/sca.subsystem @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="ASCII"?> +<!-- + 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. + --> + +<subsystem xmlns="http://www.osoa.org/xmlns/sca/0.9" name="WSEntryPointTestRPCSubsystem"> + + <moduleComponent name="WSEntryPointTestRPCService" module="WSEntryPointTestRPCModule" /> + +</subsystem> + |