To test this service using svcutil.exe
Solution 1
You would either need to create an application that consumes this generated class -or- use the WcfTestClient application included with Visual Studio (which can be opened with the Visual Studio Command Prompt or can typically be found under C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE [depending on your version of Visual Studio]).
See: http://msdn.microsoft.com/en-us/library/bb552364.aspx
Solution 2
wgraham,'s answer is correct. To use the WcfTestClient
- Open C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\WcfTestClient.exe
- File --> Add Service
- Enter
http://11.55.99.341/MessagingServices/MessageData.svc
Solution 3
when you run svcutil.exe with the service URL its gonna give you a proxy class and a config file, u can add the class and the config file in a windows/web application and create an object of proxy class and start using the methods exposed as part of service.
Comments
-
Jim almost 2 years
I want to test a service with svcutil.exe. The step is
svcutil.exe http://11.55.99.341/MessagingServices/MessageData.svc?wsdl
I found that there is a cs file was generated in C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin.
Some of code is likely as:
//------------------------------------------------------------------------------ // <auto-generated> // This code was generated by a tool. // Runtime Version:2.0.50727.5466 // // Changes to this file may cause incorrect behavior and will be lost if // the code is regenerated. // </auto-generated> //------------------------------------------------------------------------------ namespace MessagingAPI.Objects { using System.Runtime.Serialization; [System.Diagnostics.DebuggerStepThroughAttribute()] [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "3.0.0.0")] [System.Runtime.Serialization.DataContractAttribute(Name="InboxDTO", Namespace="http://schemas.datacontract.org/2004/07/MessagingAPI.Objects")] public partial class InboxDTO : object, System.Runtime.Serialization.IExtensibleDataObject { private System.Runtime.Serialization.ExtensionDataObject extensionDataField; private System.Guid[] FullInboxField; private System.Guid InmateIdField; private int MessagesInWaitField; private int ReadMessagesField; private System.Guid[] UnreadInboxField; private int UnreadMessagesField; public System.Runtime.Serialization.ExtensionDataObject ExtensionData { get { return this.extensionDataField; } set { this.extensionDataField = value; } } [System.Runtime.Serialization.DataMemberAttribute()] public System.Guid[] FullInbox { get { return this.FullInboxField; } set { this.FullInboxField = value; } }
I am not sure how to test it with this service with the code then?
-
Admin almost 11 yearsIt is unclear, suppose the generated cs is generatedClient.cs. It is already a client class?
-
wgraham almost 11 yearsYes it's a class, but you'd still need to instantiate it. Right now you have a "blueprint" -- you need to put it to use!
-
Admin almost 11 yearsI haven't found the config file. Only one class was generated. Do you have a sample to use svcutil.exe?