B.4 Mapping UML Data Types to XML Schema
29.198-013GPPOpen Service Access (OSA) Application Programming Interface (API)Part 1: OverviewRelease 9TS
B.4.1 Data Types
The following mappings apply to the basic data types:
UML | Schema Realisation |
TpBoolean | xsd:boolean |
TpInt32 | xsd:int |
TpInt64 | xsd:ong |
TpFloat | xsd:float |
TpOctet | xsd:unsignedByte |
TpString | xsd:string |
TpLongString | xsd:string |
TpAny | xsd:anyType |
B.4.1.2 <<Constant>>
The UML Constant data type contains the following attributes:
- Name
- Constant Value
These types are not mapped to WSDL, as there is no concept of a constant value in schema. It may be possible in the future to add a constant value using a restriction on a base type. The lack of this mapping does not limit the ability to send constant values in messages.
B.4.1.3 <<NameValuePair>>
The UML NameValuePair data type contains the following attributes:
- Name
- Attributes
- Name
This type would then map to the following XML Schema construct:
<xsd:simpleType name=”Name”>
<xsd:restriction base=”xsd:string”>
<xsd:enumeration value=”Attribute-Name” />
<xsd:enumeration value=”Attribute-Name” />
…
<xsd:enumeration value=”Attribute-Name” />
</xsd:restriction>
</xsd:simpleType>
B.4.1.4 <<SequenceOfDataElements>>
The UML SequenceOfDataElements data type contains the following attributes:
- Name
- Roles
- Name
- Type
This type would then map to the following XML Schema construct:
<xsd:complexType name=”Name”
<xsd:sequence>
<xsd:element
Name=”Role-Name”
type=”Role–Type” />
<xsd:element
Name=”Role-Name”
type=”Role–Type” />
…
<xsd:element
Name=”Role-Name”
type=”Role–Type” />
</xsd:sequence>
</xsd:complexType>
B.4.1.5 <<TypeDef>>
The UML TypeDef data type contains the following attributes:
- Name
- ImplementationType
Type definitions (typedefs) do not exist directly in schema so these types are unwound to their base data types. E.g.:
UML | Schema Realisation |
TpCallAlertingMechanism | xsd:int |
TpAccessType | xsd:string |
This support could be added in the future using restriction on a base type.
B.4.1.6 <<NumberedSetOfDataElements>>
The UML NumberedSetOfDataElements data type for sequences types contains the following attributes:
- Name
- ImplementationType
This type would then map to the following XML Schema construct:
<xsd:complexType name=”Name”>
<xsd:sequence>
<xsd:element
name=”item”
type=”ImplementationType”
minOccurs=”0”
maxOccurs=”unbounded” />
</xsd:sequence>
</xsd:complexType>
B.4.1.7 <<TaggedChoiceOfDataElements>>
The UML TaggedChoiceOfDataElements data type contains the following attributes:
- Name
- SwitchType
- Roles
- Name
- Type
This type would then map to the following XML Schema construct:
<xsd:complexType name=”Name”>
<xsd:sequence>
<xsd:choice>
<xsd:element name=”Role-Name” type=”Role-Type” />
<xsd:element name=”Role-Name” type=”Role-Type” />
…
<xsd:element name=”Role-Name” type=”Role-Type” />
</xsd:choice>
</xsd:sequence>
</complexType>