can a third party software call a .js page and also pass an xml file to it

  • 0
  • 1
  • Question
  • Updated 4 years ago
  • Answered

Hi Community folks.

I have a requirement where a third party software (basically a Java based middleware ) wants to call a web service or an API of an quick base to pass data. Since QuickBase doesn't host web service the only equivalent option is to call an Quickbase API (e.g. API_AddRecord). The issue in calling API_AddRecord is that it will take care of simple scenario where  i can pass data to one table.

In case of complex scenarios, where the xml with Middleware is a complex structure, i would like to parse and add the record it in multiple tables, hence i was wondering how i can achieve this ? 

if the middleware can call quickbase javascript (.js) page and pass it an xml than i can parse and handle that complex XML 

Would appreciate, if someone has any ideas or suggestions in this regards.

Thanks a lot

Dinesh

Photo of Dinesh

Dinesh

  • 202 Points 100 badge 2x thumb

Posted 4 years ago

  • 0
  • 1
Photo of Josiah

Josiah

  • 0 Points
Are you not able to do the parsing locally?
Photo of Dinesh

Dinesh

  • 202 Points 100 badge 2x thumb
No.
The requirement is to have a third party server makes a http call to a quick base server / db over  http protocol with the payload being a XML file which needs to be parsed @ quickbase server / db end.
Is this possible and if so how?
regards
dinesh
Photo of Josiah

Josiah

  • 0 Points
No, this can not be done in the way you want.

If you really want the parsing to be done on the server side you must use some kind of server, with its own APIs. A JS file hosted on Quickbase will not accomplish that. It is simply storing the file for you, and if you ever use it the code will be parsed and run locally.

If I were in your situation I would simply write a library that takes the inputs, does the parsing, and then sends the relevant QB API calls. Sure it will be local, but that's not really an issue if you do it off the main thread. If you take this approach, realize then you could use a hosted .js file, but I don't see a reason to do that. C++ or even Python would be much faster than JS for parsing XML.

If you really need it to be all on the server side, you're going to have to get your own server and setup some web service.
Photo of Dinesh

Dinesh

  • 202 Points 100 badge 2x thumb
Thanks for showing the path. Would you know off some open source / library which I can customize to meet my requirements. Can node.js do this for me ...assuming I host it somewhere on my network which in turn calls relevant Quickbase api to store data .
Thanks
Dinesh