Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8861053
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T15:24:17+00:00 2026-06-14T15:24:17+00:00

In my solution I have a create a WCF service which takes message contract

  • 0

In my solution I have a create a WCF service which takes message contract class as parameter.

[ServiceContract]
public interface IServiceClass
{
    [OperationContract]
    Employee AddEmployee(Employee employee);

}

 public class ServiceClass : IServiceClass
 {
    public Employee AddEmployee(Employee employee)
    {
       //do something
    }
 }

[MessageContract]
public class Employee
{
    [MessageHeader]
    public string EmployeeNumber { get; set; }

    [MessageBodyMember]
    public string FirstName { get; set; }
    [MessageBodyMember]
    public string LastName { get; set; }
    [MessageBodyMember]
    public DateTime DOB { get; set; }
}

Then I am adding this service to my client application using Add service reference option. The service added successfully.
Then in my client program I used this method. But the method signature has been changed. It changed as follows.

 public void AddEmployee(ref string EmployeeNumber, 
    ref System.DateTime DOB, ref string FirstName, ref string LastName)

I am using the service in the client as follows.

TcpServiceReference.ServiceClassClient service =
            new TcpServiceReference.ServiceClassClient();

NOTE:TcpServiceReference is the service name

I cant understand the reason.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T15:24:19+00:00Added an answer on June 14, 2026 at 3:24 pm

    Not exactly sure why WCF does this some times, but if you use the service interface, you’ll get the “correct” method signatures:

    TcpServiceReference.IServiceClass service = 
        new TcpServiceReference.ServiceClassClient();
    

    (this is assuming that IServiceClass is the client-side name of the service interface that svcutil (Add Service Reference) has generated for you.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple WCF logging service.. namespace WCFServiceLibrary { [ServiceContract] public interface ILog
In Visual Studio you can create a Website, which doesn't have a solution or
I have a solution file ( i.e DLL file). i want to create webservice/WCF
I have a WCF solution that consists of the following class libraries: Exercise.Services: Contains
I have a WCF Ria service which invokes several wcf services (non Ria). I'm
I have create a WCF Service and hosted the Service in IIS (5.1). I
I have a WPF application which talks to a WCF service hosted in IIS.
I have to create a WCF service that will accept thousands of requests every
We have a custom listener on our WCF solution, which inherits from ChannelListenerBase<IDuplexSessionChannel> .
I have created 2 WCF service libraries in a solution. I have also created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.