LoginSignup
0
0

More than 1 year has passed since last update.

SOAP WSDLファイルからC#ソースコートを自動作成

Last updated at Posted at 2022-11-07

テスト用のSOAP API:
http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?op=getWeatherbyCityName

visual studioで .wsdl ファイルからプロキシ作成

  1. 参照を右クリック、「サービス参照の追加」を押下
    image.png
    2.SOAP APIのenter pointを入れる、サービス参照を追加、末尾に?WSDL追加必要
    例:http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?op=getWeatherbyCityName?wsdl
    image.png
  2. サービス参照を追加される
    image.png
  3. App.configにendpointなど自動に追加される
    image.png

c#でsoap api を呼び出し

image.png

実行結果

image.png

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0