[英]Missing Functionality after loading WSDL in Visual Studio 2019
我正在尝试使用 Visual Studio 2019 在 C# 中实现与 DB Schenker 的连接。但是,在 Visual Studio 2019 中加载 WSDL 后,没有办法像使用 ZA8CFDE6331BD59EB66AC96F8911 那样创建响应。 (例如 response = webclient(registration, orderdetails)) 我注意到 Visual Studio 没有将所有操作转换为函数。 缺少 getBookingRequestLand() 和 getBookingResponseLand() 函数,可能还有其他函数。
Visual Studio 是否有可能没有将 WSDL 完全转换为代码? 如何创建请求?
请检查他们是否有任何与“getBookingResponseLand”相关的“操作”标签名称
例如: https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl
有方法名称“NDFDgenByDayLatLonList”所以它看起来像
<operation name="NDFDgenByDayLatLonList">
<documentation>Returns National Weather Service digital weather forecast data. Supports latitudes and longitudes for the Continental United States, Hawaii, Guam, and Puerto Rico only. The latitude and longitude are delimited by a comma and multiple pairs are delimited by a space (i.e. 30.00,-77.00 40.00,-90.00). Allowable values for the input variable "format" are "24 hourly" and "12 hourly". The input variable "startDate" is a date string representing the first day (Local) of data to be returned. The input variable "numDays" is the integer number of days for which the user wants data. Allowable values for the input variable "Unit" are "e" for U.S. Standare/English units and "m" for Metric units.</documentation>
<input message="tns:NDFDgenByDayLatLonListRequest"/>
<output message="tns:NDFDgenByDayLatLonListResponse"/>
</operation>
带有命名空间的一些时间操作元素
<wsdl:operation name="getSearchKeywordsRecommendation">
<soap:operation
soapAction="http://www.ebay.com/marketplace/search/v1/services/getSearchKeywordsRecommendation"/>
<wsdl:input>
<soap:body
use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body
use="literal"/>
</wsdl:output>
</wsdl:operation>
如果您使用的是 VS2019,您只需单击服务和 select “更新...”
步骤更新项目 Web 参考
XML Web 服务的新文件已下载到您的项目中。 XML Web 服务的信息在您的项目中更新。
我无能为力=(。您必须创建一个包含接口的客户端,该接口然后包含请求方法,然后您可以创建一个请求。将其分配给一个变量,您将得到响应 object。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.