Index > Design Documents > idltowsdl


Summary of Requirements Being Addressed

A tool that can take an idl file and generate a wsdl with a corba binding.

Summary of Proposed Solution

The proposed solution is to use antlr with the idl grammar file to implement a visitor pattern based generation of the corresponsing wsdl file.

The mappings for the idl to wsdl types is defined here: IdlToWsdlTypeMapping.

Following external projects have been used to implement this tool.

jwsdl: To create a wsdl model in memory from the idl.

XMLSchema: To create the xml schema types from the idl types.

celtix: Framework for creating the tool like parsing of the tool options, helper classes to register extensions with the jwsdl model, etc...

For each set of tasks we need to setup and write unit tests and system tests. Make sure it conforms to checkstyle. We need to conform to the coding standard used in Yoko.

Stories to be done for type support

List of different types that need to be supported

Primitive type support
Support for simple sequence and Enum
Support for basic sequence with tests
Support for basic struct with tests
Support for basic exception with tests
Support for basic union with tests
Support for basic enum with tests
Support for basic array with tests
Support for typedef array with tests
Support for union with tests
Support for anon types with tests
Support for nested with tests
Support for basic recursion with tests
Support for basic fixed with tests
Support for basic any with tests
Support for basic consts with tests
Support for date/time with tests
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:

In other words, we only need to worry about structures or unions that contain incomplete sequences.

Example 1:

Example 2:

Example 3:

Example 2 should map to the following:



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.