tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From robbin...@apache.org
Subject svn commit: r553922 - in /incubator/tuscany/cpp/sca: VSExpress/tuscany_sca/ VSExpress/tuscany_sca/tuscany_sca/ runtime/core/src/ runtime/core/src/tuscany/sca/model/ runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/ runtime/extensions/ws/refer...
Date Fri, 06 Jul 2007 15:19:24 GMT
Author: robbinspg
Date: Fri Jul  6 08:19:23 2007
New Revision: 553922

URL: http://svn.apache.org/viewvc?view=rev&rev=553922
Log:
TUSCANY-1402 Apply Brady Johnson's patch + update to VSExpress project to include new files



Modified:
    incubator/tuscany/cpp/sca/VSExpress/tuscany_sca/tuscany_sca.sln
    incubator/tuscany/cpp/sca/VSExpress/tuscany_sca/tuscany_sca/tuscany_sca.vcproj
    incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.cpp
    incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h
    incubator/tuscany/cpp/sca/runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/ModREST.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/RESTServiceProxy.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp
    incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/WSServiceProxy.cpp

Modified: incubator/tuscany/cpp/sca/VSExpress/tuscany_sca/tuscany_sca.sln
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/VSExpress/tuscany_sca/tuscany_sca.sln?view=diff&rev=553922&r1=553921&r2=553922
==============================================================================
--- incubator/tuscany/cpp/sca/VSExpress/tuscany_sca/tuscany_sca.sln (original)
+++ incubator/tuscany/cpp/sca/VSExpress/tuscany_sca/tuscany_sca.sln Fri Jul  6 08:19:23 2007
@@ -109,8 +109,10 @@
 		{AF06B4A8-F3F4-41BE-B12E-AE7D421BF0A2}.Release|Win32.ActiveCfg = Release|Win32
 		{AF06B4A8-F3F4-41BE-B12E-AE7D421BF0A2}.Release|Win32.Build.0 = Release|Win32
 		{E35EC8A6-A7CA-49EC-8C23-AC186F9D27C2}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E35EC8A6-A7CA-49EC-8C23-AC186F9D27C2}.Debug|Win32.Build.0 = Debug|Win32
 		{E35EC8A6-A7CA-49EC-8C23-AC186F9D27C2}.Release|Win32.ActiveCfg = Release|Win32
 		{B5630E91-D747-4520-8089-0EAAB76BE600}.Debug|Win32.ActiveCfg = Debug|Win32
+		{B5630E91-D747-4520-8089-0EAAB76BE600}.Debug|Win32.Build.0 = Debug|Win32
 		{B5630E91-D747-4520-8089-0EAAB76BE600}.Release|Win32.ActiveCfg = Release|Win32
 		{4E16D015-6578-4D78-8DF0-82A98DB56CC3}.Debug|Win32.ActiveCfg = Debug|Win32
 		{4E16D015-6578-4D78-8DF0-82A98DB56CC3}.Debug|Win32.Build.0 = Debug|Win32
@@ -125,6 +127,7 @@
 		{13E1E4E1-0891-44C2-A9BF-1F6B5F2D81BF}.Release|Win32.ActiveCfg = Release|Win32
 		{13E1E4E1-0891-44C2-A9BF-1F6B5F2D81BF}.Release|Win32.Build.0 = Release|Win32
 		{C255EE00-A218-4A7F-8767-C3B2F24E60B1}.Debug|Win32.ActiveCfg = Debug|Win32
+		{C255EE00-A218-4A7F-8767-C3B2F24E60B1}.Debug|Win32.Build.0 = Debug|Win32
 		{C255EE00-A218-4A7F-8767-C3B2F24E60B1}.Release|Win32.ActiveCfg = Release|Win32
 		{6D7429AA-A268-4F21-B93B-A61776C9C96F}.Debug|Win32.ActiveCfg = Debug|Win32
 		{6D7429AA-A268-4F21-B93B-A61776C9C96F}.Debug|Win32.Build.0 = Debug|Win32

Modified: incubator/tuscany/cpp/sca/VSExpress/tuscany_sca/tuscany_sca/tuscany_sca.vcproj
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/VSExpress/tuscany_sca/tuscany_sca/tuscany_sca.vcproj?view=diff&rev=553922&r1=553921&r2=553922
==============================================================================
--- incubator/tuscany/cpp/sca/VSExpress/tuscany_sca/tuscany_sca/tuscany_sca.vcproj (original)
+++ incubator/tuscany/cpp/sca/VSExpress/tuscany_sca/tuscany_sca/tuscany_sca.vcproj Fri Jul
 6 08:19:23 2007
@@ -816,6 +816,14 @@
 					>
 				</File>
 				<File
+					RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\WSDLMessagePart.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\WSDLMessagePart.h"
+					>
+				</File>
+				<File
 					RelativePath="..\..\..\runtime\core\src\tuscany\sca\model\WSDLOperation.cpp"
 					>
 					<FileConfiguration

Modified: incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am?view=diff&rev=553922&r1=553921&r2=553922
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/Makefile.am Fri Jul  6 08:19:23 2007
@@ -56,6 +56,7 @@
 tuscany/sca/model/Wire.cpp \
 tuscany/sca/model/WSDLDefinition.cpp \
 tuscany/sca/model/WSDLInterface.cpp \
+tuscany/sca/model/WSDLMessagePart.cpp \
 tuscany/sca/model/WSDLOperation.cpp \
 tuscany/sca/util/DefaultLogWriter.cpp \
 tuscany/sca/util/File.cpp \

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp?view=diff&rev=553922&r1=553921&r2=553922
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLDefinition.cpp Fri Jul
 6 08:19:23 2007
@@ -413,8 +413,8 @@
                             string soapAction = "";
                             bool documentStyle = true;
                             bool wrappedStyle = true;
-                            // TODO there should be a useEncoded for input AND output
-                            bool useEncoded = false;
+                            bool useEncodedInput = false;
+                            bool useEncodedOutput = false;
                             WSDLOperation::soapVersion soapVer = WSDLOperation::SOAP11;
 
                             string opType = bindingOp->getType().getURI();
@@ -442,40 +442,53 @@
                             string use = bindingOp->getCString("input/body/use");
                             if (use == "encoded")
                             {
-                                useEncoded = true;
+                                useEncodedInput = true;
                             }
 
-                            // Get the request message type from the PortType
-                            string inputMessageType( portTypeOp->getCString("input/message")
);
+                            use = bindingOp->getCString("output/body/use");
+                            if (use == "encoded")
+                            {
+                                useEncodedOutput = true;
+                            }
 
-                            DataObjectPtr wsMessageIn = findMessage(inputMessageType);
+                            // Get the request message type from the PortType
+                            DataObjectPtr wsMessageIn =
+                              findMessage(portTypeOp->getCString("input/message"));
                             if (!wsMessageIn)
                             {
                                 stringstream errMessage;
                                 errMessage
-                                  << "unable to find input message "
-                                  << inputMessageType
+                                  << "unable to find PortType input message "
+                                  << portTypeOp->getCString("input/message")
                                   << " in the wsdl definition";
                                 throwException(SystemConfigurationException, errMessage.str().c_str());
                             }
-
-                            string requestType(wsMessageIn->getList("part")[0]->getCString("element"));
+                            string inputMessageType( wsMessageIn->getCString("name") );
+                            // If it doesnt have a namespace prefix, add the target namespace
+                            if (inputMessageType.find("#") == string::npos)
+                            {
+                                inputMessageType.insert(0, (getNamespace() + "#") );
+                            }
 
                             // Get the response message type from the PortType
-                            string outputMessageType( portTypeOp->getCString("output/message")
);
-
-                            DataObjectPtr wsMessageOut = findMessage(outputMessageType);
+                            DataObjectPtr wsMessageOut =
+                              findMessage(portTypeOp->getCString("output/message"));
                             if (!wsMessageOut)
                             {
+                                // TODO this is ok for one way operations, right?
                                 stringstream errMessage;
                                 errMessage
-                                  << "unable to find output message "
-                                  << outputMessageType
+                                  << "unable to find PortType output message "
+                                  << portTypeOp->getCString("output/message")
                                   << " in the wsdl definition";
                                 throwException(SystemConfigurationException, errMessage.str().c_str());
                             }
-
-                            string responseType(wsMessageOut->getList("part")[0]->getCString("element"));
+                            string outputMessageType( wsMessageOut->getCString("name")
);
+                            // If it doesnt have a namespace prefix, add the target namespace
+                            if (outputMessageType.find("#") == string::npos)
+                            {
+                                outputMessageType.insert(0, (getNamespace() + "#") );
+                            }
 
                             WSDLOperation wsdlOp;
                             wsdlOp.setOperationName(operationName);
@@ -484,9 +497,12 @@
                             wsdlOp.setSoapVersion(soapVer);
                             wsdlOp.setDocumentStyle(documentStyle);
                             wsdlOp.setWrappedStyle(wrappedStyle);
-                            wsdlOp.setEncoded(useEncoded);
-                            wsdlOp.setInputType(requestType);
-                            wsdlOp.setOutputType(responseType);
+                            wsdlOp.setInputEncoded(useEncodedInput);
+                            wsdlOp.setOutputEncoded(useEncodedOutput);
+                            wsdlOp.setInputMessageType(inputMessageType);
+                            wsdlOp.setOutputMessageType(outputMessageType);
+                            wsdlOp.setInputMessage(wsMessageIn);
+                            wsdlOp.setOutputMessage(wsMessageOut);
 
                             operationMap[ operationName ] = wsdlOp;
 

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.cpp?view=diff&rev=553922&r1=553921&r2=553922
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.cpp Fri Jul
 6 08:19:23 2007
@@ -19,11 +19,19 @@
 
 /* $Rev$ $Date$ */
 
+#include <map>
+#include <list>
+#include <string>
+#include <sstream>
+
 #include "tuscany/sca/model/WSDLOperation.h"
+#include "tuscany/sca/model/WSDLMessagePart.h"
 #include "tuscany/sca/util/Logging.h"
 #include "tuscany/sca/util/Utils.h"
+#include "tuscany/sca/core/Exceptions.h"
 
 using namespace std;
+using namespace commonj::sdo;
 using namespace tuscany::sca::util;
 
 namespace tuscany
@@ -46,16 +54,138 @@
             }
 
 
-            void WSDLOperation::setInputType(const string& inputType)
+            void WSDLOperation::setInputMessageType(const string& inputType)
             {
                 logentry(); 
-            	Utils::tokeniseQName(inputType, inputTypeUri, inputTypeName); 
+            	Utils::tokeniseQName(inputType, inputMessageUri, inputMessageName); 
             }
 
-            void WSDLOperation::setOutputType(const string& outputType)
+            void WSDLOperation::setOutputMessageType(const string& outputType)
             {
                 logentry(); 
-            	Utils::tokeniseQName(outputType, outputTypeUri, outputTypeName); 
+            	Utils::tokeniseQName(outputType, outputMessageUri, outputMessageName); 
+            }
+
+            void WSDLOperation::setInputMessage( commonj::sdo::DataObjectPtr inputMsg )
+            {
+                logentry();
+
+                DataObjectList &partList = inputMsg->getList("part");
+                for( unsigned int i=0; i < partList.size(); i++)
+                {
+                    string partUri;
+                    string partType;
+                    string partName = partList[0]->getCString("name");
+
+                    Utils::tokeniseQName(partList[0]->getCString("element"), partUri,
partType);
+                    WSDLMessagePart part(partName, partType, partUri);
+
+                    inputPartMap[partName] = part;
+                }
+            }
+
+            void WSDLOperation::setOutputMessage( commonj::sdo::DataObjectPtr outputMsg )
+            {
+                logentry();
+
+                DataObjectList &partList = outputMsg->getList("part");
+                for( unsigned int i=0; i < partList.size(); i++)
+                {
+                    string partUri;
+                    string partType;
+                    string partName = partList[0]->getCString("name");
+
+                    Utils::tokeniseQName(partList[0]->getCString("element"), partUri,
partType);
+                    WSDLMessagePart part(partName, partType, partUri);
+
+                    outputPartMap[partName] = part;
+                }
+            }
+
+            const std::list<std::string> WSDLOperation::getInputMessagePartNames()
const
+            {
+                logentry();
+
+                std::list<std::string> inputPartNames;
+
+                PART_MAP::const_iterator iter = inputPartMap.begin();
+                PART_MAP::const_iterator iterEnd = inputPartMap.end();
+
+                for( ; iter != iterEnd; ++iter )
+                {
+                    inputPartNames.push_back( iter->first );
+                }
+
+                return inputPartNames;
+            }
+
+            const std::list<std::string> WSDLOperation::getOutputMessagePartNames()
const
+            {
+                logentry();
+
+                std::list<std::string> outputPartNames;
+
+                PART_MAP::const_iterator iter = outputPartMap.begin();
+                PART_MAP::const_iterator iterEnd = outputPartMap.end();
+
+                for( ; iter != iterEnd; ++iter )
+                {
+                    outputPartNames.push_back( iter->first );
+                }
+
+                return outputPartNames;
+            }
+
+            const WSDLMessagePart&
+            WSDLOperation::getInputMessagePart( const std::string &name ) const
+            {
+                logentry();
+
+                PART_MAP::const_iterator iter = inputPartMap.find( name );
+                if( iter == inputPartMap.end() )
+                {
+                    stringstream errMessage;
+                    errMessage
+                      << "Unable to find input WSDLMessagePart for partName: " <<
name;
+
+                    throwException(SystemConfigurationException, errMessage.str().c_str());
+                }
+
+                return iter->second;
+            }
+
+            const WSDLMessagePart&
+            WSDLOperation::getOutputMessagePart( const std::string &name ) const
+            {
+                logentry();
+
+                PART_MAP::const_iterator iter = outputPartMap.find( name );
+                if( iter == outputPartMap.end() )
+                {
+                    stringstream errMessage;
+                    errMessage
+                      << "Unable to find output WSDLMessagePart for partName: " <<
name;
+
+                    throwException(SystemConfigurationException, errMessage.str().c_str());
+                }
+
+                return iter->second;
+            }
+
+            void WSDLOperation::setInputMessagePart( const std::string &partName,
+                                                     WSDLMessagePart part )
+            {
+                logentry();
+
+                inputPartMap[partName] = part;
+            }
+
+            void WSDLOperation::setOutputMessagePart( const std::string &partName,
+                                                      WSDLMessagePart part )
+            {
+                logentry();
+
+                outputPartMap[partName] = part;
             }
 
        } // End namespace model

Modified: incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h?view=diff&rev=553922&r1=553921&r2=553922
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/tuscany/sca/model/WSDLOperation.h Fri Jul 
6 08:19:23 2007
@@ -22,11 +22,14 @@
 #ifndef tuscany_sca_model_wsdloperation_h
 #define tuscany_sca_model_wsdloperation_h
 
+#include <map>
+#include <list>
 #include <string>
 
 #include "commonj/sdo/SDO.h"
 
 #include "tuscany/sca/export.h"
+#include "tuscany/sca/model/WSDLMessagePart.h"
 
 
 namespace tuscany
@@ -46,11 +49,6 @@
             public:
                 /**
                  * Constructor.
-                 * @param operation The name of the operation.
-                 * @param soapAction The soapAction associated with this operation
-                 * in the SOAP binding of the operation.
-                 * @param endpoint The endpoint address of the operation.
-                 * @param responseName The name of the response message.
                  */
                  SCA_API WSDLOperation();
                  
@@ -96,17 +94,66 @@
                 SCA_API void setWrappedStyle(bool wrapStyle) {wrappedStyle = wrapStyle;}
                 SCA_API bool isWrappedStyle() const {return wrappedStyle;}
 
-                SCA_API void setEncoded(bool enc) {encoded = enc;}
-                SCA_API bool isEncoded() const {return encoded;}
+                SCA_API void setInputEncoded(bool enc) {inputEncoded = enc;}
+                SCA_API bool isInputEncoded() const {return inputEncoded;}
 
+                SCA_API void setOutputEncoded(bool enc) {outputEncoded = enc;}
+                SCA_API bool isOutputEncoded() const {return outputEncoded;}
                 
-                SCA_API void setInputType(const std::string& inputType);
-                SCA_API const std::string& getInputTypeUri() const {return inputTypeUri;}
-                SCA_API const std::string& getInputTypeName() const {return inputTypeName;}
-                SCA_API void setOutputType(const std::string& outputType);
-                SCA_API const std::string& getOutputTypeUri() const {return outputTypeUri;}
-                SCA_API const std::string& getOutputTypeName() const {return outputTypeName;}
-                
+                /**
+                 * Input Message URI and Name. To get the message part URI and name, you
+                 * will have to get the WSDLMessagePart by calling getInputMessagePart()
+                 */
+                SCA_API void setInputMessageType(const std::string& inputMessageType);
+                SCA_API const std::string& getInputMessageUri() const {return inputMessageUri;}
+                SCA_API const std::string& getInputMessageName() const {return inputMessageName;}
+
+                /**
+                 * Output Message URI and Name. To get the message part URI and name, you
+                 * will have to get the WSDLMessagePart by calling getOutputMessagePart()
+                 */
+                SCA_API void setOutputMessageType(const std::string& outputMessageType);
+                SCA_API const std::string& getOutputMessageUri() const {return outputMessageUri;}
+                SCA_API const std::string& getOutputMessageName() const {return outputMessageName;}
+
+                // TODO We should add an enum for REQUEST_ONLY, RESPONSE_ONLY, REQUEST_RESPONSE
+                //      and a setter/getter. The enum would be checked by getOutputXXX
+
+                /**
+                 *  Parse a WSDL message represented by an SDO into the input/outputPartMap
+                 *  @param inputMsg a data object which contains the WSDL message
+                 *         ie. <wsdl:message name="getAccountReportResponse">
+                 *                 <wsdl:part element="tns:getAccountReportResponse"
+                 *                            name="getAccountReportResponse" />
+                 *             </wsdl:message>
+                 */
+                SCA_API void setInputMessage( commonj::sdo::DataObjectPtr inputMsg );
+                SCA_API void setOutputMessage( commonj::sdo::DataObjectPtr outputMsg );
+
+                /**
+                 * Manually set the input/outputPartMap, as opposed to passing in an SDO
WSDL message.
+                 * Populates the input/outputPartMap, setInput/OutputMessageType must still
be called.
+                 * @param partName the name of the message part
+                 * @param part the message part
+                 */
+                SCA_API void setInputMessagePart( const std::string &partName, WSDLMessagePart
part );
+                SCA_API void setOutputMessagePart( const std::string &partName, WSDLMessagePart
part );
+
+                /**
+                 * Return a message part keyed off of the message part name
+                 * @param name the message part name
+                 * @return the message part in a WSDLMessagePart object
+                 */
+                SCA_API const WSDLMessagePart &getInputMessagePart( const std::string
&name ) const;
+                SCA_API const WSDLMessagePart &getOutputMessagePart( const std::string
&name ) const;
+
+                /**
+                 * Get all of the message part names
+                 * @return a list of strings, each being a different message part name
+                 */
+                SCA_API const std::list<std::string> getInputMessagePartNames() const;
+                SCA_API const std::list<std::string> getOutputMessagePartNames() const;
+
             private:
                 /**
                  * The name of the operation for use when serializing an
@@ -124,19 +171,21 @@
                  */
                 std::string endpoint;
 
-				bool documentStyle;
+                bool documentStyle;
                 bool wrappedStyle;
-				bool encoded;
-				soapVersion soapVer;
-				
-				std::string inputTypeUri;
-				std::string inputTypeName;
-				
-				std::string outputTypeUri;
-				std::string outputTypeName;
-				
-                commonj::sdo::DataObjectPtr inputMessage;
-                commonj::sdo::DataObjectPtr outputMessage;
+                bool inputEncoded;
+                bool outputEncoded;
+                soapVersion soapVer;
+
+                std::string inputMessageUri;
+                std::string inputMessageName;
+
+                std::string outputMessageUri;
+                std::string outputMessageName;
+
+                typedef std::map<std::string, WSDLMessagePart> PART_MAP;
+                PART_MAP inputPartMap;
+                PART_MAP outputPartMap;
             };
 
          } // End namespace model

Modified: incubator/tuscany/cpp/sca/runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/ModREST.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/ModREST.cpp?view=diff&rev=553922&r1=553921&r2=553922
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/ModREST.cpp
(original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/ModREST.cpp
Fri Jul  6 08:19:23 2007
@@ -58,6 +58,7 @@
 #include "tuscany/sca/model/ReferenceType.h"
 #include "tuscany/sca/model/WSDLDefinition.h"
 #include "tuscany/sca/model/WSDLOperation.h"
+#include "tuscany/sca/model/WSDLMessagePart.h"
 #include "tuscany/sca/model/WSDLInterface.h" 
 #include "tuscany/sca/model/Interface.h" 
 #include "tuscany/sca/core/SCARuntime.h"
@@ -437,6 +438,8 @@
                         // Create a default document literal wrapped WSDL operation
                         if (wsdlNamespace == "")
                         {
+                            WSDLMessagePart inPart(op_name, "", "http://tempuri.org");
+                            WSDLMessagePart outPart((op_name+"Response"), "", "http://tempuri.org");
                             wsdlNamespace = compositeService->getName();
                             wsdlOperation = WSDLOperation();
                             wsdlOperation.setOperationName(op_name.c_str());
@@ -445,9 +448,10 @@
                             wsdlOperation.setSoapVersion(WSDLOperation::SOAP11);
                             wsdlOperation.setDocumentStyle(true);
                             wsdlOperation.setWrappedStyle(true);
-                            wsdlOperation.setEncoded(false);
-                            wsdlOperation.setInputType(string("http://tempuri.org") + "#"
+ op_name);
-                            wsdlOperation.setOutputType(string("http://tempuri.org") + "#"
+ op_name + "Response");
+                            wsdlOperation.setInputEncoded(false);
+                            wsdlOperation.setOutputEncoded(false);
+                            wsdlOperation.setInputMessagePart(op_name, inPart);
+                            wsdlOperation.setOutputMessagePart((op_name+"Response"), outPart);
                         }
                         
                         // Create the input DataObject
@@ -646,6 +650,8 @@
                         // Create a default document literal wrapped WSDL operation
                         if (wsdlNamespace == "")
                         {
+                            WSDLMessagePart inPart(op_name, "", "http://tempuri.org");
+                            WSDLMessagePart outPart((op_name+"Response"), "", "http://tempuri.org");
                             wsdlNamespace = compositeService->getName();
                             wsdlOperation = WSDLOperation();
                             wsdlOperation.setOperationName(op_name.c_str());
@@ -654,9 +660,10 @@
                             wsdlOperation.setSoapVersion(WSDLOperation::SOAP11);
                             wsdlOperation.setDocumentStyle(true);
                             wsdlOperation.setWrappedStyle(true);
-                            wsdlOperation.setEncoded(false);
-                            wsdlOperation.setInputType(string("http://tempuri.org") + "#"
+ op_name);
-                            wsdlOperation.setOutputType(string("http://tempuri.org") + "#"
+ op_name + "Response");
+                            wsdlOperation.setInputEncoded(false);
+                            wsdlOperation.setOutputEncoded(false);
+                            wsdlOperation.setInputMessagePart(op_name, inPart);
+                            wsdlOperation.setOutputMessagePart((op_name+"Response"), outPart);
                         }
                         
                         // Create the input DataObject
@@ -896,6 +903,8 @@
                         string uriArgs = uri;
                     
                         // Create a default document literal wrapped WSDL operation
+                        WSDLMessagePart inputPart(op_name, "", "http://tempuri.org");
+                        WSDLMessagePart outputPart((op_name+"Response"), "", "http://tempuri.org");
                         wsdlNamespace = compositeService->getName();
                         wsdlOperation = WSDLOperation();
                         wsdlOperation.setOperationName(op_name.c_str());
@@ -904,9 +913,10 @@
                         wsdlOperation.setSoapVersion(WSDLOperation::SOAP11);
                         wsdlOperation.setDocumentStyle(true);
                         wsdlOperation.setWrappedStyle(true);
-                        wsdlOperation.setEncoded(false);
-                        wsdlOperation.setInputType(string("http://tempuri.org") + "#" + op_name);
-                        wsdlOperation.setOutputType(string("http://tempuri.org") + "#" +
op_name + "Response");
+                        wsdlOperation.setInputEncoded(false);
+                        wsdlOperation.setOutputEncoded(false);
+                        wsdlOperation.setInputMessagePart(op_name, inputPart);
+                        wsdlOperation.setOutputMessagePart((op_name+"Response"), outputPart);
                         
                         // Create the input DataObject
                         Operation operation(op_name.c_str());
@@ -992,6 +1002,8 @@
                         string uriArgs = uri;
                     
                         // Create a default document literal wrapped WSDL operation
+                        WSDLMessagePart inPart(op_name, "", "http://tempuri.org");
+                        WSDLMessagePart outPart((op_name+"Response"), "", "http://tempuri.org");
                         wsdlNamespace = compositeService->getName();
                         wsdlOperation = WSDLOperation();
                         wsdlOperation.setOperationName(op_name.c_str());
@@ -1000,9 +1012,10 @@
                         wsdlOperation.setSoapVersion(WSDLOperation::SOAP11);
                         wsdlOperation.setDocumentStyle(true);
                         wsdlOperation.setWrappedStyle(true);
-                        wsdlOperation.setEncoded(false);
-                        wsdlOperation.setInputType(string("http://tempuri.org") + "#" + op_name);
-                        wsdlOperation.setOutputType(string("http://tempuri.org") + "#" +
op_name + "Response");
+                        wsdlOperation.setInputEncoded(false);
+                        wsdlOperation.setOutputEncoded(false);
+                        wsdlOperation.setInputMessagePart(op_name, inPart);
+                        wsdlOperation.setOutputMessagePart((op_name+"Response"), outPart);
                         
                         // Create the input DataObject
                         Operation operation(op_name.c_str());
@@ -1082,12 +1095,20 @@
                 logentry();
             
                 DataObjectPtr inputDataObject;
+                string inputTypeUri;
+                string inputTypeName;
                 try
                 {
+                    // Since its Document wrapped, there will only be one part
+                    std::list<std::string> partList = wsdlOperation.getInputMessagePartNames();
+                    const WSDLMessagePart &inputMessage =
+                      wsdlOperation.getInputMessagePart(partList.front());
+                    inputTypeName = inputMessage.getPartType();
+                    inputTypeUri = inputMessage.getPartUri();
                     
                     // Create the input wrapper
-                    const Type& rootType = dataFactory->getType(wsdlOperation.getInputTypeUri().c_str(),
"RootType");
-                    const Property& prop = rootType.getProperty(wsdlOperation.getInputTypeName().c_str());
+                    const Type& rootType = dataFactory->getType(inputTypeUri.c_str(),
"RootType");
+                    const Property& prop = rootType.getProperty(inputTypeName.c_str());
                     const Type& inputType = prop.getType();
                     inputDataObject = dataFactory->create(inputType);
                 }
@@ -1096,8 +1117,8 @@
                     try
                     {
                         // Create the input wrapper
-                        const Type& inputType = dataFactory->getType(wsdlOperation.getInputTypeUri().c_str(),

-                            wsdlOperation.getInputTypeName().c_str());
+                        const Type& inputType =
+                          dataFactory->getType(inputTypeUri.c_str(), inputTypeName.c_str());
                         inputDataObject = dataFactory->create(inputType);
                     }
                     catch (SDORuntimeException&)

Modified: incubator/tuscany/cpp/sca/runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/RESTServiceProxy.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/RESTServiceProxy.cpp?view=diff&rev=553922&r1=553921&r2=553922
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/RESTServiceProxy.cpp
(original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/rest/service/httpd/src/tuscany/sca/rest/RESTServiceProxy.cpp
Fri Jul  6 08:19:23 2007
@@ -40,6 +40,7 @@
 #include "tuscany/sca/model/WSDLDefinition.h"
 #include "tuscany/sca/model/WSDLInterface.h"
 #include "tuscany/sca/model/WSDLOperation.h"
+#include "tuscany/sca/model/WSDLMessagePart.h"
 #include "model/RESTReferenceBinding.h"
 
 using namespace std;
@@ -108,13 +109,16 @@
                 RESTReferenceBinding* referenceBinding = (RESTReferenceBinding*)reference->getBinding();
                 DataFactoryPtr dataFactoryPtr = reference->getComponent()->getComposite()->getDataFactory();
                                     
-                const char* outputTypeURI = wsdlOperation.getOutputTypeUri().c_str();
-                const char* outputTypeName = wsdlOperation.getOutputTypeName().c_str();
+                // Since its Document wrapped, there will only be one message part
+                std::list<std::string> partList = wsdlOperation.getOutputMessagePartNames();
+                const WSDLMessagePart &part = wsdlOperation.getOutputMessagePart(partList.front());
+                const char* outputTypeURI = part.getPartUri().c_str();
+                const char* outputTypeName = part.getPartName().c_str();
 
-                loginfo("WSDLOperation inputType: %s#%s",
-                    wsdlOperation.getInputTypeUri().c_str(), 
-                    wsdlOperation.getInputTypeName().c_str());
-                loginfo("WSDLOperation outputType: %s#%s",
+                loginfo("WSDLOperation input message Type: %s#%s",
+                    wsdlOperation.getInputMessageUri().c_str(), 
+                    wsdlOperation.getInputMessageName().c_str());
+                loginfo("WSDLOperation output part Type: %s#%s",
                     outputTypeURI, 
                     outputTypeName);
                 

Modified: incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp?view=diff&rev=553922&r1=553921&r2=553922
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
(original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ws/reference/axis2c/src/tuscany/sca/ws/Axis2Client.cpp
Fri Jul  6 08:19:23 2007
@@ -50,6 +50,7 @@
 #include "tuscany/sca/model/WSDLDefinition.h"
 #include "tuscany/sca/model/WSDLInterface.h"
 #include "tuscany/sca/model/WSDLOperation.h"
+#include "tuscany/sca/model/WSDLMessagePart.h"
 
 using namespace std;
 using namespace commonj::sdo;
@@ -152,6 +153,8 @@
                 {
                     
                     // Create a default document literal wrapped WSDL operation
+                    WSDLMessagePart inputPart(operationName, "", "http://tempuri.org");
+                    WSDLMessagePart outputPart((operationName+"Response"), "", "http://tempuri.org");
                     wsdlNamespace = compositeReference->getName();
                     wsdlOperation = WSDLOperation();
                     wsdlOperation.setOperationName(operationName);
@@ -160,9 +163,10 @@
                     wsdlOperation.setSoapVersion(WSDLOperation::SOAP11);
                     wsdlOperation.setDocumentStyle(true);
                     wsdlOperation.setWrappedStyle(true);
-                    wsdlOperation.setEncoded(false);
-                    wsdlOperation.setInputType(string("http://tempuri.org") + "#" + operationName);
-                    wsdlOperation.setOutputType(string("http://tempuri.org") + "#" + operationName
+ "Response");
+                    wsdlOperation.setInputEncoded(false);
+                    wsdlOperation.setOutputEncoded(false);
+                    wsdlOperation.setInputMessagePart(operationName, inputPart);
+                    wsdlOperation.setOutputMessagePart((operationName+"Response"), outputPart);
                 }
                 else if (!wsdlOperation.isDocumentStyle() || !wsdlOperation.isWrappedStyle())
                 {
@@ -328,12 +332,21 @@
                 DataFactoryPtr dataFactory = compositeReference->getComposite()->getDataFactory();
                 
                 DataObjectPtr inputDataObject;
+                string inputTypeUri;
+                string inputTypeName;
+
                 try
                 {
-                    
+                    // Since its Document wrapped, there will only be one part
+                    std::list<std::string> partList = wsdlOperation.getInputMessagePartNames();
+                    const WSDLMessagePart &inputMessage =
+                      wsdlOperation.getInputMessagePart(partList.front());
+                    inputTypeName = inputMessage.getPartType();
+                    inputTypeUri = inputMessage.getPartUri();
+
                     // Create the input wrapper
-                    const Type& rootType = dataFactory->getType(wsdlOperation.getInputTypeUri().c_str(),
"RootType");
-                    const Property& prop = rootType.getProperty(wsdlOperation.getInputTypeName().c_str());
+                    const Type& rootType = dataFactory->getType(inputTypeUri.c_str(),
"RootType");
+                    const Property& prop = rootType.getProperty(inputTypeName.c_str());
                     const Type& inputType = prop.getType();
                     inputDataObject = dataFactory->create(inputType);
                 }
@@ -342,8 +355,8 @@
                     try
                     {
                         // Create the input wrapper
-                        const Type& inputType = dataFactory->getType(wsdlOperation.getInputTypeUri().c_str(),

-                            wsdlOperation.getInputTypeName().c_str());
+                        const Type& inputType =
+                          dataFactory->getType(inputTypeUri.c_str(), inputTypeName.c_str());
                         inputDataObject = dataFactory->create(inputType);
                     }
                     catch (SDORuntimeException&)
@@ -533,7 +546,7 @@
                 // Create the Axiom object from the request dataobject
                 AxiomHelper* axiomHelper = AxiomHelper::getHelper();
                 request_node = axiomHelper->toAxiomNode(inputDataObject,
-                    wsdlOperation.getInputTypeUri().c_str(), wsdlOperation.getInputTypeName().c_str());
+                    inputTypeUri.c_str(), inputTypeName.c_str());
                 AxiomHelper::releaseHelper(axiomHelper);
 
                 char* str =  AXIOM_NODE_TO_STRING(request_node, env);

Modified: incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp?view=diff&rev=553922&r1=553921&r2=553922
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp
(original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/ws/service/axis2c/src/tuscany/sca/ws/Axis2Service.cpp
Fri Jul  6 08:19:23 2007
@@ -45,6 +45,7 @@
 #include "tuscany/sca/model/ReferenceType.h"
 #include "tuscany/sca/model/WSDLDefinition.h"
 #include "tuscany/sca/model/WSDLOperation.h"
+#include "tuscany/sca/model/WSDLMessagePart.h"
 #include "tuscany/sca/model/WSDLInterface.h" 
 #include "tuscany/sca/model/Interface.h" 
 #include "tuscany/sca/core/SCARuntime.h"
@@ -386,6 +387,8 @@
                                     // Create a default document literal wrapped WSDL operation
                                     if (wsdlNamespace == "")
                                     {
+                                        WSDLMessagePart inPart(op_name, "", "http://tempuri.org");
+                                        WSDLMessagePart outPart((op_name+"Response"), "",
"http://tempuri.org");
                                         wsdlNamespace = compositeService->getName();
                                         wsdlOperation = WSDLOperation();
                                         wsdlOperation.setOperationName(op_name.c_str());
@@ -394,9 +397,10 @@
                                         wsdlOperation.setSoapVersion(WSDLOperation::SOAP11);
                                         wsdlOperation.setDocumentStyle(true);
                                         wsdlOperation.setWrappedStyle(true);
-                                        wsdlOperation.setEncoded(false);
-                                        wsdlOperation.setInputType(string("http://tempuri.org")
+ "#" + op_name);
-                                        wsdlOperation.setOutputType(string("http://tempuri.org")
+ "#" + op_name + "Response");
+                                        wsdlOperation.setInputEncoded(false);
+                                        wsdlOperation.setOutputEncoded(false);
+                                        wsdlOperation.setInputMessagePart(op_name, inPart);
+                                        wsdlOperation.setOutputMessagePart((op_name+"Response"),
outPart);
                                     }
                                     else if (!wsdlOperation.isDocumentStyle() || !wsdlOperation.isWrappedStyle())
                                     {
@@ -471,9 +475,15 @@
                                     
                                     try
                                     {
+                                        std::list<std::string> partList =
+                                          wsdlOperation.getOutputMessagePartNames();
+                                        const WSDLMessagePart &outPart =
+                                          wsdlOperation.getOutputMessagePart(partList.front());
                                         // Convert the output DataObject to an Axiom node
-                                        axiom_node_t* outputNode = axiomHelper->toAxiomNode(outputDataObject,
-                                            wsdlOperation.getOutputTypeUri().c_str(), wsdlOperation.getOutputTypeName().c_str());
+                                        axiom_node_t* outputNode =
+                                          axiomHelper->toAxiomNode(outputDataObject,
+                                                                   outPart.getPartUri().c_str(),
+                                                                   outPart.getPartName().c_str());
                     
                                         AxiomHelper::releaseHelper(axiomHelper);        
                                       
                                         

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=553922&r1=553921&r2=553922
==============================================================================
--- 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 Jul  6 08:19:23 2007
@@ -133,13 +133,16 @@
             
                 WSReferenceBinding* referenceBinding = (WSReferenceBinding*)reference->getBinding();
                 DataFactoryPtr dataFactoryPtr = reference->getComponent()->getComposite()->getDataFactory();
-                                    
-                const char* outputTypeURI = wsdlOperation.getOutputTypeUri().c_str();
-                const char* outputTypeName = wsdlOperation.getOutputTypeName().c_str();
 
-                loginfo("WSDLOperation inputType: %s#%s",
-                    wsdlOperation.getInputTypeUri().c_str(), 
-                    wsdlOperation.getInputTypeName().c_str());
+                // Since its Document wrapped, there will only be one message part
+                std::list<std::string> partList = wsdlOperation.getOutputMessagePartNames();
+                const WSDLMessagePart &part = wsdlOperation.getOutputMessagePart(partList.front());
+                const char* outputTypeURI = part.getPartUri().c_str();
+                const char* outputTypeName = part.getPartName().c_str();
+
+                loginfo("WSDLOperation input message Type: %s#%s",
+                    wsdlOperation.getInputMessageUri().c_str(), 
+                    wsdlOperation.getInputMessageName().c_str());
                 loginfo("WSDLOperation outputType: %s#%s",
                     outputTypeURI, 
                     outputTypeName);



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


Mime
View raw message