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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T15:20:01+00:00 2026-06-18T15:20:01+00:00

Background I am interfacing with a SOAP webservice, using C#. I am working in

  • 0

Background
I am interfacing with a SOAP webservice, using C#. I am working in Visual Studio and have successfully set up a Service Reference and can use the web service in my code.

My questions are related to “how best” to design the client/wrapper to the API, considering the powerful features of C# as a language.

Central “Request” Class
I had the thought of creating an overall class to handle the requests to the service, and thus handle all of the various permutations of API specific errors (there are many), and degrade gracefully. This class could also perhaps be the “Controller” for the API client, which also provides the overall interface between internal calls and the outside world/code.

Then I noticed the sheer variety of data types that each API call requires and can return. Surely this means this “request” functionality cannot be handled generically (and must be implemented in each specific type of request – e.g. authentication, vehicle positions, jobs/orders)?

Or if it can, how can C# as a language, help me in working with types in an abstract manner?

As always, thank you for your time in reading and any advice you can spare.

  • 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-18T15:20:03+00:00Added an answer on June 18, 2026 at 3:20 pm

    The question is a little vague on details, but I’ll try and offer up some advice.

    First I think you’re wise to create a wrapper over an external API. I’ll use the example of an external email provider to try and answer your question.

    Imagine we have a third party email API and we want to make a wrapper around it.

    I would start by making a wrapper that behaves the way I would expect an email API to work. There should be methods like:

    
    public EmailResponse SendEmail(EmailRequest request) { }
    public User GetUser(string email) { }
    public void OptOut(string email) { }
    
    

    I start by designing what I as a client think is both generic for the domain – and easy to use.

    Then you make an implementation of the wrapper interface that maps directly to the third party API. In the example above, maybe it takes two external API calls to send an email, but the person using your wrapper won’t know that.

    In my opinion wrappers are worthless if you bind them too closely with a specific implementation.

    C# has tons of language features that make this kind of approach possible, but I think just using a simple Interface will fit your needs. No need to make it harder than it is.

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

Sidebar

Related Questions

While working in an R console, I'd like to set up a background task
I'm using a background-worker to do all of my processing. Inside there, I have
Background: I'm using the (fantastic) Vim plugin python-mode , which includes the pep8 linter.
Background - I am using paramiko to put files on a bunch of remote
Background: I would like to dismiss a modalView that I have presented earlier and
Background I am working with a monad built of a stack of transformers one
Background: Using unix, codeigniter from localhost. I'd like to run a controllers via a
Some background first. I have a .net client agent installed on each of the
I'm working on a project that interfaces with Google Data APIs. I have several
I have a UITableViewCell that has some labels and images that can be clicked.

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.