EntireX as web service? How? Samples?

I am new to EntireX. I’m going thru reams of documentation, java / web / xml examples etc, but none of them deal with building a web-service & calling the broker to get info from the mainframe.
We’re able to do it via an Access application. We want to do it with a web service instead… Can anyone point me to a link or some code somewhere :slight_smile: ?

Jason Shohet 212-863-6481

Hi Jason,

refer to your earlier posting. I sent you a response with more details. Have a look at Response to 1’st Posting

EntireX also provides some code examples with the default installation. Please refer to the following directory: C:\Program Files\Software AG\EntireX\Examples\XML Wrapper

There is simple example called “calc”. The original IDL file, as well as natural subprograms are provided under the followin directory: C:\Program Files\Software AG\EntireX\Examples\DCOM Wrapper\calc

Ask one of your mainframe colleagues to upload these Natural subprograms and create a sample RPC service for you. If that is not possible use the calc IDL file and create a Java RPC server program. You can start the RPC Server on your machine locally and then test your web service as if it was the mainframe.

I’m including a sample command file and attaching a properties file that will show you how to start the JAVA RPC Service. To do this you will have to start a Broker instance on your development machine. Let me know if you need help in starting creating and configuring a Broker instance.

Command File:
java -Dentirex.server.properties=rpcserver.properties com.softwareag.entirex.aci.RPCServer

Let me know if you need additional information.


Thanks for your replies. Yes, all your assumptions are true. The problem is, I know how to create a web service in .NET using C#. But EntireX’s documentation does not describe how to do it in .NET. Lots of techno-jargon, words like interface, RPC, mapping, adapter, runtime yada yada, without any real steps to take. I need information on what the .cs file or .vb file looks like in .NET, to access the Broker. What steps I need to take to get it to work etc :slight_smile:

The code samples given are for java or dcom. Java is out, we use IIS here. And what is the DCOM for? Isn’t that an antiquated architecture, I don’t even know how to use .NET with DCOM. I would have expected to see a .NET page describing the vb, c++ or c# code needed to create the web service.

Our client would be a web client. So it looks like, from the diagram in the documentation, that there’s a web client that does an HTTP request. But thats not desirable for us. We want a proxy dll for the web service that we can use serverside, and call from within our applications. ie, we don’t want to access the mainframe thru http requests passing parameters in the URL.

Jason Shohet 212-863-6481

Well going thru more of the documentation, its more than techno-jargon, I see the applications for instantiating a broker object.

I guess I am confused because it seems you support Java clients. Or http clients. But what about a .NET client, as a web service. In other words, the web service is created in .NET and a proxy (dll) is created, that can be called from within web applications.

Thats what I’m not seeing, I don’t know the path to get there.

Thanks and sorry for troubling everyone!

Hi Jason,

EntireX version 6.1/6.2 does not support .NET directly.

You need EntireX version 7.1.1 which has been released a few weeks ago.
It includes a .NET Wrapper which generates a C# .NET component.

In the docu see “EntireX Developer’s Kit” → “Using EntireX with .NET”.

Kind regards,

Hi Jason,

the EntireX 7.1.1 .NET Wrapper generates C# classes that implement a client stub for an EntireX RPC service described by an (EntireX) IDL description.
See the “EntireX Developer’s Kit” → “EntireX .NET Wrapper” → “Writing Applications - EntireX .NET Wrapper” for a detailed description how to write an EntireX .NET application.

The generated C# client stub is not .NET Web service enabled by itself. But you can easily create a .NET Web service with Visual Studio .NET that publishes methods of the EntireX RPC service (or own methods that just use the EntireX RPC service) with VS .NET.

I assume the .NET Wrapper Example EntireX\Examples\NET Wrapper\client\calc has been built as described in the README file. Then a new “ASP .NET Web Service” project can be created with references to the generated client stub and the .NET Wrapper runtime. The following code can be used as an example (in the .asmx file) how to implement a Web method “Hi” that exposes the “Hello” method of the example.

Regards, Dietmar.

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;
using System.Text;
using SoftwareAG.EntireX.NETWrapper.Runtime;
using SoftwareAG.EntireX.NETWrapper.Generated.example;

namespace WebService1

/// Summary description for Service1.

public class Service1 : System.Web.Services.WebService
public Service1()
//CODEGEN: This call is required by the ASP.NET Web Services Designer

#region Component Designer generated code

//Required by the Web Services Designer
private IContainer components = null;

/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.

private void InitializeComponent()

/// Clean up any resources being used.

protected override void Dispose( bool disposing )
if(disposing && components != null)



public string Hi(string message)
Example e = new Example();
StringBuilder msg = new StringBuilder(“Hello and goodbye!”);
e.Hello(“”, ref msg);
return msg.ToString();

Wow this is great!!! Thank you for steering me in the right direction.

Now my mainframe guy is asking me how to create an IDL file that describes the natural functions he has… I told him i have no idea, read the documentation :slight_smile: Well the story continues on Monday.
Have a happy 4th!

Jason Shohet

Hi Jason,

the mainframe programmer should have a Natural subprogram you can access. The Natural subprogram begins with a ?Define Data? statement, in the example below I have extracted the Data Area of the subprogram called ?LISTPAT?, this subprogram is stored within a Natural Library called ?PATLIB?:

2 #PATIENT_LIST (1:100)
2 #MESSAGE (A80)


In the workbench you create an IDL file, which should look something like the following:

library ‘PATLIB’ is
program ‘LISTPAT’ is
define data parameter
1 start_patient_no (N8) In
1 patientList (/100) Out
2 patient_no (N8)
2 patient_first_name (A25)
2 patient_last_name (A25)
1 message (A80) Out

The ?library? name in the IDL file should correspond to the Natural library name in which the Natural subprogram resides. The ?program? name should correspond the Natural subprogram name. You will note that in the example I have specified additional parameters ?In? or ?Out? to the variables in the IDL file. These parameters indicate whether the contents of the variables are only to be sent to the mainframe subprogram (In) or to be returned by the mainframe subprogram (Out). You can also specify ?In/Out?, which would mean that the contents of the variable would be sent and received. For a more detailed explanation on the syntax used in the IDL file and also which data types are supported please refer to:
C:\Program Files\Software AG\EntireX\Docu\devkit\idl\idl.htm
(EntireX Developer’s Kit → Interface Definition Language for EntireX RPC)

To create the IDL file you could easily copy and paste the contents of the Parameter Data Area from the subprogram into the IDL file.

There is also another way of doing this. You could generate the IDL file from directly from the Natural subprogram source code. This can be done using the Natural IDL Generator, which is provided as part of the EntireX installation on your desktop.

For more information on how to use the Natural IDL Generator please refer to the following chapter in the EntireX documentation: C:\Program Files\Software AG\EntireX\Docu\devkit\natural\natidl.htm (EntireX Developer’s Kit → EntireX Natural IDL Generator)

For more information on how to setup the mainframe environment, please refer your mainframe guy to the following sections in the documentation:

C:\Program Files\Software AG\EntireX\Docu\admin\os390\natidl.htm
(EntireX Developer’s Kit → EntireX Natural IDL Generator → Troubleshooting → Server Configuration OS/390)

For setting up the RPC environment on the mainframe, please refer him to the following section in the Natural documentation: (Natural Remote Procedure Call → Setting Up a Natural RPC Environment → Setting up a Natural RPC Environment)

(Natural Remote Procedure Call → Setting Up a Natural RPC Environment → Operating a Natural RPC Environment)

Hope this helps.


1 Like