If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Newbie: How to access a WebService from VB.NET 2008?

Hallo all,

I need to build a small application in VB.NET to access a Web-Service.
It's just to proof a concept.

The Web-Service I'm trying to access handles request against a document database. Using web-service requests I should be able to see how many documents are in the database, search for specific documents, view them, delete them, etcetera....
The database and the web-service runs on my local machine. (And should be accessible inside our local network. But that is optional step 2.)

I have been searching the web for a good tutorial of example project, but was unable to find something that was useful to me.
Is the please, please someone who could help me on my way?
I have no idea where to start.

In order to call a Web service, you must know its URL. Is the WSDL file on the server? If so, enter its URL into the Add Web Reference dialog. Otherwise, try going into IIS Manager on the Virtual PC and look at the virtual directories. Right-click on the .asmx file and select "Browse", then look at the URL in the browser.

OK, it looks like Add Web Reference won't work for the Web service you're using, so let's try Plan B: Run Microsoft's wsdl.exe tool against your WSDL file to generate a proxy class. If you have VS 2008, you should find wsdl.exe in \Program Files\Microsoft SDKs\Windows\6.0A\Bin\ . From a command prompt, do this:

wsdl.exe /l:vb Collector.wsdl
Microsoft (R) Web Services Description Language Utility
[Microsoft (R) .NET Framework, Version 2.0.50727.1432]
Copyright (C) Microsoft Corporation. All rights reserved.
Warning: This web reference does not conform to WS-I Basic Profile v1.1.
SOAP 1.1-binding not found: The Basic Profile 1.1 of WS-I contains directives advising how to use a set of kernel webservices together to develop a compatible webservice. For the 1.1-profiel you would have to use SOAP 1.1, WSDL 1.1, UDDI 2.0, XML 1.0 and XML Schema.
For more details on the WS-I Basic Profile v1.1, see the specification
at http://www.ws-i.org/Profiles/BasicProfile-1.1.html.
Error: Can't import binding strsRepositoryDocumentServiceBindingType of namespace http://schemas.streamserve.com/webservice/repositorydocument/strsrepositorydocumentservice/1.0.
- Unable to import function getDocuments.
- The element http://www.w3.org/2004/08/xop/include:Include is missing.
If you would like more help, please type "wsdl /?".

The WSDL seems to work fine in a tool like soapUI.

HTML Code:

www.soapUI.org

I'm using the Free Tool.

I have loaded the SWDL into soapUI and have been testing wit it.
In soapUI I'm able to send requests to the webservice and I do get responces from the webservice with usefull information.
That's working fine.