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 8024167
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:47:04+00:00 2026-06-04T22:47:04+00:00

This is quite embarrassing ,tried to find the solution by myself but real lack

  • 0

This is quite embarrassing ,tried to find the solution by myself but real lack of knowledge i couldn’t able to ,so am posting my question here.

my wcf service return this value when i call my service

   <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
   <s:Body>
      <GetProcessLocationsResponse xmlns="http://tempuri.org/">
         <GetProcessLocationsResult >
            <a:ProcessLocationData>
               <a:Id>1</a:Id>
               <a:Name>IL</a:Name>
            </a:ProcessLocationData>
            <a:ProcessLocationData>
               <a:Id>2</a:Id>
               <a:Name>MD</a:Name>
            </a:ProcessLocationData>
            <a:ProcessLocationData>
               <a:Id>3</a:Id>
               <a:Name>NY</a:Name>
            </a:ProcessLocationData>
             </GetProcessLocationsResult>
      </GetProcessLocationsResponse>
   </s:Body>
</s:Envelope>

in my service class i wrote this method

 public Array GetProcessLocations()
    {
        return this.GetSoapServiceClient().GetProcessLocations().ToArray();
    }

    public List<ProcessLocationData> GetProcessLocationsOnlyName()
    {
        return this.GetSoapServiceClient().GetProcessLocations().ToList();
    }

i call this service in my xyz.class like below

 Array GetProcLocation=  new GatewayService().GetProcessLocations();

this return whole object like ID and Name

but i was trying to get only the name by calling the “GetProcessLocationsOnlyName” method

i was trying to do like below

array ProcName= ProcessLocationData.Name

should return all the name in the service like (IL,MD,NY) in the array but i couldn’t able
to see ProcessLocationData at all.

In another way i was trying to split the array(GetProcLocation) and get only the name and add in to new array ? is that make sense ?

Please some one guide me in to right path.thanks in advance.

  • 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-04T22:47:06+00:00Added an answer on June 4, 2026 at 10:47 pm

    I am a little confused about your question.
    I do understand that you want to have 2 service methods, both of them returning an array of ProcessLocationData, one returning the list with id and name (GetProcessLocations) and one returning an array of ProcessLocationData with name only (GetProcessLocationsOnlyName).
    And your problem is that the client proxy doesn’t contain the GetProcessLocationsOnlyName method.

    You should make sure that both methods are annotated with OperationContract, otherwise they won’t be exposed by your service. You should have this attribute in either your service interface or in service directly. You can see that your service exposes both methods in either wsdl or using the WCF Test Client.

    And then you must make sure your client proxy is up to date.

    • If your client proxy is was generated using visual studio, you should try to update your service reference
    • If your client proxy is generated using svcutil you must regenerate it manually

    Related to your comment, if you want to return only the name field you have the following options.

    • you can use the same DataContract, that means returning a list of ProcessLocationData and returning an empty Id for each object
    • you can create a new DataContract that has only one property, Name, and return a list of these objects

    My advice is to use the same DataContract and to load only the needed data in the data access method. For example, make a new method GetProcessLocationsName(), that will create your list of ProcessLocationData with only their Name loaded.

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

Sidebar

Related Questions

I have this quite popular problem, but have failed to find a solution that
sorry if this quite a easy question, but i cant find any thread the
This is a very basic question...quite embarassing, but here goes: I have a Stopwatch
This is quite embarrassing, but every time i use plot() with IPython it pop's
I'm new using pyparsing, but I can't find how to solve this quite easy
I researched for this quite a long time, but could not find proper answer.
I tried googling this quite a bit, but all the articles are from early
I have been asked this question and have given this quite some thought but
I've edited this quite a bit and bolded my question at this point. I
This is quite a simple question - although one that is on my mind

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.