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.

 View Only
Expand all | Collapse all

JAVA RPCServer

  • 1.  JAVA RPCServer

    Posted Thu April 25, 2019 01:05 PM

    I am trying to write a standalone JAVA RPC server (not using xmlrpcserver) but I cannot make it work. I’m using designer 9.12. I tried the tester class and the idl tester. I keep getting “class not found” on the server stub.
    1001 0016: Callee not found. Library: DelawareVoterRegistrationService, Program: InitiateVoterRegistration, RPC Server: java.lang.ClassNotFoundException: DelawarevoterregistrationserviceStub
    The class is clearly present. Any idea why I would get this message please?


    #webMethods
    #Mainframe-Integration
    #EntireX


  • 2.  RE: JAVA RPCServer

    Posted Fri April 26, 2019 01:30 AM

    Are you using the jrpcserver? Is Java calling a Natural service or are other clients (such as Natural) calling a Java service?

    If using jrpcserver, have you specified your classpath in the entirex.javarpcserver.properties file?


    #Mainframe-Integration
    #webMethods
    #EntireX


  • 3.  RE: JAVA RPCServer

    Posted Fri April 26, 2019 02:59 AM

    What does your PATH environment variable contain?


    #Mainframe-Integration
    #webMethods
    #EntireX


  • 4.  RE: JAVA RPCServer

    Posted Fri April 26, 2019 06:14 AM

    You have to tell the Java RPC Server where to find your server classes so they can be loaded dynamically.

    You have two options:

    • add the directory to the -classpath parameter in the jrpcserver script
    • set the entirex.rpcserver.classpath entry in the properties file; note that you have to use the Java URL syntax here

    #Mainframe-Integration
    #webMethods
    #EntireX


  • 5.  RE: JAVA RPCServer

    Posted Fri April 26, 2019 08:38 AM

    Hi and thank you both very much. I don’t know why, but I was having trouble pointing the server to the bin directory where all the classes are.
    So yes, I am using jrpcserver. I’m running a standalone java rpc server with the intention of calling from natural. I’m not sure of the syntax of the JAVA url for the path, but I worked around it by wrapping everything into a .jar file and referencing that instead. I have another question though (I am very unfamiliar with this). The generated code says" // insert your application specific code here". OK, I did, but it is not apparent how to populate the response. I can get information out of the request so how do I set the response please.
    Thanks again… James.


    #webMethods
    #Mainframe-Integration
    #EntireX


  • 6.  RE: JAVA RPCServer

    Posted Fri April 26, 2019 09:02 AM

    Hi James,
    the server implementation extends an abstract class which provides the access to the IN OUT and OUT parameters.
    The names are .


    #Mainframe-Integration
    #EntireX
    #webMethods


  • 7.  RE: JAVA RPCServer

    Posted Fri April 26, 2019 12:58 PM

    Thank you. And one final question. XMLRPCSERVER creates rolling logs, exx.sdk.xml.runtime, etc. My JAVA rpcserver is not doing that, even though the runtime configuration is quite similar. How do I get it to write the logs?
    James.


    #EntireX
    #Mainframe-Integration
    #webMethods


  • 8.  RE: JAVA RPCServer

    Posted Mon April 29, 2019 06:54 AM

    In the properties file you have to set e.g.
    entirex.server.logfile=jserver.log
    entirex.trace=1
    These properties are also used by the XML RPC Server.


    #EntireX
    #webMethods
    #Mainframe-Integration


  • 9.  RE: JAVA RPCServer

    Posted Mon April 29, 2019 11:08 AM

    Thank you. I’m already doing that and I have it writing to serverlog.log, which unfortunately gets overwritten every time the server is re-started.
    I was looking for a logging option similar to the exx.sdk.xml.runtime.log that comes from XMLRPCSERVER, but I’m guessing now that those logs are specific only to XMLRPCSERVER and that there is no equivalent built into JAVARPCSERVER. Is that correct? So I would have to create my own custom logs using something like log4j?


    #webMethods
    #EntireX
    #Mainframe-Integration


  • 10.  RE: JAVA RPCServer

    Posted Mon April 29, 2019 11:20 AM

    Yes, the logging of the XML RPC Server is different.


    #webMethods
    #Mainframe-Integration
    #EntireX