Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

How to consume JSON-RPC service from ABAP

Former Member
0 Kudos

Hi Experts,

We have a requirement to comunicate with a backend system with JSON-RPC.

Can a JSON-RPC service consumed from ABAP? JSON can be used in ABAP, but JSON-RPC?

Thanks in advance.

Mar

1 ACCEPTED SOLUTION

Former Member
0 Kudos

Hi Marcos,

we have the same demand to call a external JSON-RPC function by ABAP.

If your NetWeaver ABAP is >=7.40 or you have SAP NetWeaver gateway installed, there's a SE80 package called /IWBEP/JSON_RPC_CORE from Gateway Foundation Add-On.

This seems to be a JSON-RPC Implementation but it looks like not directly for client usage. May be you can resuse some utils or ideas from there in you code.

Best regards,

Matthias

3 REPLIES 3

Former Member
0 Kudos

Hi Marcos,

we have the same demand to call a external JSON-RPC function by ABAP.

If your NetWeaver ABAP is >=7.40 or you have SAP NetWeaver gateway installed, there's a SE80 package called /IWBEP/JSON_RPC_CORE from Gateway Foundation Add-On.

This seems to be a JSON-RPC Implementation but it looks like not directly for client usage. May be you can resuse some utils or ideas from there in you code.

Best regards,

Matthias

0 Kudos

Hi Matthias,

correct, I saw that package too, but I didn't have the impresion that I could use the classes for calling an JSON-RPC service.

How will you implement your requirement?

Regards

M.

0 Kudos

Hi Marcos,

we use CL_REST_HTTP_CLIENT for http(s) and /ui2/cl_json=>serialize( ) to create well formed JSON.


With this JSON and the cl_http_utility=>set_request_uri() we generate a valid JSON RPC URL.


Best regards,

Matthias