Hi,

I want to send input to a web service in JSON format. How can I send JSON? Also, How to pass JSON from one form to another?


Regards

Shobhun Shah 

https://www.outsystems.com/learn/courses/116/integrating-with-web-services/

Data is usually passed using JSON format in web service.

U can have data, and Outsystems create the json structure.

regards

Solution

Hi Shobhun,

OutSystems takes care of that for you. There is good training material that will help you achive your goal.

Consume rest api:

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Consume_REST_APIs/Consume_a_REST_API

Expose rest api:

https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Expose_REST_APIs/Expose_a_REST_API

Regards,

Daniel

Solution

Shobhun Shah wrote:

Hi,

I want to send input to a web service in JSON format. How can I send JSON? Also, How to pass JSON from one form to another?


Regards

Shobhun Shah 


Hi Shah


In OutSystems you have Json Serialize and json deserialize, in toolbox.

 Serialize used to concert dataset to json string

Deserialize used to convert json string to dataset.


hope this helps


thanks,

balasubramanian



In Data Tab,

Folder Structure,

Click Right Mouse Button then it will show up: create structure from json..

Financial Freedom wrote:

In Data Tab,

Folder Structure,

Click Right Mouse Button then it will show up: create structure from json..


Hi Financial,

Shah is looking for process the json data not to create structures with json, I believe he want send data to web service in json string, or he process with rest api.


 Thanks 

Balasubramanian 

Usually in web service, 

in my bank project, it is enough to create json structure for REST API.

regards

Balu Prakasam wrote:

Financial Freedom wrote:

In Data Tab,

Folder Structure,

Click Right Mouse Button then it will show up: create structure from json..


Hi Financial,

Shah is looking for process the json data not to create structures with json, I believe he want send data to web service in json string, or he process with rest api.


 Thanks 

Balasubramanian 


Yes, Bala!

I agree with you. I am looking for the process to send data to web service in JSON string.


Thanks 

Shah

yes,

# create json structure

# put your data

# just send it!

Shobhun Shah wrote:

Balu Prakasam wrote:

Financial Freedom wrote:

In Data Tab,

Folder Structure,

Click Right Mouse Button then it will show up: create structure from json..


Hi Financial,

Shah is looking for process the json data not to create structures with json, I believe he want send data to web service in json string, or he process with rest api.


 Thanks 

Balasubramanian 


Yes, Bala!

I agree with you. I am looking for the process to send data to web service in JSON string.


Thanks 

Shah


It’s simple, convert your dataset to json string with Json serialize and send to your web service.


if any let me know


thanks,

Balasubramanian

# Okay

# There are many solutions for 1 problem

# It is better you learn the course for best practise

Shobhun Shah wrote:

I agree with you. I am looking for the process to send data to web service in JSON string.

Hi Shobhun,

Daniël's answers is the right one: OutSystems automatically converts Structures to JSON when sending data to a remote REST service. In fact, if you want to consume a REST service, you can paste an example output into the pop-up for consuming a REST service, and Service Studio will generate the Structures for you. When you fill the Structures with data, then call the REST service with the Structure as input, the Platform automatically sends JSON. Please read the contents at the links Daniël provided, it will probably help you understand the process better.


Balu Prakasam wrote:

It’s simple, convert your dataset to json string with Json serialize and send to your web service.


if any let me know


Just to explained what i mean before, i assume that you are working with Soap Service and try process with JSON Data,  if its REST Service, go with Daniël's recommended articles.


Thanks,

Balu