Hi,
thanks to Dino I have a nice example to test if our IBMi is connected to the net and can request something from URLs.
Function Options(*DIRECT)
Define_Com Class(#XPRIM_HttpRequest) Name(#Request) Scope(*Application)
#Request.DoPost Url('https://www.google.com')
If (#Request.Response.IsSuccessfulRequest)
Message Msgtxt(allgood)
Else
Message Msgtxt(notgood)
Endif
When using 'https://www.google.com' the response is "allgood".
But when I replace 'https://www.google.com' with 'https://www.lansa.com' or our web page 'https://www.smhsoftware.de' I always get response "notgood".
Why is this so?
What has to be done to get "allgood" when using other URLs than 'https://www.google.com'?
Kind regards,
Joerg
Web API - Requesting data from services
-
Joerg Hamacher
- Posts: 124
- Joined: Thu Feb 11, 2016 12:01 am
-
Joerg Hamacher
- Posts: 124
- Joined: Thu Feb 11, 2016 12:01 am
Re: Web API - Requesting data from services
Hi,
I found that calls with http instead of https work.
So I suppose that it is a matter of certificates.
I know how to retrieve certificates with LANSA Integrator.
But how do I have to import these certificates on our IBMi so that LANSA functions , reusable Parts and Web APIs find them and use them?
Kind regards,
Jörg
I found that calls with http instead of https work.
So I suppose that it is a matter of certificates.
I know how to retrieve certificates with LANSA Integrator.
But how do I have to import these certificates on our IBMi so that LANSA functions , reusable Parts and Web APIs find them and use them?
Kind regards,
Jörg
Re: Web API - Requesting data from services
Joerg,
I am not sure your issue is the same as what I was dealing with, but when I started using Lansa resources with web requests two issues I had to deal with were the IBM i DCM (Digital Certificate Manager) and object authorities. The object authority issue never fully got explained to my satisfaction, but it worked and I had to move on.
Look at the forum post:
viewtopic.php?f=3&t=2552
And here is a link to an IBM doc that might help with a link to setting up certs in the DCM:
https://www.ibm.com/support/pages/node/685565
Hope this help.
I am not sure your issue is the same as what I was dealing with, but when I started using Lansa resources with web requests two issues I had to deal with were the IBM i DCM (Digital Certificate Manager) and object authorities. The object authority issue never fully got explained to my satisfaction, but it worked and I had to move on.
Look at the forum post:
viewtopic.php?f=3&t=2552
And here is a link to an IBM doc that might help with a link to setting up certs in the DCM:
https://www.ibm.com/support/pages/node/685565
Hope this help.
Arlyn Dale
Servias LLC
Servias LLC
Re: Web API - Requesting data from services
Digital Certificate Manager is a hoot.
What IBM i version are you on? There was a PTF that fixed a certificate issue that popped up a few Monday's ago.
Art
What IBM i version are you on? There was a PTF that fixed a certificate issue that popped up a few Monday's ago.
Art
Art Tostaine
-
Joerg Hamacher
- Posts: 124
- Joined: Thu Feb 11, 2016 12:01 am
Re: Web API - Requesting data from services
Hi Art,
Release is V7R3M0.
Kind regards,
Joerg
Release is V7R3M0.
Kind regards,
Joerg
Re: Web API - Requesting data from services
I followed this article. Brad is top notch on cipher and all sorts of issues.
It asks you to remove some ciphers from a sysval (that did not solve our problem) and then apply a PTF. I applied the PDF during production and we were back up.
https://fieldexit.com/forum/display?threadid=618
It asks you to remove some ciphers from a sysval (that did not solve our problem) and then apply a PTF. I applied the PDF during production and we were back up.
https://fieldexit.com/forum/display?threadid=618
Art Tostaine