1. David Pylatuk
  2. PowerBuilder
  3. Tuesday, 28 November 2023 18:31 PM UTC

Hello everyone,

 

I am migrating a PB2019 application that uses SOAP to PB2022. As SOAP has been deprecated in PB2022 can anyone suggest a strategy to replace the SOAP code with REST API?

Thanks in advance.

Shannon Axon Accepted Answer Pending Moderation
  1. Tuesday, 12 March 2024 14:16 PM UTC
  2. PowerBuilder
  3. # 1

I seem to be going in circles with this... In some documentation, Appeon suggests I can use HTTP Client for windows authentication and then in other areas I see it's not supported. I find it shocking that this isn't common enough to have a fix put into the latest version... So we really can't use windows authentication without having to get 3rd party software? I know this thread is from Nov 2023 so really hoping Appeon has provided a solution to this besides me having to learn ChilKat or .Net?

Comment
  1. Shannon Axon
  2. Thursday, 14 March 2024 12:49 PM UTC
I have seen this link and I appreciate that you've shared this in multiple places but it's not mentioned in the documentation that tells you how to use an HTTP client object to call a SOAP Webservice. If this was here too, it wouldn't be so misleading: https://www.appeon.com/developers/get-help/knowledgebase/call-soap-web-service-using-httpclient-object.html (maybe i missed it there?)
  1. Helpful
  1. Roland Smith
  2. Thursday, 14 March 2024 15:43 PM UTC
SOAP is just XML data being sent to the server. You need to figure out the format of the XML and send it via HttpClient.
  1. Helpful 1
  1. Armeen Mazda @Appeon
  2. Thursday, 14 March 2024 17:11 PM UTC
I don't see wherein that article it tells you that you can use windows authentication. That is supposed to be a simple tutorial outline basic steps of converting from SOAP to REST. It cannot cover every possible scenario.
  1. Helpful
There are no comments made yet.
VINOD NAIR Accepted Answer Pending Moderation
  1. Wednesday, 29 November 2023 23:31 PM UTC
  2. PowerBuilder
  3. # 2

Is it true that SOAP calls are deprecated in PB 2022? If we have interfaces with other vendor applications that still uses SOAP then how do we mitigate this issue? 

Comment
  1. Armeen Mazda @Appeon
  2. Thursday, 30 November 2023 00:44 AM UTC
No, you can still make SOAP calls. But the implementation has been changed. Now you need to use the HTTPClient. Here is article: https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/236-call-soap-web-services-using-httpclient-object
  1. Helpful 2
There are no comments made yet.
David Pylatuk Accepted Answer Pending Moderation
  1. Tuesday, 28 November 2023 19:58 PM UTC
  2. PowerBuilder
  3. # 3

Hi Chris, a follow up to this if you don't mind... I am a little new to SOAP, REST in PB.

 

HTTP Client can call SOAP API, is it possible to apply authentication on HTTP client call to SOAP API?

ie.

The existing EAS SOAP API below is using integrated windows authentication. is it possible to apply integrated windows authentication on HTTP client call to SOAP API?

conn = Create soapconnection

          TRY

                 conn.Useintegratedwindowsauthentication( True)

          CATCH (Throwable x)

                   ls_error = x.GetMessage()

                   MessageBox( "EAS", "Error initializing web service call to Universal Coder." )

                   RETURN -1

          END TRY

 Thank you. Much appreciated.

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 28 November 2023 22:09 PM UTC
Hi David;

From the little that I know of your authentication "Use Case:" requirements .. I think that you might want to use the SetCredentials() command ...

https://docs.appeon.com/pb2022r2/powerscript_reference/setCredentials_func.html

HTH

Regards ...Chris
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 29 November 2023 00:22 AM UTC
The documentation Chris provided specifically points out that integrated windows authentication not supported for the HTTPClient.
  1. Helpful 1
  1. Logan Liu @Appeon
  2. Wednesday, 29 November 2023 09:19 AM UTC
Hi David,

Before the HttpClient object supports Windows authentication, could you use another supported authentication method? It usually depends on your Web Service.

If you have to use integrated Windows authentication, you can try some third-party HTTP Clients.

Such as ChilKat, refer to a similar topic here: https://community.appeon.com/index.php/qna/q-a/useintegratedwindowsauthentication-replacement-for-httpclient

If interested in .NET, you can also try the Calling the .NET Assembly feature (https://docs.appeon.com/pb2022r2/application_techniques/Calling_C_Assembly_in_an_Application.html) to leverage the other components from the .NET world.

Regards, Logan

  1. Helpful 2
There are no comments made yet.
David Pylatuk Accepted Answer Pending Moderation
  1. Tuesday, 28 November 2023 19:07 PM UTC
  2. PowerBuilder
  3. # 4

Much appreciated Chris,

 

Reading them over now. Thanks.

Comment
  1. Chris Pollach @Appeon
  2. Tuesday, 28 November 2023 20:55 PM UTC
You are most welcome!
  1. Helpful
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.