Reference.cs文件中没有ClientBase类(ClientBase classes are not available in Reference.cs file)
我使用以下wsdl在Visual Studio 2010中添加了一个服务引用。 它已成功添加。 这是从schema xsd文件生成的wsdl; 不是来自实际的服务代码。 知道为什么这不会在Reference.cs文件中生成所需的类和方法吗?
<?xml version="1.0" encoding="utf-8"?> <definitions xmlns:import0="urn:thinktecture-com:demos:restaurantservice:messages:v1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import1="urn:thinktecture-com:demos:restaurantservice:data:v1" xmlns:tns="urn:lijo:demos:multiplyservice:calculation:v1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" name="CalculationService" targetNamespace="urn:lijo:demos:multiplyservice:calculation:v1" xmlns="http://schemas.xmlsoap.org/wsdl/"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> <types> <xsd:schema> <xsd:import schemaLocation="C:\toolbox\LijosServiceApp\NewService\RestaurantMessages.xsd" namespace="urn:thinktecture-com:demos:restaurantservice:messages:v1" /> <xsd:import schemaLocation="C:\toolbox\LijosServiceApp\NewService\RestaurantData.xsd" namespace="urn:thinktecture-com:demos:restaurantservice:data:v1" /> </xsd:schema> </types> <message name="getMultipliedIn"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> <part name="parameters" element="import0:getMultiplied" /> </message> <message name="getMultipliedOut"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> <part name="parameters" element="import0:getMultipliedResponse" /> </message> <portType name="CalculationServiceInterface"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> <operation name="getMultiplied"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> <input message="tns:getMultipliedIn" /> <output message="tns:getMultipliedOut" /> </operation> </portType> <binding name="BasicHttpBinding_CalculationServiceInterface" type="tns:CalculationServiceInterface"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <operation name="getMultiplied"> <soap:operation soapAction="urn:lijo:demos:multiplyservice:calculation:v1:getMultipliedIn" style="document" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> </operation> </binding> <service name="CalculationServicePort"> <port name="CalculationServicePort" binding="tns:BasicHttpBinding_CalculationServiceInterface"> <soap:address location="http://localhost/CalculationService" /> </port> </service> </definitions>
I added a service reference in Visual Studio 2010 using following wsdl. It is added successfully. This is a wsdl generated from schema xsd files; not from actual service code. Any idea why this is not generating the required class and methods in Reference.cs file?
<?xml version="1.0" encoding="utf-8"?> <definitions xmlns:import0="urn:thinktecture-com:demos:restaurantservice:messages:v1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:import1="urn:thinktecture-com:demos:restaurantservice:data:v1" xmlns:tns="urn:lijo:demos:multiplyservice:calculation:v1" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" name="CalculationService" targetNamespace="urn:lijo:demos:multiplyservice:calculation:v1" xmlns="http://schemas.xmlsoap.org/wsdl/"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> <types> <xsd:schema> <xsd:import schemaLocation="C:\toolbox\LijosServiceApp\NewService\RestaurantMessages.xsd" namespace="urn:thinktecture-com:demos:restaurantservice:messages:v1" /> <xsd:import schemaLocation="C:\toolbox\LijosServiceApp\NewService\RestaurantData.xsd" namespace="urn:thinktecture-com:demos:restaurantservice:data:v1" /> </xsd:schema> </types> <message name="getMultipliedIn"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> <part name="parameters" element="import0:getMultiplied" /> </message> <message name="getMultipliedOut"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> <part name="parameters" element="import0:getMultipliedResponse" /> </message> <portType name="CalculationServiceInterface"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> <operation name="getMultiplied"> <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" /> <input message="tns:getMultipliedIn" /> <output message="tns:getMultipliedOut" /> </operation> </portType> <binding name="BasicHttpBinding_CalculationServiceInterface" type="tns:CalculationServiceInterface"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> <operation name="getMultiplied"> <soap:operation soapAction="urn:lijo:demos:multiplyservice:calculation:v1:getMultipliedIn" style="document" /> <input> <soap:body use="literal" /> </input> <output> <soap:body use="literal" /> </output> </operation> </binding> <service name="CalculationServicePort"> <port name="CalculationServicePort" binding="tns:BasicHttpBinding_CalculationServiceInterface"> <soap:address location="http://localhost/CalculationService" /> </port> </service> </definitions>
原文:https://stackoverflow.com/questions/12410283
最满意答案
安德鲁 - 我想我知道你在做什么。 很明显,在用户提交了onSubmit处理程序中该文件显示模式的信息之后,您只需要Fine Uploader才能处理一批选定文件中的文件。 您正在寻找的是一种在onSubmit处理程序中返回promise或“deferred”的方法。 这将允许您在用户提交相关模式后,再次调用Fine Uploader(并说“继续,上传/提交此文件并转到下一个”)。
我已经创建了一个实现promise模式的
qq.Promise
“类”。 Fine Uploader仅将onPasteReceived
回调仅作为有效返回值。 允许将其作为其他回调的有效返回值(例如onSubmit
可能是有意义的。 这将允许您推迟上传/提交文件,直到用户处理相关模式。 由于Fine Uploader在“单文件模式”下的运行方式,将multiple
选项设置为“false”可能也可能不适合您。我认为允许在一些回调(例如此回调)中返回promises以允许用户交互可能是有价值的。 你能否在Github项目中打开一个功能请求 ? 在那里,我们可以讨论更多内容,您可以跟踪我放入库中的任何相关更改的进度。
Andrew - I think I know what you are getting at. It's clear that you simply want Fine Uploader to only process a file in a batch of selected files after the user has submitted information in the modal that your display for that file in your onSubmit handler. What you are looking for is a way to return a promise, or a "deferred" in your onSubmit handler. This would allow you to call Fine Uploader back (and say "go ahead, upload/submit this file and move on to the next") once your user has submitted the associated modal.
I have already created a
qq.Promise
"class" that implements the promise pattern. Fine Uploader observes a promise as a valid return value only for theonPasteReceived
callback at this time. It might make sense to allow this as a valid return value for other callbacks, such asonSubmit
. This would allow you to defer uploading/submittal of a file until the user has dealt with the associated modal. Setting themultiple
option to "false" may or may not be a desirable option for you now, due to the way Fine Uploader functions in "single-file mode".I think it may be valuable to allow promises to be returned in some callbacks, such as this one, to allow for user interaction. Could you please open up a feature request in the Github project? There, we can discuss a bit more and you can track progress on any associated changes I put into the library.
相关问答
更多-
添加到哈姆,onchange %select#selected_path.form-control{name: 'folder', :onchange => "go()"} 对于js也 $('#fine-uploader-gallery').fineUploader({ template: 'qq-template-gallery', request: { endpoint: '/admin/files/upload', params: { authenticity_token: ...
-
看起来你正试图将Fine Uploader弯曲成不是的东西。 Fine Uploader可能不应该参与您的流程的这一步骤,因为它的工作是将文件上传到您的服务器。 它并不是一个多功能的Web应用程序。 如果要在文件发送后的某个时间点向服务器发送其他数据,只需通过XHR发送带有该数据的POST请求。 It seems like you are trying to bend Fine Uploader into something that it is not. Fine Uploader should prob ...
-
快速查看后,问题出在您声明验证的位置。 例如: extraButtons: [ { element: $('.file-trigger')[0], validation: { allowedExtensions: ["jpg"] } }, 说“只要点击额外的按钮,只有点击额外的按钮,验证扩展是否正常。” 不是为每个按钮定义验证,而是在基础级别定义它: $(document).ready(function () { $("#fine-u ...
-
我的代码仍然有点困惑。 我会尽力回答您的问题,但如果您只是提供指向包含您在问题中列出的代码的工作版本的页面的链接,那么我将更容易帮助您。 Fine Uploader将在#dialog中创建文件项,因为您已将#dialog设置为listElement 。 根据您的评论,这似乎就是您想要做的。 但是,每次在submitted处理程序中submitted文件时,您都会替换#dialog的全部内容。 为什么? 我猜你真的不想这样做。 你应该再看看jQuery的html函数的文档 。 您还将使用来自showMessa ...
-
Fine-Uploader FTP上传(Fine-Uploader FTP uploads)[2022-12-02]
Fine Uploader只能理解HTTP; 不是FTP。 话虽这么说,您可以轻松地将Fine Uploader上传文件到服务器上的端点,然后 - 可能在服务器端处理之后 - 通过(S)FTP或任何其他协议提供这些文件 - 如果您想。 Fine Uploader的主要目标是规范化所有浏览器中的文件上传体验。 在FTP客户端上使用它的优点是,任何拥有Web浏览器的用户理论上都应该能够将文件上传到您的服务。 您的服务后来对这些文件做了什么(无论是在FTP服务器上托管它们,转码多媒体文件等)完全取决于您。 希望这 ... -
为多个文件重用UUID会破坏UUID的整个目的。 所以这不被支持。 Reusing a UUID for multiple files defeats the entire purpose of a UUID. So this is not supported.
-
等到fine-uploader在提交表单之前提交所有文件(Wait until fine-uploader submits all files before submitting form)[2022-03-05]
您可以通过侦听表单提交事件以及阻止默认浏览器操作(如果文件尚未上传)来阻止提交表单。 document.getElementById('myForm') .addEventListener('submit', function(event) { var totalFiles = fineuploader.getUploads().length; var successfulUploads = fineuploader.getUploads({ status: ... -
如果要将参数传递给上载成功端点,则需要设置uploadSuccess.params选项和/或使用setUploadSuccessParams API方法 。 If you want to pass parameters to your upload success endpoint, you'll need to either set the uploadSuccess.params option and/or use the setUploadSuccessParams API method.
-
Fine Uploader的API期望ID为数字。 让我们来看看你对cancel方法的调用: function cancelBlock() { // removes a cancelled block var id = $(this).attr("data"); $("#uploader").fineUploader('cancel', id); } jQuery的attr方法总是返回一个字符串。 同样,精细上传者ID是数字。 您可以使用parseInt()将此字符串转换为数字。 ...
-
安德鲁 - 我想我知道你在做什么。 很明显,在用户提交了onSubmit处理程序中该文件显示模式的信息之后,您只需要Fine Uploader才能处理一批选定文件中的文件。 您正在寻找的是一种在onSubmit处理程序中返回promise或“deferred”的方法。 这将允许您在用户提交相关模式后,再次调用Fine Uploader(并说“继续,上传/提交此文件并转到下一个”)。 我已经创建了一个实现promise模式的qq.Promise “类”。 Fine Uploader仅将onPasteRecei ...