1
Off Topic / Re: Possible error in query logic?
« Last post by Susan Cryderman on Today at 10:54:18 AM »It looks like the query definition for the multi-line control is not quite correct. To use *win/email and *win/url the query for the multi-line control should be defined with Query Type of Query Program rather than Non-Query Logic.
There is documentation about these 'service' queries at:
https://manual.pvxplus.com/PXPLUS/NOMADS%20Graphical%20Application/Dictionary-Based%20Development/Query%20Subsystem/Service%20Queries%20for%20Web,%20Email%20and%20Map.htm
There is documentation about these 'service' queries at:
https://manual.pvxplus.com/PXPLUS/NOMADS%20Graphical%20Application/Dictionary-Based%20Development/Query%20Subsystem/Service%20Queries%20for%20Web,%20Email%20and%20Map.htm
2
Off Topic / Possible error in query logic?
« Last post by jhendrickx00 on May 19, 2024, 05:34:28 PM »Hi, when using the *win/url and *win/email programs I got an ERR=28, below are some screen caps; of course, VERY probably I'm making a mistake, below are the captures:
3
Nomads / Modifying Calendar query
« Last post by jhendrickx00 on May 19, 2024, 03:52:44 PM » Hi, perhaps the sunday afternoon is hitting me... but I can't figure out how modify NOMADS created calendar (this associated to a multi_line query), I think I can use the DEF DTE to translate the days names, but didn't work. Any generous soul could be pointing in the right heading? Also want to see if I can move the calendar panel (to be at the side of control, no below)...
Thanks!
Jean H//
Thanks!
Jean H//
4
Web Services / Re: Posting a File to a Web Service - > i got it to work
« Last post by Jeffrey Ferreira on May 18, 2024, 01:02:57 PM »Hi,
i got it to work with Stephane's helper class.
thank you so much.
at least the response said message queued and i'm pretty sure that means it worked.
i have to read thru Stephane's class now and figure out what on earth he did.
jeff
i got it to work with Stephane's helper class.
thank you so much.
at least the response said message queued and i'm pretty sure that means it worked.
i have to read thru Stephane's class now and figure out what on earth he did.
jeff
5
Web Services / Re: Posting a File to a Web Service
« Last post by Jeffrey Ferreira on May 18, 2024, 12:33:29 PM »Here is my curl command that worked
curl -k -H "Content-Type: multipart/form-data" -H "Authorization: Basic Base64Credentials" -F file[filename]=@s:\jeff\Cleary_Quote.xml -X POST https://staging.saberis.com:9000/api/v1/documents/modules/21/upload
i'm going to try adding in what Stephane said and see if that helps.
curl -k -H "Content-Type: multipart/form-data" -H "Authorization: Basic Base64Credentials" -F file[filename]=@s:\jeff\Cleary_Quote.xml -X POST https://staging.saberis.com:9000/api/v1/documents/modules/21/upload
i'm going to try adding in what Stephane said and see if that helps.
6
Web Services / Re: Posting a File to a Web Service
« Last post by Jeffrey Ferreira on May 18, 2024, 12:17:34 PM »Hi Mike, i tried your method...
of course i know i'm doing something wrong.
but i think it might have something to do with what Stephane said
the api says i have to reference a field name and a filename
Here is there sample post below.....maybe i have to try sending this filename somewhere..
i'm going to try and find my curl command that worked and attach.
POST /api/v1/documents/modules/17/upload HTTP/1.1
Host: {host}
Authorization: Basic [BASIC_ENCODED_LOGIN_INFORMATION]=
Cache-Control: no-cache
Content-Type:https://forum1.pvxplus.com/Themes/vVide/images/bbc/bold.gif multipart/form-data; boundary=----
WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filename"; filename="Paradigm.xml"
Content-Type: text/xml
------WebKitFormBoundary7MA4YWxkTrZu0gW--
of course i know i'm doing something wrong.
but i think it might have something to do with what Stephane said
the api says i have to reference a field name and a filename
Here is there sample post below.....maybe i have to try sending this filename somewhere..
i'm going to try and find my curl command that worked and attach.
POST /api/v1/documents/modules/17/upload HTTP/1.1
Host: {host}
Authorization: Basic [BASIC_ENCODED_LOGIN_INFORMATION]=
Cache-Control: no-cache
Content-Type:https://forum1.pvxplus.com/Themes/vVide/images/bbc/bold.gif multipart/form-data; boundary=----
WebKitFormBoundary7MA4YWxkTrZu0gW
------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="filename"; filename="Paradigm.xml"
Content-Type: text/xml
------WebKitFormBoundary7MA4YWxkTrZu0gW--
7
Webster Plus / Re: Retrieving calculated string from program to web page
« Last post by Mike King on May 18, 2024, 10:04:11 AM »When I was developing Webster+ I refined the logic and functionality based on the needs that came up in CATS demo application.
Once the basic design of Webster+ was done, I started with the demo application and as I ran into things that I felt could be done easier I added functionality to Webster+ and also worked with the development team to add functionality to the File Maintenance Generator to make application development faster and easier.
There are a lot of things that you can do in Webster+, many of which are incorporated in the Webster toolkit and the CATS demo application which is a good place to see what's possible.
Once the basic design of Webster+ was done, I started with the demo application and as I ran into things that I felt could be done easier I added functionality to Webster+ and also worked with the development team to add functionality to the File Maintenance Generator to make application development faster and easier.
There are a lot of things that you can do in Webster+, many of which are incorporated in the Webster toolkit and the CATS demo application which is a good place to see what's possible.
8
Web Services / Re: Posting a File to a Web Service
« Last post by Mike King on May 18, 2024, 09:51:16 AM »Jeff,
There is a utility built into PxPlus that will load a variable with the contents of a file: *tools/readfile.
https://manual.pvxplus.com/PXPLUS/utilities/readfile.htm
Given this all you need to do is change line 100 in your code to something like:
0100 call "*tools/readfile", "Cleary_Quote.xml", Body$
There is a utility built into PxPlus that will load a variable with the contents of a file: *tools/readfile.
https://manual.pvxplus.com/PXPLUS/utilities/readfile.htm
Given this all you need to do is change line 100 in your code to something like:
0100 call "*tools/readfile", "Cleary_Quote.xml", Body$
9
Web Services / Re: Posting a File to a Web Service
« Last post by Stéphane Devouard on May 18, 2024, 03:47:31 AM »Jeff
Attached is the PVX helper class I use to upload files to APIs
Use it like this :
The file_content$ variable should be loaded with a binary read of the file
Hope this helps
Attached is the PVX helper class I use to upload files to APIs
Use it like this :
Code: [Select]
field_name$="Name of the form field the webservice is waiting for"
file_name$="Name of the file to upload : this will be the value of the form field above"
file_content$="File content"
file_mime_type$="MIME type of the file to upload, application/octet-stream by default"
upload=new("http.upload",field_name$,file_name$,file_content$,file_mime_type$)
! // use upload'content_type$ as mime_type in the *plus/web/request
! // use upload'body$() as body in the *plus/web/request
The file_content$ variable should be loaded with a binary read of the file
Code: [Select]
open (hfn,isz=-1) file_name$
file_content$ = rcd(lfo,siz=10000000)
Hope this helps
10
Web Services / Posting a File to a Web Service
« Last post by Jeffrey Ferreira on May 17, 2024, 09:47:02 PM »Hi List,
in the past i could never get *plus/web/request work with uploading a file.
i can get it to work in postman, curl and powershell....but i cannot get syntax right in pxplus
i'm referring to line 100 .
does anyone know what i'm doing wrong or has used *plus/web/request to post/upload file
i dont want to use a 3rd party utility if i can help it
0040 let RAW_CREDENTIALS$="username:password"
0050 call "*web/base64;ENCODE_STR",RAW_CREDENTIALS$,BASE64_CREDENTIALS$
0060 let EXTRA_HEADERS$="Authorization: Basic "+BASE64_CREDENTIALS$
0070 let MIME_TYPE$="multipart/form-data"
0080 let URI$="https://staging.saberis.com:9000/api/v1/documents/modules/21/upload"
0100 let BODY$="filename=Cleary_Quote.xml"
0110 call "*plus/web/request",URI$,BODY$,RESPONSE$,RESPONSE_HEADER$,MIME_TYPE$,"",EXTRA_HEADERS$
thanks
jeff
in the past i could never get *plus/web/request work with uploading a file.
i can get it to work in postman, curl and powershell....but i cannot get syntax right in pxplus
i'm referring to line 100 .
does anyone know what i'm doing wrong or has used *plus/web/request to post/upload file
i dont want to use a 3rd party utility if i can help it
0040 let RAW_CREDENTIALS$="username:password"
0050 call "*web/base64;ENCODE_STR",RAW_CREDENTIALS$,BASE64_CREDENTIALS$
0060 let EXTRA_HEADERS$="Authorization: Basic "+BASE64_CREDENTIALS$
0070 let MIME_TYPE$="multipart/form-data"
0080 let URI$="https://staging.saberis.com:9000/api/v1/documents/modules/21/upload"
0100 let BODY$="filename=Cleary_Quote.xml"
0110 call "*plus/web/request",URI$,BODY$,RESPONSE$,RESPONSE_HEADER$,MIME_TYPE$,"",EXTRA_HEADERS$
thanks
jeff