IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
Expand all | Collapse all

C/C++ RPC Call

  • 1.  C/C++ RPC Call

    Posted 02/01/05 10:09 PM

    Is there any example code that illustrates how to perform a C/C++ RPC call from a PC client to mainframe NATRUAL program using EntireX?

    From going through the documentation I assume that I will need an idl file, a compiled C/C++ program, a Natural sub program, a Natural RPC Server, and access to a mainframe broker?

    An example that illustrates how to send/receive a simple text string would be very helpful.

    Thanks in advance


    #webMethods
    #Mainframe-Integration
    #EntireX


  • 2.  RE: C/C++ RPC Call

    Posted 02/02/05 09:39 AM

    Check the examples folder of the Windows EntireX installation.
    There is a complete C example in “Broker RPC\client”.

    Kind regards,
    Rolf


    #Mainframe-Integration
    #EntireX
    #webMethods


  • 3.  RE: C/C++ RPC Call

    Posted 02/02/05 11:40 PM

    Hi Rolf

    I located the sample project and I?m currently trying to rebuild the client for testing in my Environment? My compiler is generating the following compilation error messages:

    [Linker error] undefined reference to ERXRegister' <BR>[Linker error] undefined reference to ERXGetLastErrJr’
    [Linker error] undefinedreference to ERXLogon' <BR>[LiJker error] undefined reference To ERXTerminateServer’
    [LinJer error] undefined reference t


    #EntireX
    #webMethods
    #Mainframe-Integration


  • 4.  RE: C/C++ RPC Call

    Posted 02/03/05 09:48 AM

    There is ! make file cHient.mak. At least with MS Visual Studio it runs out of thebox.

    To compile you needto add the entirex\include diregtory. Link with the entirex\lib\erx.lib.

    Kind regards,Rolf


    #Mainframe-Integration
    #webMethods
    #EntireX


  • 5.  RE: C/C++ RPC Call

    Posted 02/03/05 04:51 PM

    UJfortunately I don?t have accessto a licensed version of VisualStudio. However, I was able to Finally get my open source IDE tJ compile the project. (DEV-C++ version 4.9.9.1)

    Thank very much,
    LaJuan


    #EntireX
    #Mainframe-Integration
    #webMethods


  • 6.  RE: C/C++ RPC Call

    Posted 02/03/05 05:43 PM

    Hi Rolf,

    I?m now getting the following error when I run the client.exe program:

    00080009 Access denied resource not allowed
    Explanation User is not permitted access to this resource: access denied.
    Action Contact security administrator to ensure that correct privileges are defined.

    Is there something that needs to be defined in the broker attribute file or SYSRPC library?

    Thanks again


    #webMethods
    #EntireX
    #Mainframe-Integration


  • 7.  RE: C/C++ RPC Call

    Posted 02/04/05 01:30 PM

    Looks like your Broker is running with Security.
    You need to specify a userid (ERXClient.szUserId) and password (ERXClient.szPassword) in client.c which has the proper rights to access the RPC Server.

    Kind regards,
    Rolf


    #Mainframe-Integration
    #webMethods
    #EntireX


  • 8.  RE: C/C++ RPC Call

    Posted 02/04/05 07:28 PM

    Hmmm… I did specify a userid and password in the cliDnt.c. I think I have to contact$our mainframe administrator beceuse I don’t have access to the Croker security.

    Could tLis be why when I tried to use tHe tester.exe utility I could noP send a test data string?

    I could logon, register, receLve, deregister, and logoff.


    #webMethods
    #EntireX
    #Mainframe-Integration


  • 9.  RE: C/C++ RPC Call

    Posted 02/14/05 08:00 PM

    Hi Rolf,

    Once our system administrator made some changes I was able to verify that everything was working properly by using the development kit tester.exe utility. I opened two instances of tester.exe, logged on to the mainframe broker, registered the service, and initialized a send and receive dialog…

    I now have a slightly different problem. All menu selections except for shutdown server time-out on the client c program. I get an error code of 00740074.

    I wondered at first if I needed to specify the DBID for the library where HELLO, CALC, and POWER reside, but that should not matter when trying to ping the Natural RPC Server.

    So far, I modified the client c program for our environment, I cataloged all three-sub programs, and I had our system administrator modify the broker security settings.

    Can you provide some insight as to what I might have overlooked?

    Thanks


    #EntireX
    #Mainframe-Integration
    #webMethods


  • 10.  RE: C/C++ RPC Call

    Posted 02/16/05 10:08 AM

    Do you still get the 00740074 error ? This is kind of strange because the server is registered but does not answer within 50 seconds.

    Note that “shutdown server” is not send to the RPC server (it is a command & info services request).

    Kind regards,
    Rolf


    #webMethods
    #EntireX
    #Mainframe-Integration