sca-c-cpp message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: NEW ISSUE: C++ mapping of multi-valued parameters
- From: Bryan Aupperle <aupperle@us.ibm.com>
- To: sca-c-cpp@lists.oasis-open.org
- Date: Thu, 11 Mar 2010 13:39:00 -0500
Target C++ C&I Spec (CD 05)
Description: Section 9.3 defines the data mapping between C++ and WSDL/XML.
The mapping is defined for simple types and complex types
but there is no definition for multi-value
elements (C++ arrays, list, vectors etc. and XML elements with maxOccurs
> 1). If the XML element is contained in a complex type, but not
directly mapped to a function parameter/return type, the normal SDO mapping
rules apply, the resulting property has isMany=true. However, if
the element is defining a function parameter/return type, there is no containing
DataObject. and the mapping is not defined.
For example:
<wsdl:definitions
name="Service4Service"
targetNamespace="http://test.sca.oasisopen.org/"
xmlns:tns="http://test.sca.oasisopen.org/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xs:schema
attributeFormDefault="qualified"
elementFormDefault="unqualified"
targetNamespace="http://test.sca.oasisopen.org/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import
/>
<xs:element
name="operation1Response">
<xs:complexType>
<xs:sequence>
<xs:element
minOccurs="0"
name="return"
nillable="true"
type="xs:string"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element
name="operation1">
<xs:complexType>
<xs:sequence>
<xs:element
name="arg0"
type="xs:string"
minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message
name="operation1Response">
<wsdl:part
name="operation1Response"
element="tns:operation1Response">
</wsdl:part>
</wsdl:message>
<wsdl:message
name="operation1">
<wsdl:part
name="operation1"
element="tns:operation1">
</wsdl:part>
</wsdl:message>
<wsdl:portType
name="Service4">
<wsdl:operation
name="operation1">
<wsdl:input
message="tns:operation1">
</wsdl:input>
<wsdl:output
message="tns:operation1Response">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
</wsdl:definitions>
The element arg0 in the global element
operation1 defines a single input parameter to operation1, but this element
has maxOccurs=unbounded. so the type of the parameter needs to allow multiple
values. Mapping this to a DataObject would result in unnecessary
overhead, more complicated client and implementation code and a lack of
clarity as to the name of the property in the DataObject actually containing
the data.
Proposal:
Direction
When mapping from C++ to WSDL/XML map
parameters/return types with a type that is an array, or a list, vector
(probably double ended queue and its variations - queue, stack and priority
queue - as well) to an XML element with maxOccurs=unbounded.
When mapping from WSDL/XML to C++ map
elements with maxOccurs > 1 that define parameters/return types to a
list<type> where type is either the simple type of the element or
DataObjectPtr>
Bryan Aupperle, Ph.D.
STSM, WebSphere Enterprise Platform Software Solution Architect
Research Triangle Park, NC
+1 919-254-7508 (T/L 444-7508)
Internet Address: aupperle@us.ibm.com
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]