1. Chad Edwards
  2. PowerBuilder
  3. Thursday, 19 April 2018 21:09 PM UTC

I am working on an application that is currently running in PB 12.0. We are wanting to migrate it to PB 2017 R2. The code migration was easy enough, but when I run the application any web service that I call that has values that are of data type "double" does not get those values. Instead those items in my result structure are set to NULL.

I created a new web service in .Net that returns a class with three properties: two doubles and a string. The then created a simple PB test class to call that service. When the service is called the result structure has the string value populated, but the two double values are set to NULL instead of the values that were hard coded in the test service.

Has anyone else ran into this? Is this a known issue?

Thanks.

Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Friday, 20 April 2018 14:04 PM UTC
  2. PowerBuilder
  3. # 1

Hi Chad;

   Were these the same web services that you were calling in PB 12?

If so, did you rebuild all your proxies after the migration?

Regards ... Chris

Comment
  1. Chad Edwards
  2. Friday, 20 April 2018 21:31 PM UTC
.

  1. Helpful
  1. Chad Edwards
  2. Monday, 23 April 2018 18:29 PM UTC
.

  1. Helpful
There are no comments made yet.
Chad Edwards Accepted Answer Pending Moderation
  1. Monday, 23 April 2018 18:28 PM UTC
  2. PowerBuilder
  3. # 2

They are the same web services. I did try rebuilding the proxies and it didn't change anything. That is when I created the new test web service and added a call to that service into my PB code, with the applicable creation of a new proxy. It showed the exact same behavior. Any value that is of data type double ends up as null in the PB structure. I turned on SOAP logging in the PB app and can see the proper value getting returned by the service in the log file.

Comment
There are no comments made yet.
eyal hadad Accepted Answer Pending Moderation
  1. Thursday, 5 March 2020 06:25 AM UTC
  2. PowerBuilder
  3. # 3

Hi,

I'm facing something like your problem.

calling to a web service that is an EasySoap engine , and he should return a structure that have a few properties and all of them are returning with null value.

I check with the developer of the web service and he said that the are returning fine.

He created a small wcf test window and checked the values and they all return OK.

any suggestion for this issue ? 

Thank you,

Eyal

 

This is how the answer look like...

 

Comment
  1. Chris Pollach @Appeon
  2. Thursday, 5 March 2020 21:23 PM UTC
Hi Eyal;

I suspect that your issue might be around the fact that you are passing an *object* class reference (in this case PowerObject) data type. To which to PB native App's is an O/S Pointer / Handle. This is *not* a supported data type in XML and thus, an issue for EasySoap for sure.

You can try using the .NET SOAP engine in PB instead of EASYSoap. In that case, replace your "pbsoapclient190.pbd" library with the "pbwsclient190.pbd" .Net SOAP flavour.

PS: Don't forget to then also regenerate your WS "Proxies".

I suspect that WCF is just interpreting this as an Int32 (aka uLong in PB) and does not error. But, that's WCF's approach and not normal XML expectations - which are only "simple" data types.

Regards ... Chris
  1. Helpful
  1. Kevin Ridley
  2. Friday, 6 March 2020 14:01 PM UTC
@Eyal - what version of PB are you using? Not sure why anyone wouldn't try the .NET engine for SOAP if they were having trouble with EasySOAP. The .NET engine is old and only really there for backwards compatibility. It hasn't been upgraded in probably at least 6-10 years BUT the EasySOAP engine is ANCIENT! It was replaced by the .NET engine I don't even know how many years ago, and again kept for backwards compatibility. Both SOAP engines have had issues with certain datatypes, especially the new datetime format. If you are using PB2017 or higher, you can use the HTTPClient. The only disadvantage to that is that you have to parse the XML yourself, but it's much cleaner because it returns xml strings, so there's no datatype issues.
  1. Helpful
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Thursday, 5 March 2020 12:26 PM UTC
  2. PowerBuilder
  3. # 4

EasySoap engine is extremely old and has not been updated or received bug fixes in many years.  Can you reproduce the problem using the new HTTPClient object: https://community.appeon.com/index.php/articles-blogs/tutorials-articles/2-powerbuilder/236-call-soap-web-services-using-httpclient-object

Comment
  1. David Peace
  2. Thursday, 5 March 2020 16:17 PM UTC
Also, you say you are using PB2017R2, is there a reason for not using PB2017R3? Certainly we have found the HTTPClient to be easy to use for web service calls.
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Thursday, 5 March 2020 21:13 PM UTC
  2. PowerBuilder
  3. # 5

Hi Chad;

  It could be due to the fact that ... a PB "Double" is really an XML "Float" data type and that this mapping is not being done correctly between the WS and the PB Client.

  Have you tried replacing the Double with either a Decimal, Long or LongLong data type instead in your returned data definition?

Regards ... Chris

Comment
There are no comments made yet.
Kevin Ridley Accepted Answer Pending Moderation
  1. Friday, 6 March 2020 14:09 PM UTC
  2. PowerBuilder
  3. # 6

Chad,

 I don't see where you mentioned if you are using the EasySOAP or .NET engine to consume your WSDL and generate proxies.  If you are using EasySOAP, try the .NET engine and rebuild your proxies.  Since it sounds like you can control the service itself, worse case scenario, you can always have it return a string if need be, and you can convert it to double in your code.  Once you move up to PB2017 or 2019 (if you haven't migrated yet, why wouldn't you move to the current instead of 2017 R2?) you can use the HTTPClient as others have said.  It will return XML, so you won't have issues with datatypes, but you will have to parse the XML.  Please see my reply to Eyal on the age of EasySOAP and .NET engines.  Appeon has moved forward with the HTTPClient as the default to handle SOAP and will not be enhancing EasySOAP or .NET engines for SOAP.

Comment
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.