I need to write a Rpgle program which needs to do a POST call (SOAP call) to an external webservice (the external webservice is a different java based system) in order to get invoice value based on certain inputs. Is there an inbuilt rpgle subprogram through which I can make this call. If yes can can anyone suggest what is that. If NO then can anyone suggest how to achieve this?
An appropriate answer will be highly appreciated.
SQL provides the functionality you need.
Your best starting point is this example, taken from https://colemaxwell.dev/posts/rest-api-ibmi-qsys2/
Embed that in your RPG program.
This example receives JSON format; you did not tell in your question which data format the service you use returns.
You mentioned you want to use POST. Strictly speaking, this should be a GET request, according to this (very good document): https://www.ibm.com/docs/en/i/7.4?topic=programming-http-functions-overview but a POST request would also work. There is also a QSYS2.HTTP_POST SQL function, which works in a similar way.
Implemented in a raw SQLRPGLE program, it looks like the following (adapt as you require):
EDIT:
THE XML variant has already been answered here:
Get an XML from WEB with a SQL DB2 on Iseries
My (tested working) version of it: