if( paramTypeNames.length > 0 )
{
if (paramTypeNames.length != m_params.length)
{
throw new INTF_REPOS ("Different parameter type numbers! " +
paramTypeNames.length + " vs. " + m_params.length +
" inforString: " + opInfo);
}
}
for( int i = 0; i < params.length; i++)
{
String name = "arg_" + i;
String paramInfo = null;
org.omg.CORBA.ParameterMode mode = null;
try
{
String parameterTypeName = m_params[i].getName();
if( paramTypeNames.length != 0 )
paramInfo = paramTypeNames[i];
if( ! parameterTypeName.endsWith("Holder") )
{
mode = org.omg.CORBA.ParameterMode.PARAM_IN;
if( paramInfo != null && paramInfo.indexOf(' ') > 0 )
{
parameterTypeName =
paramInfo.substring( paramInfo.indexOf(' ')+1);
name =
paramInfo.substring( paramInfo.indexOf(':')+1,
paramInfo.indexOf(' '));
}
}
else
{
if ( ! (paramInfo != null && (paramInfo.indexOf(' ') > 0)))
{
throw new INTF_REPOS ("No param info for " + parameterTypeName);
}
if( paramInfo.substring(0, (paramInfo.indexOf(' ')-1)).startsWith("inout:"))
mode = org.omg.CORBA.ParameterMode.PARAM_INOUT;
else
mode = org.omg.CORBA.ParameterMode.PARAM_OUT;
name = paramInfo.substring( paramInfo.indexOf(':')+1,
paramInfo.indexOf(' '));
parameterTypeName =
parameterTypeName.substring(0, parameterTypeName.indexOf("Holder"));
}
if (this.logger.isDebugEnabled())
{
this.logger.debug("Operation " + name() + ", param #"+ i +
"name: " + name +
", paramTypeName " + parameterTypeName +
paramInfo);
}
tc = TypeCodeUtil.getTypeCode( m_params[i],
this.loader,
null,
parameterTypeName,
this.logger);
}
catch ( Exception e )
{
logger.error("Caught Exception", e);
throw new INTF_REPOS( ErrorMsg.IR_Definition_Not_Found,
org.omg.CORBA.CompletionStatus.COMPLETED_NO);
}
org.omg.CORBA.IDLType type_def =
IDLType.create( tc, containing_repository,
this.logger, this.poa );