Hi, I've a desktop application built using Appeon PowerBuilder 2017 R2 version. This application calls SOAP WebService developed in Java to authenticate users. Now, there is a requirement to implement the SSL/Certificate Validation or Pinning in this application where the client will check the Webserver’s certificate against a known copy of that certificate. The Webserver's certificate will be bundled with the application. So is there any way to implement the SSL Pinning in PowerBuilder desktop application? Please assist
- You are here:
- Home
- Q&A
- Q&A
- PowerBuilder
- How to implement SSL/Certificate Validation or Pinning in desktop application
- Suhas Shravagi
- PowerBuilder
- Tuesday, 4 February 2020 12:11 PM UTC
Accepted Answer
- Tuesday, 25 January 2022 16:16 PM UTC
- PowerBuilder
- # Permalink
Hi Suhas. The HTTPClient object supports the following ...
1 – SSL 2
2 – SSL 3
3 – TLS 1.0
4 – TLS 1.1
5 – TLS 1.2
Comment
- Armeen Mazda @Appeon
- Tuesday, 25 January 2022 16:57 PM UTC
And TLS 1.3 coming soon. ;-)
-
Helpful Loading... Helpful 0
There are no comments made yet.
- Monday, 21 September 2020 08:15 AM UTC
- PowerBuilder
- # 1
Hi, Can someone check the above piece of code and respond on how to extract the array from XML response? The reason behind asking this question is because I have never implemented pbdom or HTTPClient in PowerBuilder before. Thanks!
Comment
- Armeen Mazda @Appeon
- Tuesday, 25 January 2022 16:45 PM UTC
Take a look at this tech article: https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/236-call-soap-web-services-using-httpclient-object
-
Helpful Loading... Helpful 0
There are no comments made yet.
- Tuesday, 4 February 2020 20:00 PM UTC
- PowerBuilder
- # 2
Hi Suhas;
PB does not currently support SSL for SOAP Web Service interaction. However, you might consider the following alternatives ....
1) The new HTTPClient PB object class supports TLS 1.2 encryption over to SOAP based web services.
2) You could also try and using a 3rd party product.
One example: https://www.example-code.com/powerbuilder/http_authentication.asp
HTH
Regards ... Chris
Comment
- Suhas Shravagi
- Monday, 10 February 2020 13:26 PM UTC
Hello Chris,
Thanks for the response. Does it mean that PowerBuilder is unable to do SSL interaction with SOAP but will be possible with REST? Or PowerBuilder not at all support SSL interaction?
Thanks for the response. Does it mean that PowerBuilder is unable to do SSL interaction with SOAP but will be possible with REST? Or PowerBuilder not at all support SSL interaction?
-
Helpful Loading... Helpful 0
- Suhas Shravagi
- Thursday, 17 September 2020 13:57 PM UTC
I have been replying after a long break as this task was kept on hold. But now when I resumed implementing the HTTPClient object for calling SOAP WebService by enforcing TLS1.2, I am able to get the XML response from WebService as below:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<myfunctionResponse xmlns="http://tempurl.com">
<myfunctionReturn>Ret_Val_1</myfunctionReturn>
<myfunctionReturn>Ret_Val_2</myfunctionReturn>
<myfunctionReturn>Ret_Val_3</myfunctionReturn>
</myfunctionResponse>
</soapenv:Body>
</soapenv:Envelope>
Now my need is to get the three return parameters (Ret_Val_1, Ret_Val_2, and Ret_Val_3.) I tried with PBDOM objects but it is always return only first element (Ret_Val_1) always.Is there anything that I can do to resolve this issue? I have below piece of code now:
//---------------------------------------------------------------
lpbdom_Builder = CREATE PBDOM_BUILDER
lpbdom_doc = CREATE PBDOM_DOCUMENT
TRY
// generate XML Document
lpbdom_Doc = lpbdom_Builder.BuildFromString(ls_xml_data)
ls_value = lpbdom_Doc.GetRootElement().&
GetChildElement("Body", "soapenv","http://schemas.xmlsoap.org/soap/envelope/").&
GetChildElement("myfunctionResponse","","http://tempurl.com").&
GetChildElement("myfunctionReturn","","http://tempurl.com").getText()
MessageBox("ls_value", ls_value)
CATCH (PBDOM_Exception lpbdom_Except)
MessageBox( "PBDOM_Exception", lpbdom_Except.GetExceptionCode())
END TRY
DESTROY lpbdom_Builder
//---------------------------------------------------------------
I know these parameters have to be captured in an array, but how?
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<myfunctionResponse xmlns="http://tempurl.com">
<myfunctionReturn>Ret_Val_1</myfunctionReturn>
<myfunctionReturn>Ret_Val_2</myfunctionReturn>
<myfunctionReturn>Ret_Val_3</myfunctionReturn>
</myfunctionResponse>
</soapenv:Body>
</soapenv:Envelope>
Now my need is to get the three return parameters (Ret_Val_1, Ret_Val_2, and Ret_Val_3.) I tried with PBDOM objects but it is always return only first element (Ret_Val_1) always.Is there anything that I can do to resolve this issue? I have below piece of code now:
//---------------------------------------------------------------
lpbdom_Builder = CREATE PBDOM_BUILDER
lpbdom_doc = CREATE PBDOM_DOCUMENT
TRY
// generate XML Document
lpbdom_Doc = lpbdom_Builder.BuildFromString(ls_xml_data)
ls_value = lpbdom_Doc.GetRootElement().&
GetChildElement("Body", "soapenv","http://schemas.xmlsoap.org/soap/envelope/").&
GetChildElement("myfunctionResponse","","http://tempurl.com").&
GetChildElement("myfunctionReturn","","http://tempurl.com").getText()
MessageBox("ls_value", ls_value)
CATCH (PBDOM_Exception lpbdom_Except)
MessageBox( "PBDOM_Exception", lpbdom_Except.GetExceptionCode())
END TRY
DESTROY lpbdom_Builder
//---------------------------------------------------------------
I know these parameters have to be captured in an array, but how?
-
Helpful Loading... Helpful 0
There are no comments made yet.
- Page :
- 1
There are no replies made for this question yet.
However, you are not allowed to reply to this question.
However, you are not allowed to reply to this question.
Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here. Register Here »