I have an IS service that takes 2 input parameters. The IS service then passes the input parameters to a database query. The output of the query feeds my Mash Zone app.
The 2 input parameters are input boxes entered by the business users on my Mash Apps. How can I pass the 2 input parameters to my IS service? I use XML file to create the data feed for the output of my IS service.
I tried to use the Create URL, parameters to pass the user input value but not sure if that is the right way. The problem also is that without any default value I cannot click on "Configure Columns".
Please advise on how to pass user inputs to backend IS services.
Many thanks in advance.
Marko Görg on
Hi Min Chai,
I have evaluated a practical way to use an IS service as an MashZone data feed. There are two main issues:
1. How to send input values to IS service?
2. What is the format of the IS response?
First, you have developed a IS service like dev.mg:getDatafeed doing some processing:
As you only use simple string input, you are able to invoke the service via HTTP GET and pass the input parameter via tagged values (?KEY=VALUE&). Example:
http://localhost:5555/invoke/dev.mg/getDatafeed?myInValue1=abc&myInValue2=123
Second, your service needs to return pure XML output. I recommend using output templates in the shown way:
Hit the Button “New…” in the properties tab. Depending on your output you choose a simple xml format. Make sure that your xml is well formed and contains your output values (inserted using template commands %loop ...% and %value …%).
Example:
Now, testing your IS service in a browser your request
http://localhost:5555/invoke/dev.mg/getDatafeed?myInValue1=abc&myInValue2=123
will return a xml output (that’s what you need to process in DataFeed)
Back to MashZone you simply add a data feed looks like
As access to IS Service is protected by HTTP Basic Authentication you need to add some securities in the data feed.
Hope this will help you starting.
Regards,
Marko