Passing json value from text box to a service input in mashup
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Passing json value from text box to a service input in mashup
Hi Team,
we have a textBox1 in mashup and user enters a json. now we have a service testJson which has a parameter called Input1 with json type.
I am trying bind the text entered in the text box to the Input1. I am not getting any error but the binding is not happening.
If it is because of data type mismatch, please let me know how to get json input from mashup and bind it to json service input parameter.
Since we are using the testJson service in many place, we don't want to change the type of the service.
Can anybody suggest some helpful tips?
Thanks.
- Labels:
-
Connectivity
-
Extensions
-
Security
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi,
Textbox would have an output of string format, which is (as you assumed) why you cannot bind it to your service with the input parameter of type json. You may try creating a supplemental service that would convert the string to json and then bind it to your testJson service.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
As Polina suggested, I would change the data type of the service to a string and then you should be able to use the command var json = JSON.parse(inputParam).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi James, I believe their goal is not to change the input type of their main service (testJson), therefore I suggested implementing an intermediate service which would consume the string type from the textbox and feed json to the testJson service. Hope this makes sense.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Rdhakrishnan Kandasamy, hey did this answer help you at all? If so, you may want to try marking it correct to help other community users find the answers to their problems! Thanks!
