Problem solve Get help with specific problems with your technologies, process and projects.

Invoking a remote CORBA method with parameter constraints

A SearchWebServices.com member asks one of our experts, "How do I invoke a remote CORBA method with parameter constraints?" Read the response or pose a question of your own.

I am writing a Java DII Client, which reads the information from the Interface Repository. I have to execute one remote method which has one parameter of out type which is a user-defined data-type. How can I build the request, invoke the operation and read the results? As of now I am able to read the parameter name, parameter type and number of parameters of the method. I tried constructing the dynstruct using the dynamic factory but it doesn't work. How do I send the user-defined data type as an out parameter to the CORBA Method?

This is a good question, since the J2EE dynamic invocation interface (DII) client model allows access to an RPC-based Web service even if the details of the service are unknown prior to runtime. To create a DII client, follow these steps:

1: Create a Service object using the javax.xml.rpc.ServiceFactory class as follows:

   ServiceFactory factory = ServiceFactory.newInstance();

   Service service =  factory.createService(new QName(theServiceQName));

2: From the Service object, create a Call object as follows:

   QName port = new QName(theQNnamePort);   

   Call call = service.createCall(port);

3: Set the service endpoint address on the Call object corresponding to the element of the WSDL file as follows:


4: Set the appropriate properties on the Call object.

5: Specify the method's return type, name, and parameter as follows:

   QName qNameRetType = new QName(NS_XSD, "theXSDType");
   call.setOperationName(new QName(theOperationNamespaceValue,

   call.addParameter("String_1", QNAME_TYPE_STRING,

6: Invoke the remote method on the Call object as follows:

   String[] params = { "param1" };
   String result = (String)call.invoke(params);

Details for this scenario can be found at in the J2EE tutorial.

This was last published in September 2005

Dig Deeper on Microservices pattern, platforms and frameworks

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.