简体   繁体   中英

server and delivery url for receiving http post request

My system needs to interact with a third party system to receive some alert information.

I need to setup a delivery url and build a receiver web app that will listen to http POST requests from the third party system which will contain this alert information in JSON format.

My system is based on Java. As per my understanding, i need to setup up a url like http://www.myexample.com:1111 which will be be a Java server program listening at a particular port number. But the example the third party has provided for the delivery url is of the format http://www.myexample.com:1111/testapp .

Can experts in this field guide me on how to go about developing the server for this particular need and how to decide on the delivery url which i need to provide to the third party?

i already have a Java Struts2 web application running on Apache Tomcat at the url http://www.myexample.com:8080

Take a look at THIS simple guide. You need only one REST method (GET), so you should add some more details to @RequestMapping annotation in GreetingController class, like:

@RequestMapping (value = "/greeting", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE) And that could work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM