Yêu cầu của bạn có thể là một cái gì đó như:
POST /WeatherWS/Weather.asmx/GetCityWeatherByZIP HTTP/1.1
Host: wsf.cdyne.com
Cache-Control: no-cache
Postman-Token: e5bc46a4-71ac-f357-78a7-c4b4de894afb
Content-Type: application/x-www-form-urlencoded
ZIP=90210
Và câu trả lời sẽ là:
<?xml version="1.0" encoding="utf-8"?>
<WeatherReturn xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://ws.cdyne.com/WeatherWS/">
<Success>true</Success>
<ResponseText>City Found</ResponseText>
<State>CA</State>
<City>Beverly Hills</City>
<WeatherStationCity>Van Nuys</WeatherStationCity>
<WeatherID>4</WeatherID>
<Description>Sunny</Description>
<Temperature>68</Temperature>
<RelativeHumidity>54</RelativeHumidity>
<Wind>CALM</Wind>
<Pressure>29.89R</Pressure>
<Visibility />
<WindChill />
<Remarks />
</WeatherReturn>
Nguồn
2015-06-08 11:30:13
Tôi không hiểu câu hỏi. Bạn muốn gọi các phương thức trong ws mà không cần viết một ứng dụng khách? Bạn không thể làm điều đó bằng cách sử dụng một trình duyệt hoặc thậm chí có thể cuộn tròn? – Birger
Hãy xem bài đăng này http://stackoverflow.com/questions/578306/simple-free-soap-client-for-testing-web-services – AlexSC
bạn phải sử dụng một ứng dụng như SOAP UI hoặc tương đương. – whosrdaddy