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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T08:26:29+00:00 2026-05-12T08:26:29+00:00

I have two websites, both using .Net framework 3.5. One website is hosting a

  • 0

I have two websites, both using .Net framework 3.5. One website is hosting a soap web service and the other is referencing this service.
I’m having some unexpected happenings with my web method signatures. I have a simple method in my web service with a signature such as:

[WebMethod]
public string[] HelloWorld()
{
    return new[] { "Hello World" };
}

But when I reference this web service using the ‘Add Service Reference’ feature in VS2008, with configuration set to “Always generate message contracts” (although when i check the ‘reuse types in referenced assemblies’, i seem to have the same issue), the signature seems to be changed by the auto generated proxy objects to the following:

HelloWorldResponse HelloWorld(HelloWorldRequest request)

I’ve tried to look this up on the net, but having trouble finding something that will simply explain to me why this is happening, and whether I can/should try to work around it?

I also have this question:
How does one determine whether they should choose the service reference configuration option to “reuse types in referenced assemblies” and “always generated message contracts”?

  • 1 1 Answer
  • 1 View
  • 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-05-12T08:26:29+00:00Added an answer on May 12, 2026 at 8:26 am

    The message-contracts option might have this effect; the purpose here being to allow fine-grained control over the underlying request. Ultimately, what you are sending (behind the scenes) is a request payload.

    The reuse-types option is more typically used with objects (not things like string[]) – and means that if you have a 100% matching Customer (say) class locally, it can re-use that for the web-service rather than generating a proxy type.

    Additionally, note that you aren’t actually consuming a WCF service ([WebMethod] is the older web-service style). As such you may have better results with a “Web Reference”; when adding the service, hit “Advanced”, then “Add Web Reference…”. This uses the older UI and wsdl.exe to generate code intended for [WebMethod] (asmx), rather than WCF (svc).

    Of course, rather than hosting a [WebMethod], you could (since the server is also 3.5) host a WCF service; this may make things easier.

    A final point of WCF; if you really want the same contract at client and server, you can use either assembly or class sharing to use the very same types at both end. This is not supported for [WebMethod], though.

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

Sidebar

Ask A Question

Stats

  • Questions 390k
  • Answers 390k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Whether you use the Maven Eclipse Plugin or m2eclipse, src/test/resources… May 15, 2026 at 1:00 am
  • Editorial Team
    Editorial Team added an answer Try this: myMock.Stub(methodInv => methodInv.MyMethod(new List<Foo>()).IgnoreArguments() .WhenCalled(invocation => (invocation.Arguments[0] as… May 15, 2026 at 1:00 am
  • Editorial Team
    Editorial Team added an answer In your .htaccess file in your root directory: RewriteEngine On… May 15, 2026 at 1:00 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.