Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server not callign JS Function #197

Closed
danielloscheck2 opened this issue Jan 14, 2021 · 3 comments
Closed

Server not callign JS Function #197

danielloscheck2 opened this issue Jan 14, 2021 · 3 comments
Labels

Comments

@danielloscheck2
Copy link

Hello, I'm using the Server feature that is in the documentation. I was able to make the connection and expose the server.

But after that I called the RFC and for some reason my JS function is not being called.

Here's an exemple of my code:

const addon = require("node-rfc");
const Server = addon.Server;
const server = new Server({ dest: "gateway" }, { dest: "client" });

const my_stfc_connection = (request_context, abap_parameters) => {
    console.log("NodeJS stfc invoked ", request_context);
    console.log("abap_parameters  ", abap_parameters);
    return { };
}

server.start((err) => {
    if (err) return console.error("error:", err);
    console.log(
        `Server alive: ${server.alive} client handle: ${server.client_connection} server handle: ${server.server_connection}`
    );

    const RFM_NAME = "RFCTEST";
    server.addFunction(RFM_NAME, my_stfc_connection, (err) => {
        if (err) return console.error(`error adding ${RFM_NAME}: ${err}`);
    });
});

setTimeout(function () {
    console.log("bye!");
}, 20 * 100000);

This is the output after starting the server and calling the RFC:
Server alive: true client handle: ********* server handle: *********
Metadata lookup for: RFCTEST
genericHandler for: RFCTEST func_handle: *********
found func_desc *********

My console.log 'NodeJS stfc invoked' never appears.

Any ideas?

Tks

@bsrdjan
Copy link
Contributor

bsrdjan commented Feb 1, 2021

Sorry, the Server is only for internal experimenting and not available yet.

@KunalBurangi
Copy link

Is it available now?
@bsrdjan

@bsrdjan
Copy link
Contributor

bsrdjan commented Sep 29, 2022

Sorry, it is not available see #209 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants