Vb.net 无法在mono中编译vb wsdl存根
我正在OSX 10.9上测试Mono。本指南介绍了如何使用web服务:但我无法编译wdsl生成的代码 生成VB存根:Vb.net 无法在mono中编译vb wsdl存根,vb.net,mono,wsdl,Vb.net,Mono,Wsdl,我正在OSX 10.9上测试Mono。本指南介绍了如何使用web服务:但我无法编译wdsl生成的代码 生成VB存根: gizurmaca00510e:web-service jonas$ wsdl http://dic.googlecode.com/files/GoogleSearch.wsdl-language:vb Web Services Description Language Utility Mono Framework v4.0.30319.17020 There were som
gizurmaca00510e:web-service jonas$ wsdl http://dic.googlecode.com/files/GoogleSearch.wsdl-language:vb
Web Services Description Language Utility
Mono Framework v4.0.30319.17020
There were some warnings while generating the code:
http://dic.googlecode.com/files/GoogleSearch.wsdl
- This web reference does not conform to WS-I Basic Profile v1.1
R2706: A wsdl:binding in a DESCRIPTION MUST use the value of "literal"
for the use attribute in all soapbind:body, soapbind:fault,
soapbind:header and soapbind:headerfault elements
* Binding 'GoogleSearchBinding', in Service Description
'urn:GoogleSearch'
R2209: A wsdl:binding in a DESCRIPTION SHOULD bind every wsdl:part of a
wsdl:message in the wsdl:portType to which it refers to one of
soapbind:body, soapbind:header, soapbind:fault or soapbind:headerfault
* Binding 'GoogleSearchBinding', in Service Description
'urn:GoogleSearch'
R2102: A QName reference to a Schema component in a DESCRIPTION MUST
use the namespace defined in the targetNamespace attribute on the
xsd:schema element, or to a namespace defined in the namespace
attribute on an xsd:import element within the xsd:schema element
* XmlSchemaComplexContentRestriction in Schema Schema
'urn:GoogleSearch', in Service Description 'urn:GoogleSearch'
* XmlSchemaAttribute in Schema Schema 'urn:GoogleSearch', in Service
Description 'urn:GoogleSearch'
* XmlSchemaComplexContentRestriction in Schema Schema
'urn:GoogleSearch', in Service Description 'urn:GoogleSearch'
* XmlSchemaAttribute in Schema Schema 'urn:GoogleSearch', in Service
Description 'urn:GoogleSearch'
R2110: In a DESCRIPTION, array declarations MUST NOT extend or restrict
the soapenc:Array type
* XmlSchemaComplexContentRestriction in Schema Schema
'urn:GoogleSearch', in Service Description 'urn:GoogleSearch'
* XmlSchemaComplexContentRestriction in Schema Schema
'urn:GoogleSearch', in Service Description 'urn:GoogleSearch'
R2111: In a DESCRIPTION, array declarations MUST NOT use wsdl:arrayType
attribute in the type declaration
* XmlSchemaAttribute in Schema Schema 'urn:GoogleSearch', in Service
Description 'urn:GoogleSearch'
* XmlSchemaAttribute in Schema Schema 'urn:GoogleSearch', in Service
Description 'urn:GoogleSearch'
Writing file 'GoogleSearchService.vb'
编写守则:
gizurmaca00510e:web-service jonas$ vbnc /target:library GoogleSearchService.vb -r:System.Web.Services.dll,System.Xml.dll
Visual Basic.Net Compiler version 0.0.0.5943 (Mono 3.0 - xamarin/9fc7213)
Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.
/Users/jonas/git/colmsjo/develvm/excel_sandbox/mono/web-service/GoogleSearchService.vb (66,12) : error VBNC30455: Argument not specified for parameter 'arg' of 'Private Sub OndoGetCachedPageCompleted(arg As Object)'.
/Users/jonas/git/colmsjo/develvm/excel_sandbox/mono/web-service/GoogleSearchService.vb (66,12) : error VBNC30455: Argument not specified for parameter 'arg' of 'Private Sub OndoGetCachedPageCompleted(arg As Object)'.
/Users/jonas/git/colmsjo/develvm/excel_sandbox/mono/web-service/GoogleSearchService.vb (99,12) : error VBNC30455: Argument not specified for parameter 'arg' of 'Private Sub OndoSpellingSuggestionCompleted(arg As Object)'.
/Users/jonas/git/colmsjo/develvm/excel_sandbox/mono/web-service/GoogleSearchService.vb (99,12) : error VBNC30455: Argument not specified for parameter 'arg' of 'Private Sub OndoSpellingSuggestionCompleted(arg As Object)'.
/Users/jonas/git/colmsjo/develvm/excel_sandbox/mono/web-service/GoogleSearchService.vb (132,12) : error VBNC30455: Argument not specified for parameter 'arg' of 'Private Sub OndoGoogleSearchCompleted(arg As Object)'.
/Users/jonas/git/colmsjo/develvm/excel_sandbox/mono/web-service/GoogleSearchService.vb (132,12) : error VBNC30455: Argument not specified for parameter 'arg' of 'Private Sub OndoGoogleSearchCompleted(arg As Object)'.
There were 6 errors and 0 warnings.
Compilation took 00:00:00.8969520
非常感谢您的帮助 看起来wsdl没有为委托生成AddressOf修饰符有问题 您可以通过如下方式修改文件来解决此问题:
Me.doGetCachedPageOperationCompleted = New System.Threading.SendOrPostCallback(Me.OndoGetCachedPageCompleted)
致:
对于所有三个位置,请注意,行号关闭了1,例如上面的示例报告了第66行,但实际的行号是65
或者,您可以使用此已固定的版本:
Me.doGetCachedPageOperationCompleted = New System.Threading.SendOrPostCallback(AddressOf Me.OndoGetCachedPageCompleted)