我正在尝试使用Visual Studio2019在C#中实现到DB Schenker的连接。然而,在Visual Studio 2019中加载WSDL之后,没有办法像我所习惯的那样创建一个响应对象。(例如response =webclient(注册,orderdetails))我注意到Visual Studio并没有将所有操作转换为函数。缺少getBookingRequestLand()和getBookingResponseLand()函数,可能还缺少其他函数。
有没有可能Visual Studio没有将WSDL完全翻译成代码?如何创建请求?
发布于 2021-04-22 21:19:18
请检查他们是否有任何与"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,你可以简单的点击服务并选择“更新...”
步骤以更新项目网站引用
在解决方案资源管理器中,打开项目的App_WebReferences文件夹,单击要更新引用的引用的节点,然后单击“更新
的新文件将下载到项目中。的信息将在项目中更新。

发布于 2021-04-22 22:08:06
我丧失了行动能力=(。您必须创建一个包含接口的客户端,然后该接口包含请求方法,然后才能创建请求。将其赋给一个变量,您就有了一个响应对象。
https://stackoverflow.com/questions/67213934
复制相似问题