BIMserver icon indicating copy to clipboard operation
BIMserver copied to clipboard

Send data to a service and get a response

Open azOn2018 opened this issue 6 years ago • 4 comments

This is a basic question about the communication between a simple JavaScript frontend (a kind of based on bimview) and a service on the BIMserver. I'm using development environment i.e. I'm running this within Eclipse. Basically using the JavaScript bimserverclient I can call a service I have created and it works fine. However, I would like to send some user selected/provided data through the JavaScript front end to this service and then get the response which I can then display on the frontend. At the moment I am simply outputting the response from this service using System.out.println(""). What's the easiest way to do this?Is there a simple example which can assists me in achieving this?

azOn2018 avatar Nov 28 '18 16:11 azOn2018

Can anyone please comment on this as I have been stuck on this? Is it possible for plugins (e.g. one that extends ServicePlugin) to accept parameter values from an html/Javascript frontend and then create a response based on that which can be displayed on the frontend (e.g in an html table)? If that's possible then is there a similar example plugin you can mention? On the other hand, if that's not possible then what other options are available? I've seen your webpage on BimBot service which I'm trying to figure out, is that option able to do what I'm asking? Maybe the following will help in clarifying what I'm trying to do:

  • The idea is to create an external plugin bundle containing 3-4 plugins. For now they are internal services which are loaded in Arguments as -plugins "......" in Eclipse.
  • Using a frontend which I've been working on, these services can be called. I'm using bimserver JavaScript API and was able to add this as a Web module.
  • I can call the required internal service through the frontend but the output is displayed on the BIMserver console. I would like the user to provide some input data which I can pass to these services and then display the output on the web frontend. Using these internal services I can communicate to a local database containing some analysis data which I have created. Of course, once the data input/output requirement I have mentioned above is resolved, i'll then have to convert these internal services to external.

Note: I'm using BIMserver v1.5.103-SNAPSHOT which I run from within Eclipse. I have been thinking about upgrading to the latest version but a bit concerned that it may break what's currently is working.

Thanks

azOn2018 avatar Dec 13 '18 16:12 azOn2018

Further to my previous two comments about this issue above, I have been trying to use BimBot service approach and understand the input and output requirements based on extended data schema. Again this will come across as quite basic to you but to be quite honest, some explanation with simple example will help someone like me who is keen on using the BIMserver platform but struggling due to limited documentation. So how to i send data from an html form to a BimBot service and get a response back which can be displayed to web client? I know you have listed some extended data schemas but more examples and info on this particular issue plus explanation of how to create and define structure of a new extended data schema is needed. Thanks

azOn2018 avatar Dec 20 '18 15:12 azOn2018

hello azOn2018, Did you find a solution to your problem ? as i'm going to start digging around the serviceInterface, and having a response after i ask the server to execute some code on an ifc model is a minimum... at least to know if everything went well...

wisoo avatar May 09 '19 07:05 wisoo

Hi wisoo, No I didn't. I was hoping someone will respond to my query but that didn't happen.

azOn2018 avatar May 09 '19 09:05 azOn2018