1. Kevin Moore
  2. PowerBuilder
  3. Wednesday, 2 November 2022 19:42 PM UTC

We are migrating our pb applications to PB 2021 from PB 11.5. WE have 8-10 web applications that are being called from the pb 11.5 code base. In 11.5 we used the Web Service Proxy project to call our web services using SoapConnection (using pbwsclient115.dll). Since this is now obsolete in 2021 I assume we will need to use httpclient from object pbsoapclient.dll. I’ve reviewed the doc ‘https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/236-call-soap-web-services-using-httpclient-object’ and created the referenced webservice ‘Add’ to add two numbers together.

Our apps are configured with one or more client machines pointed to an app server which contains the iis applications. Using the sample code for the web service and pb code I’m only able to successfully call the ‘Add’ web service method if the call is being made on that same machine the web service is on. When I attempt the ‘Add’ call from a different machine I always get an ‘Internal Server Error’ and the text points to ‘/Add’ part of the url (ls_url ='http://azstdevpb1/WebService/WebService.asmx/Add'). Is there any sample code to successfully call this method when it is being served from an app server. Most of the time our customers will not be on the machine that hosts the web services.

I’ve also noticed that although the web server proxy is now obsolete all of our pb code calls that were migrated to 2021 pb work in the IDE with newly generated proxies in pb2021. However, when our applications are built we’ve seen the first x amount (20-30) web service calls be successful. After a certain threshold or something else I’ve been unable to identify yet the next web service call crashes our app and it points to PBVM.dll. I know this is obsolete but I’m wondering if anything sounds familiar to anyone.

Thanks.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 2 November 2022 20:18 PM UTC
  2. PowerBuilder
  3. # 1

Hi Kevin;

  After you migrated the App to PB2021, did you ....

  1. Remove any and all SOAP objects from your migrated PB2021 App?
  2. Replace the pbwsclient115.PBD library with the new one -  pbwsclient.PBD?
  3. After steps #1 & #2, perform a full rebuild of your PB App?

Regards ... Chris

Comment
  1. Kevin Moore
  2. Thursday, 3 November 2022 15:49 PM UTC
Chris,



I've actually migrated the apps a few times to see if Ican identify any differences. The last two times I've migrated I used different procedures. the two procedures I used were:



A)

1) open workspace and target in PB 2021.

2) get message like 'an object isn't compatible with migration'.  I removed pbwsclient115.pbd from target

3) migrate app

4) Full build performed on app



B)

1) open workspace and target in PB 2021.

2) get message like 'an object isn't compatible with migration'.  I replaced pbwsclient115.pbd with pbwsclient.pbd in target

3) migrate app



Kevin

  1. Helpful
  1. Chris Pollach @Appeon
  2. Thursday, 3 November 2022 17:12 PM UTC
Hi Kevin;

Migration procedure "B" is the proper way.

Migration procedure "A" should have failed on the Full Build. If not, there are old SOAP objects in your PB App's PBL libraries



Note: Both in Procedure A& B, you need to check & remove any SOAP based objects from your existing PB App PBLs (if any) before starting step#1.

Regards ... Chris
  1. Helpful
There are no comments made yet.
Mark Lee @Appeon Accepted Answer Pending Moderation
  1. Thursday, 3 November 2022 08:36 AM UTC
  2. PowerBuilder
  3. # 2

Hi Kevin,

 

For the "Internal Server Error" issue, is this different machine using different IE proxy settings?

Please check if you have enabled proxy settings for accessing this URL?

If you have enabled it, please try to uncheck Automatically detect settings in local Area Network (LAN) settings  

You can refer to the following link for details.

https://www.appeon.com/developers/get-help/knowledgebase/httpclient-not-working-some-machine-same-network.html

 

Another resolution is as described in the "Call SOAP Web Services Using HTTPClient Object" Tech Article:

Use a third party tool like Postman to verify what protocol and arguments you need to use to successfully call the Web service API in your different machine.

 

For "After a certain threshold or something else I’ve been unable to identify yet the next web service call crashes our app and it points to PBVM.dll." issue, can you always reproduce this problem? Can you locate the specific API that crashes or add messagebox to locate the problematic code? Also, please make sure you have installed this .NET msi package and then add its path to the System Path variables of Windows.

 

Regards,

Comment
  1. Mark Lee @Appeon
  2. Monday, 7 November 2022 03:36 AM UTC
Hi Kevin,



For your question: “The same web service request from client machine two, to machine one could potentially use a different protocol and argument list. Is this true?”

Yes, you can refer to the following link for the detail.

https://www.appeon.com/httpclient-restclient-cannot-connect-tls1.0-server

https://community.appeon.com/index.php/qna/q-a/httpclient-restclient-to-old-internal-tls1-0-server

If the current Web API only supports TLS1.0 and your client A support it too, then the call to the API will work. But if your client B doesn't support this protocol or has some other restrictions on accessing this API, then you will have the issue.



BTW, you can also Google some other solutions online:

http://net-informations.com/q/mis/500.html



For the other issue, I mean to suggest you install the PowerBuilder .NET Components generated using the PowerBuilder Runtime Packager:

If you are now using PB2017R3 or higher, the .Net install MSI has been removed. Here is how to get it back (it's actually still there) ...

1) Create a PBPack.INI file in the "C:\Program Files (x86)\Appeon\Shared\PowerBuilder" folder

2) Add the following to the INI file ...

[Packager]

DotNetComponents=1



3) Start the PB Packager utility and you should now see the ".Net Component" installation.

4) Create the .Net MSI & run this on the new IIS machine where there is no PB installed.

https://community.appeon.com/index.php/qna/q-a/net-web-service-error-on-sybase-powerbuilder-interop



Regards,

  1. Helpful
  1. Andreas Mykonios
  2. Monday, 7 November 2022 10:15 AM UTC
These pbpack.ini trick works up to PB 2021... For PB 2022 it doesn't (which is normal as .NET Web Services and .NET assembly were removed). Simply a note to the statement "If you are now using PB2017R3 or higher, the .Net install MSI has been removed. Here is how to get it back (it's actually still there) ..."

Andreas.
  1. Helpful 1
  1. Mark Lee @Appeon
  2. Tuesday, 8 November 2022 02:02 AM UTC
Hi Andreas,



Thanks for catching that. You are right. The pbpack.ini only works for PB 2017 R3 to PB 2021.



Regards,

  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.