Skip to main content
Summary IDL which define constant values, which are not reused in the IDL will map to WSDL, which does not contain these constants.
Article Number 37831
Environment Orbix 6.x Web services Artix 5.x All Supported Platforms
Question/Problem Description
Why do IDL const declarations go missing after conversion to WSDL?
Clarifying Information

If this IDL is converted to WSDL, there will be no entry for the longVal in the schema section:

module OrbixWS
{
    interface Echoer
    {
        const long longVal = 1;
        string echo(
            in string message
        );
    };
};
Error Message  
Defect/Enhancement Number  
Cause The idl to WSDL compiler generates the const values in the schema section as detailed in the OMG specification. This states they should be mapped to their value in WSDL. Any const values that are not used by any interface will therefore are not mapped. 
"4.1.6.1 Constants 
IDL constants are mapped by substituting their value directly in the generated WSDL."
 

Resolution The const values will still appear in the CORBA type mapping section after a CORBA binding is added to any WSDL. For example:
    <corba:typeMapping targetNamespace="http://schemas.iona.com/typemap/corba/echo.idl">
        <corba:const idltype="corba:long" name="OrbixWS.Echoer.longVal" type="xsd:int" value="1"/>
Workaround  
Notes  
Attachment  
Created date: 14 February 2013
Last Modified: 14 February 2013
Last Published: 14 February 2013
First Published date: 14 February 2013

#KnowledgeDocs
#Orbix