Calling Server webservice from a form on a webpage

Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn
edited December 2018 inHelp

Hi Community,

I need to create a webpage that has a form with one entry field. The end user would enter a value in the form and hit a web button on the page. Then from there it would call a Server webservice using the value as URL Parameter, pass it, score, and send the results back to the web page.

Has anyone in the Community done something like this? Is there a sample you can share. My thought is that it will require javascript and possible a response back from the Server as XML or JSON. Looking for any help or a point in the right direction.

Thanks!

Answers

  • SGolbertSGolbert RapidMiner Certified Analyst, MemberPosts:344Unicorn

    Hi Thomas,

    I think you are refering to ajax:

    https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Client-side_web_APIs/Fetching_data

    I haven't done it yet, but in principle the only problem would be the authentification of the web service. We somehow discussed that in my last server post.

    I hope it helps!

    sgenzer
  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn

    @SGolbertThanks for this link, I'm going to study this.

    W.R.T. to your authentication problem, was that not solved by setting it as an 'anonymous' user? I remember reading that somewhere.

  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,635Unicorn

    Interesting problem. You could of course do this as a simple web app on RapidMiner Server itself (entry field with a button to trigger a process to return a scored record or other data). Based on your requirements, is that not an acceptable solution? That component could even be framed by an external web page, I believe (as long as the service and the web app were configured for anonymous access).

    Brian T.
    Lindon Ventures
    Data Science Consulting from Certified RapidMiner Experts
  • Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn

    @Telcontar120The idea is for the end user to enter a value and then have webservice spit back a response and generate graphs (maybe via D3js!!) & stuff on the fly, so@SGolbert's lead to use AJAX is probably the way to do it on the front end. The goal is to have a modern web interface that's mobile optimized, so Server dashboarding is not the way to go here.

  • SGolbertSGolbert RapidMiner Certified Analyst, MemberPosts:344Unicorn


    any update on this appliance? I want to learn how to do something similar, although I don't need it right now. I had the idea of exporting the data to plot.ly or Google Charts for more flexible charts.

    BTW The charts in the Server 9.2 seem to have changed a little, but they are still hardly customizable.

    Regards,
    Sebastian

  • sgenzersgenzer Administrator, Moderator, Employee, RapidMiner Certified Analyst, Community Manager, Member, University Professor, PM ModeratorPosts:2,959Community Manager
    @SGolbertso funny you should mention this - there was just some discussion about this yesterday internally here at RapidMiner. I'm going to cc@Marco_Boeck这是他可以kely give you better information.

    Scott

  • MarcoBarradasMarcoBarradas Administrator, Employee, RapidMiner Certified Analyst, MemberPosts:270Unicorn
    @Marco_Boeck,@sgenzerand@Thomas_Ott
    We have done things like this on a daily basis. Some of our dashboard are created by RM but exposed through other software.
    You can expose the response and can protect it with a user that is set as service.

    On the front your solution will call the webservice through a Curl call and you may get the HTML, JSON or XML depending on what you may want to use.

    Best Regards.
Sign InorRegisterto comment.