简体   繁体   English

在 Visual Studio 2019 中加载 WSDL 后缺少功能

[英]Missing Functionality after loading WSDL in Visual Studio 2019

I am trying to implement a connection to DB Schenker in C# using Visual Studio 2019. However, after loading the WSDL in Visual Studio 2019, there was no way to create a response object like I was used to.我正在尝试使用 Visual Studio 2019 在 C# 中实现与 DB Schenker 的连接。但是,在 Visual Studio 2019 中加载 WSDL 后,没有办法像使用 ZA8CFDE6331BD59EB66AC96F8911 那样创建响应。 (eg response = webclient(registration, orderdetails)) I noticed that Visual Studio had not converted all operations to functions. (例如 response = webclient(registration, orderdetails)) 我注意到 Visual Studio 没有将所有操作转换为函数。 The getBookingRequestLand() and getBookingResponseLand() functions are missing and probably others.缺少 getBookingRequestLand() 和 getBookingResponseLand() 函数,可能还有其他函数。

Is it possible that Visual Studio did not fully translate the WSDL into code? Visual Studio 是否有可能没有将 WSDL 完全转换为代码? How can I create a request?如何创建请求?

please check their is any "operation" tag name related "getBookingResponseLand"请检查他们是否有任何与“getBookingResponseLand”相关的“操作”标签名称

example: https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl例如: https://graphical.weather.gov/xml/SOAP_server/ndfdXMLserver.php?wsdl

have Method name "NDFDgenByDayLatLonList" so its looking like有方法名称“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>

Some time operation element with namespace带有命名空间的一些时间操作元素

<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>

If you are using VS2019 you can simply click on the service and select "Update..."如果您使用的是 VS2019,您只需单击服务和 select “更新...”

STEPS To update a project Web reference步骤更新项目 Web 参考

  1. In Solution Explorer, open your project's App_WebReferences folder and click the node for the Web reference you want to update.在解决方案资源管理器中,打开项目的 App_WebReferences 文件夹,然后单击要更新的 Web 引用的节点。
  2. Right-click the reference and click Update Web Reference.右键单击参考,然后单击更新 Web 参考。

The new files for the XML Web service are downloaded to your project. XML Web 服务的新文件已下载到您的项目中。 Information for the XML Web service is updated within your project. XML Web 服务的信息在您的项目中更新。

在此处输入图像描述

I was incapacitated =(. You have to create a client which contains an interface which then contains the request method, then you can create a request. Assign this to a variable and you have a response object.我无能为力=(。您必须创建一个包含接口的客户端,该接口然后包含请求方法,然后您可以创建一个请求。将其分配给一个变量,您将得到响应 object。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM