[jira] Updated: (TUSCANY-1383) Tuscany SCA native/C++ : Ability to query the runtime for its loaded operations
[ https://issues.apache.org/jira/browse/TUSCANY-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brady Johnson updated TUSCANY-1383: --- Attachment: WSDLDefinition_cpp_jira1383 Attaching WSDLDefinition.cpp > Tuscany SCA native/C++ : Ability to query the runtime for its loaded > operations > --- > > Key: TUSCANY-1383 > URL: https://issues.apache.org/jira/browse/TUSCANY-1383 > Project: Tuscany > Issue Type: Improvement > Components: C++ SCA >Affects Versions: Cpp-M3 > Environment: API enhancement - all platforms >Reporter: Brady Johnson >Priority: Minor > Fix For: Cpp-Next > > Attachments: Composite_cpp_jira1383, Composite_h_jira1383, > WSDLDefinition_cpp_jira1383, WSDLDefinition_h_jira1383 > > > Im investigating using TuscanySCA (C++ version) with a container other > than Axis. To do this, the container needs to be able to obtain the > WSDL operations, types, etc loaded by Tuscany. I would like to propose > extending some of the Tuscany APIs to allow them to be queried, since > currently you can only do a find with a known operation name. These > query operations could be done either by returning an iterator to the > internal map, or by just returning a list of map's value strings. The > second option would probably be safer and more thread-safe. > Here are the additions that I propose adding: > runtime/core/src/tuscany/sca/model/Composite.h >std::list getIncludedComposites(); >Composite* findIncludedComposite(const std::string& compositeName); >std::list Composite::getWSDLNamespaces(); >Change > std::vector includes; >To > std::map includes; > runtime/core/src/tuscany/sca/model/WSDLDefinition.h >std::list WSDLDefinition::getPortTypes(); >std::list WSDLDefinition::getOperations( const std::string > &portTypeName ); > The suggested usage of and rationale behind these additions is as follows: > Once the projects have been loaded by calling: >tuscany::sca::SCARuntime::initializeSharedRuntime( .. ) > The system composite can then be obtained by calling: >tuscany::sca::model::Composite* SCARuntime::getSystem(); > The system composite doesnt usually contain much other than included > composites, so first iterate > over the composites included in the system composite with these additions to > the Composite class: >std::list compositeList = > systemComposite->getIncludedComposites(); >tuscany::sca::model::Composite* includedComposite = > findIncludedComposite(const std::string& compositeName); > In order to make this easier, the tuscany::sca::model::Composite::includes > data member should be changed from a > vector to a map, which would map from the composite name to the composite. As > it is now, it would be necessary to > return the actual includes vector, which isnt generally a good idea since > users could inadvertantly corrupt it. > For each included composite, this addition to the Composite class would allow > you to get all of the > WSDL namespaces loaded for a Composite. >std::list wsdlNSList = includedComposite->getWSDLNamespaces(); > The WSDLDefinition can then be obtained by calling: >WSDLDefinition* wsdlDef = includedComposite->findWSDLDefinition( > wsdlNamespace ); > Then, for each WSDLDefinition, you can iterate over all of the WSDL PortTypes > and PortType operations > with these additions to the WSDLDefinition class: >std::list wsdlPortTypeList = wsdlDef->getPortTypes(); >std::list wsdlPortTypeOpList = wsdlDef->getOperations( > portTypeName ); > Now get the WSDLOperation: >WSDLOperation wsdlOp = wsdlDef->findOperation( portTypeName, operName ); > Im not currently a TuscanySCA contributor, so can someone please submit the > attached patch? > Thanks > > Brady Johnson > Rogue Wave Software - [EMAIL PROTECTED] > Lead Software Developer - HydraSCA -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (TUSCANY-1383) Tuscany SCA native/C++ : Ability to query the runtime for its loaded operations
[ https://issues.apache.org/jira/browse/TUSCANY-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brady Johnson updated TUSCANY-1383: --- Attachment: Composite_cpp_jira1383 Ataching Composite.cpp > Tuscany SCA native/C++ : Ability to query the runtime for its loaded > operations > --- > > Key: TUSCANY-1383 > URL: https://issues.apache.org/jira/browse/TUSCANY-1383 > Project: Tuscany > Issue Type: Improvement > Components: C++ SCA >Affects Versions: Cpp-M3 > Environment: API enhancement - all platforms >Reporter: Brady Johnson >Priority: Minor > Fix For: Cpp-Next > > Attachments: Composite_cpp_jira1383, Composite_h_jira1383, > WSDLDefinition_cpp_jira1383, WSDLDefinition_h_jira1383 > > > Im investigating using TuscanySCA (C++ version) with a container other > than Axis. To do this, the container needs to be able to obtain the > WSDL operations, types, etc loaded by Tuscany. I would like to propose > extending some of the Tuscany APIs to allow them to be queried, since > currently you can only do a find with a known operation name. These > query operations could be done either by returning an iterator to the > internal map, or by just returning a list of map's value strings. The > second option would probably be safer and more thread-safe. > Here are the additions that I propose adding: > runtime/core/src/tuscany/sca/model/Composite.h >std::list getIncludedComposites(); >Composite* findIncludedComposite(const std::string& compositeName); >std::list Composite::getWSDLNamespaces(); >Change > std::vector includes; >To > std::map includes; > runtime/core/src/tuscany/sca/model/WSDLDefinition.h >std::list WSDLDefinition::getPortTypes(); >std::list WSDLDefinition::getOperations( const std::string > &portTypeName ); > The suggested usage of and rationale behind these additions is as follows: > Once the projects have been loaded by calling: >tuscany::sca::SCARuntime::initializeSharedRuntime( .. ) > The system composite can then be obtained by calling: >tuscany::sca::model::Composite* SCARuntime::getSystem(); > The system composite doesnt usually contain much other than included > composites, so first iterate > over the composites included in the system composite with these additions to > the Composite class: >std::list compositeList = > systemComposite->getIncludedComposites(); >tuscany::sca::model::Composite* includedComposite = > findIncludedComposite(const std::string& compositeName); > In order to make this easier, the tuscany::sca::model::Composite::includes > data member should be changed from a > vector to a map, which would map from the composite name to the composite. As > it is now, it would be necessary to > return the actual includes vector, which isnt generally a good idea since > users could inadvertantly corrupt it. > For each included composite, this addition to the Composite class would allow > you to get all of the > WSDL namespaces loaded for a Composite. >std::list wsdlNSList = includedComposite->getWSDLNamespaces(); > The WSDLDefinition can then be obtained by calling: >WSDLDefinition* wsdlDef = includedComposite->findWSDLDefinition( > wsdlNamespace ); > Then, for each WSDLDefinition, you can iterate over all of the WSDL PortTypes > and PortType operations > with these additions to the WSDLDefinition class: >std::list wsdlPortTypeList = wsdlDef->getPortTypes(); >std::list wsdlPortTypeOpList = wsdlDef->getOperations( > portTypeName ); > Now get the WSDLOperation: >WSDLOperation wsdlOp = wsdlDef->findOperation( portTypeName, operName ); > Im not currently a TuscanySCA contributor, so can someone please submit the > attached patch? > Thanks > > Brady Johnson > Rogue Wave Software - [EMAIL PROTECTED] > Lead Software Developer - HydraSCA -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (TUSCANY-1383) Tuscany SCA native/C++ : Ability to query the runtime for its loaded operations
[ https://issues.apache.org/jira/browse/TUSCANY-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brady Johnson updated TUSCANY-1383: --- Attachment: WSDLDefinition_h_jira1383 Attaching WSDLDefinition.h > Tuscany SCA native/C++ : Ability to query the runtime for its loaded > operations > --- > > Key: TUSCANY-1383 > URL: https://issues.apache.org/jira/browse/TUSCANY-1383 > Project: Tuscany > Issue Type: Improvement > Components: C++ SCA >Affects Versions: Cpp-M3 > Environment: API enhancement - all platforms >Reporter: Brady Johnson >Priority: Minor > Fix For: Cpp-Next > > Attachments: Composite_h_jira1383, WSDLDefinition_h_jira1383 > > > Im investigating using TuscanySCA (C++ version) with a container other > than Axis. To do this, the container needs to be able to obtain the > WSDL operations, types, etc loaded by Tuscany. I would like to propose > extending some of the Tuscany APIs to allow them to be queried, since > currently you can only do a find with a known operation name. These > query operations could be done either by returning an iterator to the > internal map, or by just returning a list of map's value strings. The > second option would probably be safer and more thread-safe. > Here are the additions that I propose adding: > runtime/core/src/tuscany/sca/model/Composite.h >std::list getIncludedComposites(); >Composite* findIncludedComposite(const std::string& compositeName); >std::list Composite::getWSDLNamespaces(); >Change > std::vector includes; >To > std::map includes; > runtime/core/src/tuscany/sca/model/WSDLDefinition.h >std::list WSDLDefinition::getPortTypes(); >std::list WSDLDefinition::getOperations( const std::string > &portTypeName ); > The suggested usage of and rationale behind these additions is as follows: > Once the projects have been loaded by calling: >tuscany::sca::SCARuntime::initializeSharedRuntime( .. ) > The system composite can then be obtained by calling: >tuscany::sca::model::Composite* SCARuntime::getSystem(); > The system composite doesnt usually contain much other than included > composites, so first iterate > over the composites included in the system composite with these additions to > the Composite class: >std::list compositeList = > systemComposite->getIncludedComposites(); >tuscany::sca::model::Composite* includedComposite = > findIncludedComposite(const std::string& compositeName); > In order to make this easier, the tuscany::sca::model::Composite::includes > data member should be changed from a > vector to a map, which would map from the composite name to the composite. As > it is now, it would be necessary to > return the actual includes vector, which isnt generally a good idea since > users could inadvertantly corrupt it. > For each included composite, this addition to the Composite class would allow > you to get all of the > WSDL namespaces loaded for a Composite. >std::list wsdlNSList = includedComposite->getWSDLNamespaces(); > The WSDLDefinition can then be obtained by calling: >WSDLDefinition* wsdlDef = includedComposite->findWSDLDefinition( > wsdlNamespace ); > Then, for each WSDLDefinition, you can iterate over all of the WSDL PortTypes > and PortType operations > with these additions to the WSDLDefinition class: >std::list wsdlPortTypeList = wsdlDef->getPortTypes(); >std::list wsdlPortTypeOpList = wsdlDef->getOperations( > portTypeName ); > Now get the WSDLOperation: >WSDLOperation wsdlOp = wsdlDef->findOperation( portTypeName, operName ); > Im not currently a TuscanySCA contributor, so can someone please submit the > attached patch? > Thanks > > Brady Johnson > Rogue Wave Software - [EMAIL PROTECTED] > Lead Software Developer - HydraSCA -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[jira] Updated: (TUSCANY-1383) Tuscany SCA native/C++ : Ability to query the runtime for its loaded operations
[ https://issues.apache.org/jira/browse/TUSCANY-1383?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brady Johnson updated TUSCANY-1383: --- Attachment: Composite_h_jira1383 Attaching Composite.h > Tuscany SCA native/C++ : Ability to query the runtime for its loaded > operations > --- > > Key: TUSCANY-1383 > URL: https://issues.apache.org/jira/browse/TUSCANY-1383 > Project: Tuscany > Issue Type: Improvement > Components: C++ SCA >Affects Versions: Cpp-M3 > Environment: API enhancement - all platforms >Reporter: Brady Johnson >Priority: Minor > Fix For: Cpp-Next > > Attachments: Composite_h_jira1383, WSDLDefinition_h_jira1383 > > > Im investigating using TuscanySCA (C++ version) with a container other > than Axis. To do this, the container needs to be able to obtain the > WSDL operations, types, etc loaded by Tuscany. I would like to propose > extending some of the Tuscany APIs to allow them to be queried, since > currently you can only do a find with a known operation name. These > query operations could be done either by returning an iterator to the > internal map, or by just returning a list of map's value strings. The > second option would probably be safer and more thread-safe. > Here are the additions that I propose adding: > runtime/core/src/tuscany/sca/model/Composite.h >std::list getIncludedComposites(); >Composite* findIncludedComposite(const std::string& compositeName); >std::list Composite::getWSDLNamespaces(); >Change > std::vector includes; >To > std::map includes; > runtime/core/src/tuscany/sca/model/WSDLDefinition.h >std::list WSDLDefinition::getPortTypes(); >std::list WSDLDefinition::getOperations( const std::string > &portTypeName ); > The suggested usage of and rationale behind these additions is as follows: > Once the projects have been loaded by calling: >tuscany::sca::SCARuntime::initializeSharedRuntime( .. ) > The system composite can then be obtained by calling: >tuscany::sca::model::Composite* SCARuntime::getSystem(); > The system composite doesnt usually contain much other than included > composites, so first iterate > over the composites included in the system composite with these additions to > the Composite class: >std::list compositeList = > systemComposite->getIncludedComposites(); >tuscany::sca::model::Composite* includedComposite = > findIncludedComposite(const std::string& compositeName); > In order to make this easier, the tuscany::sca::model::Composite::includes > data member should be changed from a > vector to a map, which would map from the composite name to the composite. As > it is now, it would be necessary to > return the actual includes vector, which isnt generally a good idea since > users could inadvertantly corrupt it. > For each included composite, this addition to the Composite class would allow > you to get all of the > WSDL namespaces loaded for a Composite. >std::list wsdlNSList = includedComposite->getWSDLNamespaces(); > The WSDLDefinition can then be obtained by calling: >WSDLDefinition* wsdlDef = includedComposite->findWSDLDefinition( > wsdlNamespace ); > Then, for each WSDLDefinition, you can iterate over all of the WSDL PortTypes > and PortType operations > with these additions to the WSDLDefinition class: >std::list wsdlPortTypeList = wsdlDef->getPortTypes(); >std::list wsdlPortTypeOpList = wsdlDef->getOperations( > portTypeName ); > Now get the WSDLOperation: >WSDLOperation wsdlOp = wsdlDef->findOperation( portTypeName, operName ); > Im not currently a TuscanySCA contributor, so can someone please submit the > attached patch? > Thanks > > Brady Johnson > Rogue Wave Software - [EMAIL PROTECTED] > Lead Software Developer - HydraSCA -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]