incubator-yoko-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Incubator-yoko Wiki] Update of "IdlToWsdl" by MatteoVescovi
Date Wed, 13 Dec 2006 17:20:35 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Incubator-yoko Wiki" for change notification.

The following page has been changed by MatteoVescovi:
http://wiki.apache.org/incubator-yoko/IdlToWsdl

------------------------------------------------------------------------------
  ||Support for idl interfaces as references ||
  ||Tests for the type support for the WSDL Corba binding generation ||
  
+ 
+ == Recursive types support development plan ==
+ 
+ === idltowsdl tool ===
+ 
+ According to the CORBA 2.6 spec,
+ {{{
+ "The IDL syntax allows the generation of recursive structures and unions via members that
have a sequence type. The element type of a recursive sequence struct or union member must
identify a struct, union, or valuetype."
+ }}}
+ 
+ Since we do not support valuetypes, we only need to worry about recursive struct and union.
+ {{{
+ "Forward declarations are legal for structures and unions. A structure or union type is
termed incomplete until its full definition is provided."
+ }}}
+ {{{
+ "An incomplete type can only appear as the element type of a sequence definition. A sequence
with incomplete element type is termed an incomplete sequence type"
+ struct Foo; // Forward declaration
+ typedef sequence<Foo> FooSeq; // incomplete
+ }}}
+ {{{
+ "An incomplete sequence type can appear only as the element type of another sequence, or
as the member type of a structure or union definition."
+ }}}
+ 
+ For example:
+ {{{
+ struct Foo; // Forward declaration
+ typedef sequence<Foo> FooSeq; // OK
+ typedef sequence<FooSeq> FooTree; // OK
+ }}}
+ 
+ In other words, we only need to worry about structures or unions that contain incomplete
sequences.
+ 
+ Examples 1:
+ {{{
+ // recursive struct containing an anonymous sequence
+ struct Foo {
+     long value;
+     sequence<Foo> chain;
+ }
+ }}}
+ 
+ Example 2:
+ {{{
+ // forward declaration, named sequence, recursive struct
+ struct Foo;
+ typedef sequence<Foo> FooSeq;
+ struct Foo {
+     long value;
+     FooSeq chain;
+ };
+ }}}
+ 
+ Example 3:
+ {{{
+ union Bar; // Forward declaration
+ typedef sequence<Bar> BarSeq;
+ union Bar switch(long) { // Define incomplete union
+   case 0:
+     long l_mem;
+   case 1:
+     struct Foo {
+         double d_mem;
+         BarSeq nested; // OK, recurse on enclosing
+                        // incomplete type
+     } s_mem;
+ };
+ }}}
+ 
+ 
+ Example 2 should map to the following:
+ XmlSchema:
+ {{{
+ <complexType name="FooSeq">
+     <sequence>
+         <element maxOccurs="unbounded" minOccurs="0" name="item"
+             type="Foo"/>
+     </sequence>
+ </complexType>
+ <complexType name="Foo">
+     <sequence>
+         <element name="value" type="int"/>
+         <element name="chain" type="FooSeq"/>
+     </sequence>
+ </complexType>
+ }}}
+ CorbaTypeMap:
+ {{{
+ <corba:sequence bound="0" elemtype="Foo" name="FooSeq"
+     repositoryID="IDL:FooSeq:1.0" type="xsd:FooSeq"/>
+ <corba:struct name="Foo" repositoryID="IDL:Foo:1.0" type="xsd:Foo">
+     <corba:member idltype="corba:long" name="value"/>
+     <corba:member idltype="FooSeq" name="chain"/>
+ </corba:struct>
+ }}}
+ 
+ 
+ === wsdltoidl ===
+ 
+ 
+ The wsdltoidl tool should be able to recognise and translate the recursive types that originated
from legal IDL recursive types.
+ 
+ 
+ ||(Can anyone comment on the following paragraph? Is this correct? Can anyone provide an
example?)||
+ 
+ The set of recursive XmlSchema types that can be generated by legal IDL recursive types
is contained within the set of recursive XmlSchema types. The wsdltoidl should generated a
warning when parsing a recursive XmlSchema type that cannot be mapped into a recursive IDL
type.
+ 

Mime
View raw message