View Single Post
  #1 (permalink)  
Old 07-10-2009, 10:27 AM
kguilmartin kguilmartin is offline
VB.NET Forum Newbie
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Jul 2009
Posts: 4
Reputation: 0
kguilmartin is on a distinguished programming path ahead
Default Having problem invoking WS operation from consumed WSDL in vb.net

Hello,

I am a Java programmer, but new to vb.net. I have created a new Web Reference for the WSDL that I am trying to consume.

Below is from the Reference.vb file:

<System.Web.Services.Protocols.SoapDocumentMetho dA ttribute("", Use:=System.Web.Services.Description.SoapBindingUs e.Literal, ParameterStyle:=System.Web.Services.Protocols.Soap ParameterStyle.Bare)> _
Public Function getCountries(<System.Xml.Serialization.XmlElementA ttribute("getCountries", [Namespace]:="http://server.services.web.eventdb.hermes.com/")> ByVal getCountries1 As getCountries) As <System.Xml.Serialization.XmlArrayAttribute("get Co untriesResponse", [Namespace]:="http://server.services.web.eventdb.hermes.com/"), System.Xml.Serialization.XmlArrayItemAttribute("re turn", Form:=System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable:=False)> country()
Dim results() As Object = Me.Invoke("getCountries", New Object() {getCountries1})
Return CType(results(0), country())
End Function

But I am having a problem invoking this operation (getCountries). It should not have any input parameters, but it looks here like it does. Below is what I have so, which may be way off. Any help would be greatly appreciated!

Dim MyService As RefDataFunctionsBean.RefDataFunctionsImplService = New RefDataFunctionsBean.RefDataFunctionsImplService
Dim Countries As RefDataFunctionsBean.country()

Try
Countries = MyService.getCountries()
Catch ex As Exception
MsgBox(ex.Message)
End Try
Attached Files
File Type: txt RefDataFunctionsImplService.wsdl.txt (11.5 KB, 6 views)

Last edited by kguilmartin; 07-10-2009 at 10:33 AM. Reason: attaching WSDL file.
Reply With Quote