Search found 46 matches

by bkromer
Mon Aug 03, 2020 10:11 pm
Forum: LEGACY scripting
Topic: DPD SOAP API
Replies: 9
Views: 424

Re: DPD SOAP API

Wow the node.js package is something I will give it a try but atm we have not updated our server. But we will in the near future. I would love to use http instead but I have no clue on how to get started. Lets say I create a http object and as URL i specifie the wsdl link. How should i send the XML ...
by bkromer
Sun Aug 02, 2020 2:46 pm
Forum: LEGACY scripting
Topic: DPD SOAP API
Replies: 9
Views: 424

Re: DPD SOAP API

Using SOAP is not that different. Instead of building a JSON you have to build an XML and post that and the result will of course also be XML and not JSON. That makes it sound easy, but unfortunately that is not always the case. There is usually a WSDL file (this is in XML) that describes everythin...
by bkromer
Wed Jul 22, 2020 10:29 am
Forum: Switch
Topic: Sending Printjobs to network printers
Replies: 9
Views: 389

Re: Sending Printjobs to network printers

Great thx. I also found a similar tool to ghostgum its called pdftoprinter http://www.columbia.edu/~em36/pdftoprinter.html. Sending print jobs to a printer via cmd is easy, there is no pdfreader poping up now its completely silent. But its also possible to define the amount of copies to print, the p...
by bkromer
Wed Jul 22, 2020 8:59 am
Forum: Switch
Topic: Sending Printjobs to network printers
Replies: 9
Views: 389

Re: Sending Printjobs to network printers

... Switch Setup: Application: C:/Program Files/Ghostgum/gsview/gsprint.exe Parameters: -noquery -color -all -printer "MyWindowsPrinter" "%1" ... Hey Ralf, can you describe that a little further. Are you starting the gsprint.exe from within Switch? An easy alternative if you are operating on window...
by bkromer
Fri Jul 17, 2020 2:47 pm
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 5
Views: 329

Re: Select a file from the beginning of a flow

Hmmm... :| But I run my script for every file which means It would handle the PDF and TXT file separately. So I will end up with 2 new entries in my database. function jobArrived( s : Switch, job : Job ) { var pdf = File.read( job.getPath(), "UTF-8" );// PDF Text einlesen function getSuppliers(){ va...
by bkromer
Fri Jul 17, 2020 1:36 pm
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 5
Views: 329

Re: Select a file from the beginning of a flow

okay, I have this PDF ARCHIV 48h trashcan in there, where all the incoming PDF are archived for 48 hours.
Is there a way to select the belonging PDF-file in the script, some job.get... function or similar?
by bkromer
Fri Jul 17, 2020 1:16 pm
Forum: LEGACY scripting
Topic: Select a file from the beginning of a flow
Replies: 5
Views: 329

Select a file from the beginning of a flow

Hello, I have this flow: Bildschirmfoto 2020-07-17 um 13.07.23.png In the Flow I get a PDF-File from Email convert it to text search with regex in the text. When I work with the File i always use File.read(job.getPath(), 'UTF-8'); wich gives me the incoming file wich is the txt-File. Now I also need...
by bkromer
Mon Jul 13, 2020 12:18 pm
Forum: LEGACY scripting
Topic: DPD SOAP API
Replies: 9
Views: 424

Re: DPD SOAP API

....The SOAP class was there long before the HTTP class and it is of course still there for compatibility reasons, but if you start from scratch forget about the SOAP class and go for the HTTP class. You are right. Let's try this with the HTTP class then. ...This being said, I was somewhat surprise...
by bkromer
Mon Jul 13, 2020 10:38 am
Forum: LEGACY scripting
Topic: DPD SOAP API
Replies: 9
Views: 424

DPD SOAP API

Hello, I try to understand how we can make requests to a SOAP API within Enfocus Switch. I want to test the DPD SOAP API https://esolutions.dpd.com/ they have a sandbox for testing purposes. https://forum.enfocus.com/download/file.php?mode=view&id=656 For those who don't know DPD is a famous Parcel ...
by bkromer
Fri Jul 10, 2020 3:35 pm
Forum: LEGACY scripting
Topic: How to easy API Call
Replies: 4
Views: 1967

Re: How to easy API Call

Now it works, had to add another Header there. :D "Accept":"application/json" Thanks a lot! function jobArrived( s : Switch, job : Job ) { var theHTTP = new HTTP( HTTP.SSL ); theHTTP.authScheme = HTTP.ProprietaryAuth; theHTTP.addHeader( "Authorization", "Bearer 123456"); theHTTP.addHeader("Accept","...
by bkromer
Fri Jul 10, 2020 2:49 pm
Forum: LEGACY scripting
Topic: How to easy API Call
Replies: 4
Views: 1967

Re: How to easy API Call

Thank you. Now it looks different. The error I get now is: HTTP GET request error: HTTP protocol error. 406 Not Acceptable. function jobArrived( s : Switch, job : Job ) { var theHTTP = new HTTP( HTTP.SSL ); theHTTP.authScheme = HTTP.ProprietaryAuth; theHTTP.addHeader( "Authorization", "Bearer 1234")...
by bkromer
Fri Jul 10, 2020 1:11 pm
Forum: LEGACY scripting
Topic: How to easy API Call
Replies: 4
Views: 1967

Re: How to easy API Call

I think I need to add a header with the bearer key instead of the theHTTP.authorization() method. In there Docs they say: "... Keyline requires API users to authenticate before they can access any information, and leverages a bearer token based authentication scheme to secure access. All valid reque...
by bkromer
Thu Jul 09, 2020 1:22 pm
Forum: LEGACY scripting
Topic: ninox API query Endpoint URI Encoding
Replies: 6
Views: 482

Re: ninox API query Endpoint URI Encoding

Today I had a meeting with a Ninox Developer. Here is the Solution. Maybe this helps somebody else too. :) function jobArrived( s : Switch, job : Job ) { var key = "asdasdasdasdasdadsadsasdasdad"; var url = "https://api.ninoxdb.de/v1/teams/asdadsadsads/databases/asdasdadsasdasdasd/query"; var query ...
by bkromer
Wed Jul 08, 2020 1:45 pm
Forum: Switch
Topic: Sending Printjobs to network printers
Replies: 9
Views: 389

Re: Sending Printjobs to network printers

jan_suhr wrote:
Wed Jul 08, 2020 1:39 pm
I suggest that you contact the App-creator for support.
https://www.apagoinc.com/
I did thanks.
by bkromer
Wed Jul 08, 2020 1:35 pm
Forum: Switch
Topic: Sending Printjobs to network printers
Replies: 9
Views: 389

Sending Printjobs to network printers

Hey there, I am currently testing the PDFPrinter APP we found at the Enfocus Appstore. The goal is to send incoming files to network printers. Office and Label printers. The Flow with the app looks like this: Bildschirmfoto 2020-07-08 um 13.29.00.png For some printers it works very well for some not...