You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/09/15 23:42:57 UTC

svn commit: r446744 - in /incubator/tuscany/cpp/sca: runtime/core/src/tuscany/sca/util/ runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/ samples/RubyCalculator/sample.calculator/

Author: jsdelfino
Date: Fri Sep 15 14:42:56 2006
New Revision: 446744

URL: http://svn.apache.org/viewvc?view=rev&rev=446744
Log:
Fixed handling of open content /OpenDataObjects in web service responses

Modified:
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h
    incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.h
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl
    incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.rb

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp?view=diff&rev=446744&r1=446743&r2=446744
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.cpp Fri Sep 15 14:42:56 2006
@@ -124,70 +124,157 @@
             // Iterate over all the properties
             //////////////////////////////////////////////////////////////////////////
             PropertyList pl = dataObject->getInstanceProperties();
-            for (int i = 0; i < pl.size(); i++)
+            if (pl.size() != 0)
             {
-                tabs(inc);
-                cout << "Property: " << pl[i].getName() << endl;
-                
-                const Type& propertyType = pl[i].getType();
-                
-                tabs(inc);
-                cout << "Property Type: " << propertyType.getURI()<< "#" << propertyType.getName() << endl;
-                
-                if (dataObject->isSet(pl[i]))
+                for (int i = 0; i < pl.size(); i++)
                 {
+                    tabs(inc);
+                    cout << "Property: " << pl[i].getName() << endl;
+                    
+                    const Type& propertyType = pl[i].getType();
+                    
+                    tabs(inc);
+                    cout << "Property Type: " << propertyType.getURI()<< "#" << propertyType.getName() << endl;
                     
-                    //////////////////////////////////////////////////////////////////////
-                    // For a many-valued property get the list of values
-                    //////////////////////////////////////////////////////////////////////
-                    if (pl[i].isMany())
+                    if (dataObject->isSet(pl[i]))
                     {
-                        inc++;
-                        DataObjectList& dol = dataObject->getList(pl[i]);
-                        for (int j = 0; j <dol.size(); j++)
+                        
+                        //////////////////////////////////////////////////////////////////////
+                        // For a many-valued property get the list of values
+                        //////////////////////////////////////////////////////////////////////
+                        if (pl[i].isMany())
                         {
-                            tabs(inc);
-                            cout << "Value " << j <<endl;
                             inc++;
-                            
-                            if (propertyType.isDataType())
+                            DataObjectList& dol = dataObject->getList(pl[i]);
+                            for (int j = 0; j <dol.size(); j++)
                             {
                                 tabs(inc);
-                                cout<< "Property Value: " << dol.getCString(j) <<endl ; 
+                                cout << "Value " << j <<endl;
+                                inc++;
+                                
+                                if (propertyType.isDataType())
+                                {
+                                    tabs(inc);
+                                    cout<< "Property Value: " << dol.getCString(j) <<endl ; 
+                                }
+                                else
+                                    printDO(dol[j], inc);
+                                inc--;
                             }
-                            else
-                                printDO(dol[j], inc);
+                            inc--;
+                        } // end IsMany
+                        
+                        
+                        //////////////////////////////////////////////////////////////////////
+                        // For a primitive data type print the value
+                        //////////////////////////////////////////////////////////////////////
+                        else if (propertyType.isDataType())
+                        {
+                            tabs(inc);
+                            cout<< "Property Value: " << dataObject->getCString(pl[i]) <<endl ; 
+                        }
+                        
+                        //////////////////////////////////////////////////////////////////////
+                        // For a dataobject print the do
+                        //////////////////////////////////////////////////////////////////////
+                        else
+                        {
+                            inc++;
+                            printDO(dataObject->getDataObject(pl[i]), inc);
                             inc--;
                         }
-                        inc--;
-                    } // end IsMany
-                    
-                    
-                    //////////////////////////////////////////////////////////////////////
-                    // For a primitive data type print the value
-                    //////////////////////////////////////////////////////////////////////
-                    else if (propertyType.isDataType())
-                    {
-                        tabs(inc);
-                        cout<< "Property Value: " << dataObject->getCString(pl[i]) <<endl ; 
                     }
-                    
-                    //////////////////////////////////////////////////////////////////////
-                    // For a dataobject print the do
-                    //////////////////////////////////////////////////////////////////////
                     else
                     {
-                        inc++;
-                        printDO(dataObject->getDataObject(pl[i]), inc);
-                        inc--;
+                        tabs(inc);
+                        cout<< "Property Value: not set" <<endl ; 
                     }
+                    
                 }
-                else
+            }
+            else
+            {
+                // Print elements under an open DataObject 
+                if(dataObject->getType().isOpenType() && dataObject->getType().isDataObjectType())
                 {
-                    tabs(inc);
-                    cout<< "Property Value: not set" <<endl ; 
+                    SequencePtr sequence = dataObject->getSequence();
+                    if (sequence != NULL)
+                    {
+                        for (int i = 0; i < sequence->size(); i++)
+                        {
+                            if (sequence->isText(i))
+                            {
+                                tabs(inc);
+                                cout<< "Text Value: " << sequence->getCStringValue(i) <<endl ; 
+                            }
+                            else {
+                                const Property& p = sequence->getProperty(i);
+                                
+                                tabs(inc);
+                                cout << "Property: " << p.getName() << endl;
+                                
+                                const Type& propertyType = p.getType();
+                                
+                                tabs(inc);
+                                cout << "Property Type: " << propertyType.getURI()<< "#" << propertyType.getName() << endl;
+                                
+                                if (dataObject->isSet(p))
+                                {
+                                    
+                                    //////////////////////////////////////////////////////////////////////
+                                    // For a many-valued property get the list of values
+                                    //////////////////////////////////////////////////////////////////////
+                                    if (p.isMany())
+                                    {
+                                        inc++;
+                                        DataObjectList& dol = dataObject->getList(p);
+                                        for (int j = 0; j <dol.size(); j++)
+                                        {
+                                            tabs(inc);
+                                            cout << "Value " << j <<endl;
+                                            inc++;
+                                            
+                                            if (propertyType.isDataType())
+                                            {
+                                                tabs(inc);
+                                                cout<< "Property Value: " << dol.getCString(j) <<endl ; 
+                                            }
+                                            else
+                                                printDO(dol[j], inc);
+                                            inc--;
+                                        }
+                                        inc--;
+                                    } // end IsMany
+                                    
+                                    
+                                    //////////////////////////////////////////////////////////////////////
+                                    // For a primitive data type print the value
+                                    //////////////////////////////////////////////////////////////////////
+                                    else if (propertyType.isDataType())
+                                    {
+                                        tabs(inc);
+                                        cout<< "Property Value: " << dataObject->getCString(p) <<endl ; 
+                                    }
+                                    
+                                    //////////////////////////////////////////////////////////////////////
+                                    // For a dataobject print the do
+                                    //////////////////////////////////////////////////////////////////////
+                                    else
+                                    {
+                                        inc++;
+                                        printDO(dataObject->getDataObject(p), inc);
+                                        inc--;
+                                    }
+                                }
+                                else
+                                {
+                                    tabs(inc);
+                                    cout<< "Property Value: not set" <<endl ; 
+                                }
+                            }
+                        }
+                    }
                 }
-                
             }
             inc--;
         }
@@ -213,6 +300,23 @@
             
         }
         
+        void Utils::printType(const Type& type, int increment) 
+        {
+            int inc = increment;
+            tabs(inc);
+            cout << "Type: " << type.getURI()<< "#" << type.getName() << endl;
+            inc++;
+            PropertyList pl = type.getProperties();
+            for (int j = 0; j < pl.size(); j++)
+            {
+                tabs(inc);
+                cout << "\tProperty: " << pl[j].getName()
+                    << " type: " <<pl[j].getType().getURI()<<"#"<<pl[j].getType().getName()<< endl;
+                inc++;
+                printType(pl[j].getType(), inc);
+                inc--;
+            }
+        }
         
     } // End namespace sca
 } // End namespace tuscany

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h?view=diff&rev=446744&r1=446743&r2=446744
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/util/Utils.h Fri Sep 15 14:42:56 2006
@@ -53,6 +53,7 @@
 
             static void printDO(commonj::sdo::DataObjectPtr dataObject, int increment=0);
             static void printTypes(commonj::sdo::DataFactoryPtr df);
+            static void printType(const commonj::sdo::Type& type, int increment=0);
             
         private:
             static void tabs(int increment=0);

Modified: incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp?view=diff&rev=446744&r1=446743&r2=446744
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp Fri Sep 15 14:42:56 2006
@@ -78,6 +78,10 @@
             DataObjectPtr WSServiceProxy::invoke(const WSDLOperation& wsdlOperation, DataObjectPtr inputDataObject)
             {
                 LOGENTRY(1,"WSServiceProxy::invoke");
+    
+                printf("inputDataObject %s#%s\n", inputDataObject->getType().getURI(), inputDataObject->getType().getName());
+                Utils::printType(inputDataObject->getType());
+                Utils::printDO(inputDataObject);
             
                 Reference* reference = getReference();
                 Component* component = reference->getComponent();
@@ -102,13 +106,10 @@
                     documentStyle,
                     wrappedStyle);
                 
-                DataObjectPtr outputDataObject;
-                
                 if (documentStyle)
                 {
                     if (wrappedStyle)
                     {
-                        outputDataObject = dataFactoryPtr->create(outputTypeURI, outputTypeName);
 
                         // Create new Operation object and set parameters and return value
                         Operation operation(wsdlOperation.getOperationName().c_str());
@@ -300,137 +301,24 @@
                             }         
                         }
                                 
-                        // Now go through outputDataObject to set the return value
-                        pl = outputDataObject->getInstanceProperties();
-                    
-                        // Set up the possible return value pointers
-                        bool boolData = 0;
-                        char byteData = 0;
-                        wchar_t charData = 0;
-                        long double doubleData = 0;
-                        float floatData = 0;
-                        long intData = 0;
-                        short shortData = 0;
-                        const char* stringData;
-                        DataObjectPtr dataObjectData;
-                    
-                    
-                        // There should only be one return value, but go through any list anyway?
-                        if(pl.size() > 1)
-                        {
-                            LOGINFO(4, "More than one return value is defined in the WSDL, just defining the first");
-                        }
-                        else if(pl.size() == 0)
-                        {
-                            if(outputDataObject->getType().isOpenType() && outputDataObject->getType().isDataObjectType())
-                            {
-                                /*
-                                 * This code deals with returning xsd:any elements
-                                 * Return as a DataObject set within the outputDataObject
-                                 */
-                               
-                                // An OpenDataObject for the data to return in
-                                operation.setReturnValue(&dataObjectData);            
-                            }
-                            else
-                            {
-                                LOGINFO(4, "No return values are defined in the WSDL");
-                            }
-                    
-                        }
-                    
-                        if(pl.size() > 0)
-                        {
-                            const char* name = pl[0].getName();
-                            
-                            switch (pl[0].getTypeEnum()) 
-                            {
-                            case Type::BooleanType:
-                                {
-                                    //printf("outputDataObject has BooleanType named %s\n", name);
-                                    operation.setReturnValue(&boolData);
-                                }
-                                break;
-                            case Type::ByteType:
-                                {
-                                    //printf("outputDataObject has ByteType named %s\n", name);
-                                    operation.setReturnValue(&byteData);
-                                }
-                                break;
-                            case Type::CharacterType:
-                                {
-                                    //printf("outputDataObject has CharacterType named %s\n", name);
-                                    operation.setReturnValue(&charData);
-                                }
-                                break;
-                            case Type::DoubleType:
-                                {
-                                    //printf("outputDataObject has DoubleType named %s\n", name);
-                                    operation.setReturnValue((long double*) &doubleData);
-                                }
-                                break;
-                            case Type::FloatType:
-                                {
-                                    //printf("outputDataObject has FloatType named %s\n", name);
-                                    operation.setReturnValue(&floatData);
-                                }
-                                break;
-                            case Type::IntegerType:
-                                {
-                                    //printf("outputDataObject has IntegerType named %s\n", name);
-                                    operation.setReturnValue(&intData);
-                                }
-                                break;
-                            case Type::ShortType:
-                                {
-                                    //printf("outputDataObject has ShortType named %s\n", name);
-                                    operation.setReturnValue(&shortData);
-                                }
-                                break;
-                            case Type::StringType:
-                            case Type::BytesType:
-                                 {
-                                    //printf("outputDataObject has StringType or BytesType named %s\n", name);
-                                    operation.setReturnValue((const char**) &stringData);
-                                }
-                                break;
-                            case Type::DataObjectType:
-                                {
-                                    // printf("outputDataObject has DataObjectType named %s with type %s # %s\n", name, pl[0].getType().getURI(), pl[0].getType().getName());
-                                    operation.setReturnValue(&dataObjectData);
-                                }
-                                break;
-                            case Type::DateType:
-                                LOGERROR_1(0, "SDO DateType return values are not yet supported (%s)", name);
-                                return NULL;
-                            case Type::LongType:
-                                LOGERROR_1(0, "SDO LongType (int64_t) return values are not yet supported (%s)", name);
-                                return NULL;
-                            case Type::UriType:
-                                LOGERROR_1(0, "SDO UriType return values are not yet supported (%s)", name);
-                                return NULL;
-                            case Type::BigDecimalType:
-                                LOGERROR_1(0, "SDO BigDecimalType return values are not yet supported (%s)", name);
-                                return NULL;
-                            case Type::BigIntegerType:
-                                LOGERROR_1(0, "SDO BigIntegerType return values are not yet supported (%s)", name);
-                                return NULL;
-                            default:
-                                LOGERROR_1(0, "Unknown SDO type return value named %s has been found. Unknown types are not yet supported", name);
-                                return NULL;
-                            }         
-                        }
-                    
                         try
                         {
                             // Call into the target service wrapper
                             serviceWrapper->invoke(operation);
                     
                             // Set the data in the outputDataObject to be returned
-                            setOutputData(operation, outputDataObject);                            
-            
-                            //printf("outputDataObject %s#%s\n", outputDataObject->getType().getURI(), outputDataObject->getType().getName());
-                            //Utils::printDO(outputDataObject);
+                            DataObjectPtr outputDataObject = dataFactoryPtr->create(outputTypeURI, outputTypeName);
+                            
+                            const Type& rootType = dataFactoryPtr->getType(outputDataObject->getType().getURI(), "RootType");
+                            printf("rootType %s#%s\n", rootType.getURI(), rootType.getName());
+                            Utils::printType(rootType);
+
+                            printf("outputDataObject %s#%s\n", outputDataObject->getType().getURI(), outputDataObject->getType().getName());
+                            Utils::printType(outputDataObject->getType());
+
+                            setOutputData(operation, outputDataObject, dataFactoryPtr);                            
+
+                            Utils::printDO(outputDataObject);
 
                             LOGEXIT(1,"WSServiceProxy::invoke");
                         
@@ -466,10 +354,10 @@
             }
             
             
-            void WSServiceProxy::setOutputData(Operation operation, DataObjectPtr outputDataObject)
+            void WSServiceProxy::setOutputData(Operation operation, DataObjectPtr outputDataObject, DataFactoryPtr dataFactoryPtr)
             {    
                 // Go through data object to set the return value
-                PropertyList pl = outputDataObject->getInstanceProperties();
+                PropertyList pl = outputDataObject->getType().getProperties();
             
                 if(pl.size() == 0)
                 {
@@ -477,101 +365,150 @@
                     {
                         /*
                          * This code deals with returning xsd:any elements
-                         * Return as a DataObject set within the outputDataObject
                          */
-                        
-                        DataObjectPtr* dataObjectData = (DataObjectPtr*) operation.getReturnValue();
-                        //Utils::printDO(*dataObjectData);
-            
-                        // Need to provide a name for the dataobject being returned, use the containment property name if there is one.
-                        const char* rootName = "OpenDataObject";
-                        try
+                        DataObjectList& l = outputDataObject->getList("data");
+                        Operation::ParameterType resultType = operation.getReturnType();
+                        switch(resultType)
                         {
-                            const Property& prop = (*dataObjectData)->getContainmentProperty();
-                            rootName = prop.getName();
-                            (*dataObjectData)->detach();
-                        }
-                        catch(SDOPropertyNotFoundException&)
-                        {
-                            // DataObject has no containment property - use default rootName
+                        case Operation::BOOL: 
+                            {
+                                l.append(*(bool*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::SHORT: 
+                            {
+                                l.append(*(short*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::LONG: 
+                            {
+                                l.append(*(long*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::USHORT: 
+                            {
+                                l.append(*(short*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::ULONG: 
+                            {
+                                l.append(*(long*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::FLOAT: 
+                            {
+                                l.append(*(float*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::DOUBLE: 
+                            {
+                                l.append(*(long double*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::LONGDOUBLE: 
+                            {
+                                l.append(*(long double*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::CHARS: 
+                            {
+                                l.append(*(char**)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::STRING: 
+                            {
+                                l.append((*(string*)operation.getReturnValue()).c_str());
+                                break;
+                            }
+                        case Operation::DATAOBJECT: 
+                            {
+                                l.append(*(DataObjectPtr*)operation.getReturnValue());
+                                break;
+                            }
+                        default:
+                            {
+                                string msg = "Unsupported parameter type";
+                                msg += resultType;
+                                throw msg.c_str();
+                            }
                         }
-                        outputDataObject->setDataObject(rootName, *dataObjectData);
                     }
                     else
                     {
-                        LOGINFO(4, "No return values are defined in the WSDL");
+                        LOGINFO(4, "No return values are defined");
                     }
-            
                 }
+                else {
             
-                // Should only be one return value.. This goes through all return values
-                for(int i=0; i<pl.size(); i++)
-                {
-                    const char* name = pl[i].getName();
-
-                    Operation::ParameterType resultType = operation.getReturnType();
-                    switch(resultType)
+                    // Should only be one return value.. This goes through all return values
+                    for(int i=0; i<pl.size(); i++)
                     {
-                    case Operation::BOOL: 
-                        {
-                            outputDataObject->setBoolean(pl[i], *(bool*)operation.getReturnValue());
-                            break;
-                        }
-                    case Operation::SHORT: 
-                        {
-                            outputDataObject->setShort(pl[i], *(short*)operation.getReturnValue());
-                            break;
-                        }
-                    case Operation::LONG: 
-                        {
-                            outputDataObject->setLong(pl[i], *(long*)operation.getReturnValue());
-                            break;
-                        }
-                    case Operation::USHORT: 
-                        {
-                            outputDataObject->setInteger(pl[i], *(unsigned short*)operation.getReturnValue());
-                            break;
-                        }
-                    case Operation::ULONG: 
-                        {
-                            outputDataObject->setInteger(pl[i], *(unsigned long*)operation.getReturnValue());
-                            break;
-                        }
-                    case Operation::FLOAT: 
-                        {
-                            outputDataObject->setFloat(pl[i], *(float*)operation.getReturnValue());
-                            break;
-                        }
-                    case Operation::DOUBLE: 
-                        {
-                            outputDataObject->setDouble(pl[i], *(double*)operation.getReturnValue());
-                            break;
-                        }
-                    case Operation::LONGDOUBLE: 
-                        {
-                            outputDataObject->setDouble(pl[i], *(long double*)operation.getReturnValue());
-                            break;
-                        }
-                    case Operation::CHARS: 
-                        {
-                            outputDataObject->setCString(pl[i], *(char**)operation.getReturnValue());
-                            break;
-                        }
-                    case Operation::STRING: 
-                        {
-                            outputDataObject->setCString(pl[i], (*(string*)operation.getReturnValue()).c_str());
-                            break;
-                        }
-                    case Operation::DATAOBJECT: 
-                        {
-                            outputDataObject->setDataObject(pl[i], *(DataObjectPtr*)operation.getReturnValue());
-                            break;
-                        }
-                    default:
+                        const char* name = pl[i].getName();
+    
+                        Operation::ParameterType resultType = operation.getReturnType();
+                        switch(resultType)
                         {
-                            string msg = "Unsupported parameter type";
-                            msg += resultType;
-                            throw msg.c_str();
+                        case Operation::BOOL: 
+                            {
+                                outputDataObject->setBoolean(pl[i], *(bool*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::SHORT: 
+                            {
+                                outputDataObject->setShort(pl[i], *(short*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::LONG: 
+                            {
+                                outputDataObject->setLong(pl[i], *(long*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::USHORT: 
+                            {
+                                outputDataObject->setInteger(pl[i], *(unsigned short*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::ULONG: 
+                            {
+                                outputDataObject->setInteger(pl[i], *(unsigned long*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::FLOAT: 
+                            {
+                                outputDataObject->setFloat(pl[i], *(float*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::DOUBLE: 
+                            {
+                                outputDataObject->setDouble(pl[i], *(double*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::LONGDOUBLE: 
+                            {
+                                outputDataObject->setDouble(pl[i], *(long double*)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::CHARS: 
+                            {
+                                outputDataObject->setCString(pl[i], *(char**)operation.getReturnValue());
+                                break;
+                            }
+                        case Operation::STRING: 
+                            {
+                                outputDataObject->setCString(pl[i], (*(string*)operation.getReturnValue()).c_str());
+                                break;
+                            }
+                        case Operation::DATAOBJECT: 
+                            {
+                                outputDataObject->setDataObject(pl[i], *(DataObjectPtr*)operation.getReturnValue());
+                                break;
+                            }
+                        default:
+                            {
+                                string msg = "Unsupported parameter type";
+                                msg += resultType;
+                                throw msg.c_str();
+                            }
                         }
                     }
                 }

Modified: incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.h?view=diff&rev=446744&r1=446743&r2=446744
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.h (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.h Fri Sep 15 14:42:56 2006
@@ -32,6 +32,7 @@
 using namespace tuscany::sca::model;
 
 using commonj::sdo::DataObjectPtr;
+using commonj::sdo::DataFactoryPtr;
 
 namespace tuscany
 {
@@ -77,7 +78,7 @@
     
             private:
 
-                void setOutputData(Operation operation, DataObjectPtr outputDataObject);
+                void setOutputData(Operation operation, DataObjectPtr outputDataObject, DataFactoryPtr dataFactoryPtr);
                 
                 /**
                  * The target service wrapper

Modified: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl?view=diff&rev=446744&r1=446743&r2=446744
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl (original)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/Calculator.wsdl Fri Sep 15 14:42:56 2006
@@ -27,9 +27,8 @@
 
 			<xs:element name="add">
 				<xs:complexType>
-					<xs:sequence>
-						<xs:element name="param1" type="xs:float"/>
-						<xs:element name="param2" type="xs:float"/>
+					<xs:sequence>
+						<xs:any maxOccurs="unbounded"/>
 					</xs:sequence>
 				</xs:complexType>
 			</xs:element>
@@ -60,11 +59,11 @@
 					</xs:sequence>
 				</xs:complexType>
 			</xs:element>
-
+
 			<xs:element name="result">
 				<xs:complexType>
 					<xs:sequence>
-						<xs:element name="data" type="xs:float"/>
+						<xs:any maxOccurs="unbounded"/>
 					</xs:sequence>
 				</xs:complexType>
 			</xs:element>

Modified: incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.rb
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.rb?view=diff&rev=446744&r1=446743&r2=446744
==============================================================================
--- incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.rb (original)
+++ incubator/tuscany/cpp/sca/samples/RubyCalculator/sample.calculator/CalculatorImpl.rb Fri Sep 15 14:42:56 2006
@@ -27,22 +27,22 @@
 	
   def div(arg1, arg2)
     print "Ruby - CalculatorImpl.div\n"
-    @divideService.divide(arg1, arg2)
+    @divideService.divide(arg1.to_f, arg2.to_f)
   end
 
   def add(arg1, arg2)
     print "Ruby - CalculatorImpl.add\n"
-    arg1 + arg2
+    arg1.to_f + arg2.to_f
   end
 
   def sub(arg1, arg2)
     print "Ruby - CalculatorImpl.sub\n"
-    arg1 - arg2
+    arg1.to_f - arg2.to_f
   end
 
   def mul(arg1, arg2)
     print "Ruby - CalculatorImpl.mul\n"
-    arg1 * arg2
+    arg1.to_f * arg2.to_f
   end
 
 end



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org