sca-c-cpp message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]
Subject: Re: [sca-c-cpp] NEW ISSUE: C++ mapping of multi-valued parameters
- From: Andrew Borley <BORLEY@uk.ibm.com>
- To: sca-c-cpp@lists.oasis-open.org
- Date: Thu, 11 Mar 2010 20:53:49 +0000
This issue has been assigned ID CCPP-106
by the jira system.
See http://www.osoa.org/jira/browse/CCPP-106
Andrew
____________________________________________________________
Andrew Borley
Websphere ESB Development
Tel: 245393 Ext: +44 (0) 1962 815393 Mob: +44 (0) 7971 805547
E-mail: borley@uk.ibm.com
Mailpoint 211, IBM (UK) Ltd, Hursley Park, Winchester, Hants, SO21 2JN
____________________________________________________________
From:
| Bryan Aupperle <aupperle@us.ibm.com>
|
To:
| sca-c-cpp@lists.oasis-open.org
|
Date:
| 11/03/2010 18:40
|
Subject:
| [sca-c-cpp] NEW ISSUE: C++ mapping of
multi-valued parameters |
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
Unless stated otherwise above:
IBM United Kingdom Limited - Registered in England and Wales with number
741598.
Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [List Home]