incubator-yoko-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matteo Vescovi (JIRA)" <j...@apache.org>
Subject [jira] Updated: (YOKO-203) IDL union type mapping
Date Tue, 13 Mar 2007 11:54:09 GMT

     [ https://issues.apache.org/jira/browse/YOKO-203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Matteo Vescovi updated YOKO-203:
--------------------------------

    Affects Version/s:     (was: v1.0-incubating-M2)
                       v1.0.0
        Fix Version/s: v1.0.0

> IDL union type mapping
> ----------------------
>
>                 Key: YOKO-203
>                 URL: https://issues.apache.org/jira/browse/YOKO-203
>             Project: Yoko - CORBA Server
>          Issue Type: Bug
>          Components: Idl2Wsdl
>    Affects Versions: v1.0.0
>            Reporter: Matteo Vescovi
>         Assigned To: Matteo Vescovi
>            Priority: Minor
>             Fix For: v1.0.0
>
>
> According to the CORBA Binding for WSDL specification document, the mapping for IDL unions
differs from the CORBA to WSDL/SOAP Interworking Specification (formal/03-11-02) in that IDL
union maps to a pure xs:choice rather than to a discriminated choice. Just as with the any
in the previous point, what matters to the application is the union value. The discriminator
is required only in unions in which discriminator values do not correspond to any union case
members, such that setting the discriminator to one of those values means that only the discriminator
is sent across the wire. Such cases are better handled by nillable XML Schema types.
> However, IDL unions are currently mapped according to the CORBA to WSDL/SOAP Interworking
Specification (formal/03-11-02).
> Following is an example of the mapping mandated by the CORBA to WSDL/SOAP Interworking
Specification (formal/03-11-02):
> module Example {
>   union myUnion switch (long) {
>     case 0: long l;
>     case 1: string str;
>     case 2:
>     case 3: float f;
>     default: octet o;
>   };
> };
> This union maps onto the following XML schema definition:
> <xsd:complexType name="Example.myUnion">
>  <xsd:sequence>
>   <xsd:element name="discriminator" type="xsd:int" />
>   <xsd:choice>
>     <!-- case 0 -->
>     <xsd:element name="l" type="xsd:int"
>     minOccurs="0" maxOccurs="1" />
>     <!-- case 1 -->
>     <xsd:element name="str" type="xsd:string"
>     nillable="true" minOccurs="0" maxOccurs="1" />
>     <!-- case 2, 3 -->
>     <xsd:element name="f" type="xsd:float"
>     minOccurs="0" maxOccurs="1" />
>     <!-- default case -->
>     <xsd:element name="o" type="xsd:byte"
>     minOccurs="0" maxOccurs="1" />
>   </xsd:choice>
>  </xsd:sequence>
> </xsd:complexType>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message