Visual Studio 2015コミュニティでvb.netのsoapクライアントを使用する際に問題があります。私はクライアントのライブラリを石鹸するために使用したいが、私はそれを見つけることができません。Visual Basic。メソッドが反映されない
したがって、Visual Studio 2015コミュニティでwsdl.exe
コマンドが見つかりました。私はwsdl.exeを試しました。私はプロジェクトを追加し、正常にコンパイル
C:\Program Files\Microsoft Visual Studio 14.0>wsdl /l:VB https://ss.yahooapis.jp/services/V6.0/LocationService?wsdl /out:C:\Users\user_name\Desktop\
:それは次のリンクでコードを生成しました。ただし、この行でオブジェクトをインスタンス化するときに例外が発生します。
Dim LocationServiceWsdl As New LocationService()
以下はエラーメッセージです。
メッセージ:LocationService.getは
InnnerException反映することができない。SoapHeaderはを反映しているときにエラーが発生しました。で
:
System.Web.Services.Protocols.SoapReflector.ReflectMethod(LogicalMethodInfo METHODINFO、ブールクライアント、XmlReflectionImporter xmlImporter、SoapReflectionImporter soapImporter、文字列defaultNs)
System.Web.Services.Protocols.SoapClientType.GenerateXmlMappings(タイプtype、 ArrayListにsoapMethodList、文字列serviceNamespace、ブールserviceDefaultIsEncoded、ArrayListのマッピング)
System.Web.Services.Protocols.SoapClientType..ctor(タイプtype)
System.Web.Services.Protocols.SoapHttpClientProtocol..ctor()
場所rvice.vb
<System.Web.Services.Protocols.SoapHeaderAttribute("RequestHeader"),
System.Web.Services.Protocols.SoapHeaderAttribute("ResponseHeader", Direction:=System.Web.Services.Protocols.SoapHeaderDirection.Out),
System.Web.Services.Protocols.SoapDocumentMethodAttribute("", RequestNamespace:="http://ss.yahooapis.jp/V6", ResponseNamespace:="http://ss.yahooapis.jp/V6", Use:=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle:=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)>
Public Function [get](ByVal accountId As Long, <System.Xml.Serialization.XmlElementAttribute("error")> ByRef [error]() As [Error]) As <System.Xml.Serialization.XmlElementAttribute("rval")> LocationReturnValue
Dim results() As Object = Me.Invoke("get", New Object() {accountId}) ' <- maybe error occurs here.
[error] = CType(results(1), [Error]())
Return CType(results(0), LocationReturnValue)
End Function
エラーを解決するにはどうすればよいですか?
それが働いています!どうもありがとうございました! – aipa