1. John Niespodzianski
  2. PowerBuilder
  3. Wednesday, 1 August 2018 14:12 PM UTC

I didn't see it listed in the R3 documentation as being unavailable, so I attempted to use the new ImportJson() method in a PB 2017 .NET web service.  

The PowerScript compiles successfully, but when you attempt to deploy the target you get this error:

C0051: No overload for method 'importjson' takes '1' arguments.

I attempted to pass in different combinations of the optional arguments (up to all 9 total), and would always get the same error (with the '1' changing to the new # of arguments that passed).

Should this work in R3, or was it just missed in the docs?   I saw that other new features were explicitly marked as unavailable in .NET web services, so I'm just checking to see if this also falls under that umbrella.

Loving the new JSON and rest/httpclient features in R2 and R3 - they already have solved some important problems that 12.5 could not.  For an old dog, it's a lot of fun learning new PB tricks!

Thanks,

John

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 1 August 2018 14:50 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi John;

  The RESFul Client, JSON, Encryption, Encoding, etc new features of PB 2017 R2/R3 are only available for native PB Apps .. sorry.

Regards ... Chris

Comment
  1. John Niespodzianski
  2. Wednesday, 1 August 2018 14:55 PM UTC
Thanks Chris - that's what I suspected, but just wanted to be certain. Appreciate the prompt response!



John
  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 1 August 2018 14:39 PM UTC
  2. PowerBuilder
  3. # 1

Hi John;

  In order to use the new ImportJSON ( ) method, the JSON data stream must comply with the simple or better yet standard JSON format. If you use the ExportJSON ( ) method - the the JSON data stream will comply to these standards and the Import should work with this data stream. If you receive an external JSON data stream that does not comply with either of these JSON standards, the Import will probably fail.

  Here is my beta test example ...

ExportJSON (DWO to MLE)

ImportSON (MLE to DWO)

HTH

Regards ... Chris

Comment
  1. John Niespodzianski
  2. Wednesday, 1 August 2018 14:45 PM UTC
Hi Chris - thanks for the reply! My apologies if I wasn't clear.



I am able to use ImportJson/ExportJson successfully in a "regular" PB 2017 app, using the JSON formats as you've outlined.



The problem is when I attempt to use it in a PB 2017 .NET Web Service target application. When I attempt to deploy the project & create the .MSI installer, I get the error I outlined (even though the compiler is fine with it within the code).



Thanks,

John
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.