Rest ful WebService

Regarding restful Webservice, I have been researching recently!
First you have to write a server! Then run as on server Then your webservice server is released! To verify whether the release is successful, you can add the interface name of the webservice after the address bar, and then add ?_wadl to see if there is a corresponding file!


Writing restful webservice has to be configured in the application.xml file! There are also configuration in the web.xml file!

After publishing the interface! Client can be written! Clients generally use WebClient to call the create interface!
After creating the interface, you can .post(); push data to the server! or .get() to get data from the server! There are other ways to wait!

Usually write a system.output.println() statement in the interface implementation class of the server, and you can see whether the data you post on the client has been transmitted to the server! If it is transmitted to the server, the corresponding data will be printed in the console!


In fact, this thing has a lot in common with HTTP requests!

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326675828&siteId=291194637