Call protocol propertyOfficial Content
Define how the object is invoked, and its output.


Command Line It allows the objects to be executed by command line only. When calling a command line object, supported input parameters are basic data types (cannot be Collection, Vector or Matrix) except for Bitmap and GUID data types; output parameters are not supported.
Enterprise Java Bean When Java is the selected generator, Procedures and Business Component Transactions can apply this value in the property. By setting this value,this procedure will automatically be generated as session bean (stateless) and also as message driven beans.
HTTP It generates procedures callable via the http protocol. It allows adding information in the Http Response using HttpResponse data type. This is only valid for Web environments.
Internal This is the usual call type used for objects in GeneXus and this is the default value.
SOAP It allows generating procedures to be called via SOAP protocol. It is a particular case of HTTP type. These procedures are known as Web Services. This is only valid for Web environments.



Input parameters: Parameters come instanced by each generator usual mechanism.
Output parameters: Parameters are returned through each generator usual mechanism.


Input parameters: Parameters come after the '?' mark in the URL used to invoke the Procedure through HTTP.
Output parameters: Parameters are not returned.
Output: HTTP response content.

Command Line

Notice that Command-line limits vary widely with the operating system. Some examples are:

Windows XP
Linux / UNIX / BSD

Input parameters: The space separated parameters following the name of the executable.
Output parameters: Parameters are not returned.
Output: Standard output.


Input parameters: Parameters come in the Body of the HTTP Request used in the invocation.
Output parameters: Parameters are not returned.
Output: The output is a HTTP Response with the modified parameters in its Body.

Enterprise Java Bean (EJB)

When the procedure is called with the CALL command, the SESSION BEAN is called synchronically. When the procedure is called with the SUBMIT command, the MESSAGE DRIVEN BEAN is called asynchronically.

The EJBs can be called from external objects. There is an object property ('Expose as EJB') that must be set in order to expose the GeneXus procedure as EJB. If the object has call protocol = EJB, then, by default, the object can be called from GeneXus objects and from external objects automatically. But if we want to expose it only for external objects, and we use the procedure in GeneXus as a common procedure, then the 'call protocol' can remain with internal value, and the 'expose as ejb' = true.

This is only valid for Web environments.

When to configure main program property and call protocol property

When you want to define a different output than the default (Internal) for a procedure, you can leave the Main program property with the default value (FALSE), and configure the call protocol according to the output of the procedure (SOAP, EJB, HTTP).

The benefits of this are that it reduces the number of main objects in the KB. 

One reason for configuring main program = TRUE is to be able to compile the object because it is not in the call tree of any other object of the KB.

For example in the case of calling the program as a web service (SOAP), or as an EJB, from an object of the same KB; you do not need to configure the object as a main program, you just need to set the call protocol to the corresponding value.
The same happens to PDF reports, which do not need to be declared as main objects.

In parallel, in order to expose a web service or EJB to be called from outside the KB, there is no need to configure the main program property, but to configure the Expose as Web Service or Expose as EJB property respectively.

In the following table, we summarize the different scenarios.

  Call from the KB Call from outside the KB
SOAP Web Service Main program = False, Call Protocol= SOAP Main program = False, Expose as Web Service = TRUE, SOAP Protocol = TRUE.
Rest Web Service

(Only Smart Devices)

Main program = False, Expose as Web Service = TRUE, REST Protocol = TRUE.

Main program = False, Expose as Web Service = TRUE, REST Protocol = TRUE.
EJB Main program = False, Call Protocol= EJB Main program = False, Expose as Enterprise Java Bean property = TRUE.
HTTP Main program = False, Call Protocol=HTTP Main program = False, Call Protocol=HTTP


In the case of command line procedures, it is needed to configure main program property = TRUE, in all cases.


Objects: Procedure
Platforms: Web(.Net, Java)

See Also

What is EJB
What is J2EE
HowTo: Downloading a File using HTTP Protocol
HttpResponse data type

Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.