PxPlus User Forum

Twitter Twitter Twitter

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - James Zukowski

Pages: 1 2 [3] 4 5 ... 21
31
Web Services / Re: REST problems
« on: September 27, 2023, 01:45:03 PM »
Here's the setup (website name changed, but path still there):

Code: [Select]
url$="https://example.com/oauth2/vn/token"
!
postdata$="{"
postdata$+=$0D0A$+"  "+quo+"client_id"+quo+": "+quo+clientID$+quo+","
postdata$+=$0D0A$+"  "+quo+"grant_type"+quo+": "+quo+"client_credentials"+quo+","
postdata$+=$0D0A$+"  "+quo+"scopes"+quo+": "+quo+"urn:tr:onesource:auth:api:IndirectTaxDetermination"+quo+","
postdata$+=$0D0A$+"  "+quo+"client_secret"+quo+": "+quo+clientSecret$+quo
postdata$+=$0D0A$+"}"
!
mimetype$="application/json"
extrahdrs$="Accept: application/json"
!
CALL "*plus/web/request",url$,postdata$,recvdata$,recvhdr$,mimetype$,"",extrahdrs$

I've tried with mimetype$="application/x-www-form-urlencoded". I've tried with and without the extrahdrs$.

We took the variable contents and fed that into the curl, and it worked fine.

All I can figure is that the full path (through /token) needs to be opened on the [TCP] connection, not just the domain (example.com). That doesn't seem to be available with PxPlus, unless I'm not doing something right (which is quite possible).

Thanks for the help!

32
Web Services / REST problems
« on: September 27, 2023, 10:44:08 AM »
I've been wracking my brain trying to figure out what's going on, with only minor insights. It doesn't help that I don't really have any REST interfacing experience.

We're trying to connect with a service for address validations. There are two steps involved: (1) Get an oauth2 token from them, then (2) submit the actual request using the token. I haven't been able to get to step 2 because of failures in step 1.

Working with someone else in the company, we were able to get a curl command to work:

Code: [Select]
curl --location 'https://example.com/oauth2/vn/token' --header 'Content-Type: application/json' --data '{ "client_id": "xxxxxxxxxxxx", "grant_type": "client_credentials", "scopes": "urn:tr:onesource:auth:api:IndirectTaxDetermination", "client_secret": "xxxxxxxxxxx" }' > /tmp/result.txt
But running the related information through the *plus/web/request, I was ALWAYS receiving a 400 error in response. (Actually, I had to make some adjustments, since it always added ";secure" to the OPEN, and that generated a PxPlus error.) Apparently, we need to be able to submit the request down at the "token" page level, but the *plus/web/request breaks that up, and PxPlus won't accept a filename beyond the primary site (.com).

I would like to keep all of the programming within PxPlus, but if I need to curl things to get them to work, it's what I'll have to do. Any suggestions would be greatly appreciated.

Currently running v15 (2018) with WindX on Linux.

33
Off Topic / OneSource Integration
« on: September 19, 2023, 01:13:22 PM »
Hi All!
Has anyone had any experience interfacing PxPlus with Thomson Reuters OneSource for Address Validation? I've been stumbling a little and was wondering if anyone has any pointers.

Thanks in advance!

34
Off Topic / Re: New Posts on the Forum
« on: September 05, 2023, 03:40:26 PM »
I've attached the message for your reference.

35
Off Topic / New Posts on the Forum
« on: September 05, 2023, 03:34:10 PM »
It seems that when we try to post a new topic on the Forum, it takes quite a while before an error is returned that isn't really an error. The message actually gets posted but the error message says not. As a result, several people (including myself early on) have posted the topic again, only to find it creates a second entry.

Is there any way to get this cleared up?

36
Language / Re: 'DROP' mnemonic with ERR= clause
« on: September 05, 2023, 03:16:45 PM »
Thanks. Just surprised it's not a syntax error.

37
Language / 'DROP' mnemonic with ERR= clause
« on: September 05, 2023, 12:04:38 PM »
Is including an ERR= clause in the 'DROP' mnemonic a valid construct? e.g.:
print 'drop'(Win_Num,err=*next),
It doesn't generate an error, but it also doesn't seem to trap error #57 if the specified (non-zero) window# doesn't exist.
Any insights?

38
Language / Re: 'picutre' mnemonic
« on: August 09, 2023, 03:37:30 PM »
If I recall correctly, the 'picture' mnemonic requires the image to be on the local computer. So, if you're using WindX (as we are), you don't need to include the [WDX] or [LCL] prefixing, just the path to the image file. Ours reside in *bmp/

39
Programming / Re: update global functions at runtime
« on: August 07, 2023, 09:55:03 AM »
At a prior job, we occasionally updated the global functions, as well. If I recall, we PERFORMed the program with the functions. Whenever we set the functions, we also set a couple of global variables to the program's creation date/time, so we only reset them if the program was updated.

There was no need to DROP or ADDR, as PxPlus dealt with that automatically. The new versions of the functions would take effect immediately upon return to the caller.

Caveat: We were using Linux, not Windows, for our server. I don't think it should make a difference, though. Then again, it's Windows...

40
Web Services / Google Maps
« on: July 13, 2023, 05:49:11 PM »
It seems that the Google Maps object is only usable within Nomads. We're looking into using the GeoCode functionality to verify addresses being entered in various application programs. Is there a way to do that with the current object? Is there something else we can use? Do we need to develop something ourselves?

Thanks!

41
Thin Client/WindX / Re: Server to Windx failure
« on: July 05, 2023, 02:36:04 PM »
Just to confirm: After the drop, there's an empty file on the user's PC, correct?

42
Nomads / Re: Popup menu missing the target
« on: June 29, 2023, 11:53:30 AM »
Mike,
Thanks for the suggestion. It worked just fine the first time. After that, however, the popup was popping up all over creation; other monitor, above/below the window, nowhere to be seen at all but still active.

For the time being, I'm including a calculation fudge factor, but any other suggestions would be warmly welcomed.

43
Nomads / Popup menu missing the target
« on: June 28, 2023, 05:40:29 PM »
We've got a F/M panel with a menu bar, TitleBar, and 7-tab folder. I'm trying to have a popup menu with variable file-driven data appear in most situations when the user tabs out of a specific field. I've got most of the positioning down, but while the control's 'Col and 'Line positions seem to reflect the accurate position relative to the window, when we apply those coordinates to the popup_menu directive, they seem to try to position the popup relative to the folder's sub-panel. As a result, the popup appear several lines below the control it's supposed to be associated with. I've been able to compensate a bit by subtracting the sub-panel's 'Col and 'Line positions, but that doesn't seem to take into account the TitleBar or menu bar.

Is this a problem with the window building process, or do I need to do these compensations, and how do I determine the heights of the bars?

Thanks in advance!

44
Programming / Re: Create/Update Excel Workbook
« on: June 26, 2023, 09:00:52 AM »
That would be "LV" - as in <L>ist <V>ariables - to list the variable names.
Use DUMP to display their contents, or SD (<S>earch <D>ump) for more specific info. See the manual for details.

45
Programming / Re: Create/Update Excel Workbook
« on: June 09, 2023, 11:05:31 AM »
From command mode, print SSN
The first 4 digits are the version number; 2 digits major, 2 digits minor

Pages: 1 2 [3] 4 5 ... 21