I am trying to consume a Web Service API Rest Provider from a native COBOL program. To do this, I have created the Web Service Requester using the "imtkmake -genclientjson clientjson=json_name" command from OpenApi Schema, but when I make the call I get an error code 1401 (which I don't know what it means). Could someone tell me if the result of the aforementioned error can be found in any documentation?
Even so, I have managed to successfully consume another operation from the same Web Service Provider. In fact, the difference I'm seeing is that the operation I'm trying to consume that is failing has a URL parameter {polissa}, and this makes me suspect that this is the problem.
Finally, I've attached a piece of the code I'm using to make the call:
entry "getPolicy"
using getPolicy-parms.
move polissa
of input-parms
of getPolicy-parms
to wsc-polissa-op04I-01
set wsc-proc-ptr to entry "nxwscrun"
set wsc-ptr-arg(1)
to address of wsc-polissa-op04I-01
set wsc-ptr-arg(2)
to address of wsc-Policy-01
move 256 to wsc-srvc-faultcode-len
move 256 to wsc-srvc-faultstring-len
call "InvokeService04"
using value 2 -1 -1 -1 -1
reference
wsc-idt
wsc-ptr-args
wsc-srvc-address
n"getPolicy"
n"/policy/{polissa}"
n" "
wsc-srvc-querystring
wsc-srvc-username
wsc-srvc-password
value
wsc-srvc-address-len
9 17 1
wsc-srvc-querystring-len
wsc-srvc-username-len
wsc-srvc-password-len
reference
wsc-special-registers
wsc-spec-reg-lens
wsc-srvc-faultcode
wsc-srvc-faultcode-len
wsc-srvc-faultstring
wsc-srvc-faultstring-len
returning wsc-ret-code
if wsc-ret-code = 0
using getPolicy-parms.
move polissa
of input-parms
of getPolicy-parms
to wsc-polissa-op04I-01
set wsc-proc-ptr to entry "nxwscrun"
set wsc-ptr-arg(1)
to address of wsc-polissa-op04I-01
set wsc-ptr-arg(2)
to address of wsc-Policy-01
move 256 to wsc-srvc-faultcode-len
move 256 to wsc-srvc-faultstring-len
call "InvokeService04"
using value 2 -1 -1 -1 -1
reference
wsc-idt
wsc-ptr-args
wsc-srvc-address
n"getPolicy"
n"/policy/{polissa}"
n" "
wsc-srvc-querystring
wsc-srvc-username
wsc-srvc-password
value
wsc-srvc-address-len
9 17 1
wsc-srvc-querystring-len
wsc-srvc-username-len
wsc-srvc-password-len
reference
wsc-special-registers
wsc-spec-reg-lens
wsc-srvc-faultcode
wsc-srvc-faultcode-len
wsc-srvc-faultstring
wsc-srvc-faultstring-len
returning wsc-ret-code
if wsc-ret-code = 0