Condividi tramite


How to start your client

In my previous posts I introduced you to the basic web service protocols that ILM “2” uses.  In this post we show you how to use svcutil to generate your own client.

Recall that svcutil is bundled with the Windows SDK.  We use version 6.0A of the SDK on the team, which is a publically available download that you can find off Live Search.

To begin, open up a command prompt whose path includes the Windows SDK binary directory.  We use the command prompt distributed with Visual Studio for this purpose.  You may find this command prompt in the start menu.

Once you have the command line open, type in this command:

svcutil http://localhost:526/ResourceManagement/MEX

This will generate a C# class with a client your current directory.  By default the file is service.cs with is config file output.config.

Here’s a screenshot:

Screen shot of svcutil command

Notice I boxed out the actual ip address since I run the resource management service on another box.

That’s it!

You now have access to the resource client (WS-Transfer Get, Put, Delete), resource factory client (WS-Transfer Create), and search client (WS-Enumeration).  This client enables you send SOAP messages using the operations we defined in previous posts.  In future posts we will describe in detail how to construct these SOAP messages in C# code.

Happy exploring.

Comments

  • Anonymous
    December 06, 2008
    I get error clienting client:    There was no endpoint listening at http://localhost:526/ResourceManagement/MEX that could accept the message. This is often caused by an incorrect address or SOAP action. See nnerException, if present, for more details.    The remote server returned an error: (404) Not Found. What could be the problem?

  • Anonymous
    December 07, 2008
    The comment has been removed

  • Anonymous
    January 08, 2009
    I got the same error as Donatas, but both of the conditions you describe have been verified. The service is running, it is a domain account, and the firewall is off completely. I tried to download and run the sample application as well, but got a SecurityNegotiationError while running that. Any ideas what's causing this?

  • Anonymous
    April 07, 2009
    http://localhost:526/ResourceManagement/MEX should read http://localhost:526/ResourceManagementService/MEX and it is CASE sensitive!