Calling Server webservice from a form on a webpage
Thomas_Ott
RapidMiner Certified Analyst, RapidMiner Certified Expert, MemberPosts:1,761Unicorn
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!
Tagged:
0
Answers
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!
@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.
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).
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts
@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.
Scott
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.