Traditional Culture Encyclopedia - Weather inquiry - How to add a reference to webservice and publish it to the server?
How to add a reference to webservice and publish it to the server?
Add a reference to the webservice and publish it to the server:
1. Select file->; New-> Project.
2. Select the console application in the project and rename the project as WebServiceTest.
3. Right-click the item and select Add-> Service reference.
4. Enter the WebServie link address in the address bar and press Enter, then rename the service name to ServiceGetWeather, and click OK to view the service application added in the code.
5. Then add the following code to the code, call the webservice, get the data returned by the interface, and present it.
6. The interface returns data in xml format, and the weather forecast of China and Beijing can be obtained with little parsing.
- Previous article:Prose of warm sunshine in spring
- Next article:Guizhou is the most suitable city for a day trip. How to plan the tour order?
- Related articles
- Summary of fire safety production work
- What is the fate of the energetic girl?
- When is the typhoon season in Japan? Which month has the most typhoons in Japan?
- There is a mountain in Weiyuan, three feet from the sky.
- The weather in Tiggo Gate
- Wear it when the weather is cool.
- How about Zongyang Qianqiao Chaoyang Kindergarten?
- What is the reason for the sharp rise of soybean oil price in March 2008?
- Why does the weather forecast report the temperature from high to low?
- Recommendations for the best scenic spots for self-driving tours around Guilin in autumn, 5 guides to the beautiful scenery of ancient villages around Guilin