/    Sign up×
Community /Pin to ProfileBookmark

Web Service Parameters

I’m trying to develop a web service that accepts the following parameters:

Address Line1, Address Line 2, AddressLine3, City , State , and PostCode.

My client is usually , a Dot Net application or a classic ASP page or a VB 6 application. What I intend to do is to create a web service that accepts these parameters, processes them(I call a different service for this) and pass back the modified address, ie, ResultAddress1 ,ResultAddress2, ResultAddress3, ResultCity, ResultState and ResultPostCode.

My question is what is the best way to handle these request , response parameters?. My client should be able to accept these parameters and send back the Modified addresses.

to post a comment
Full-stack Developer

4 Comments(s)

Copy linkTweet thisAlerts:
@Tweak4Apr 17.2007 — There are countless ways to do it- if you are in control of both the web service and the apps that consume it, the easiest way is probably just to create an address class that contains the properties you need, and return that from your service.

If other people may make use of your service, you could return an array of strings (a little generic, but usable), or <probable best answer> an XML string.
Copy linkTweet thisAlerts:
@kalyformauthorApr 17.2007 — Thank you for the reply. Is there any sample code on how to use an XML string to accomplish this?
Copy linkTweet thisAlerts:
@kalyformauthorApr 17.2007 — or an Address obect that contains the properties that is required
Copy linkTweet thisAlerts:
@Tweak4Apr 19.2007 — It all depends on the language you choose to use. In C# at least, the response from a web service comes back as XML no matter what, but there are also serialization methods within the framework that can give you a little more control over how your XML looks.

As for the object, you simply create a class like you would any other and just declare that class as your web method's return type.

(If you didn't understand any of that, I would recommend starting off with a tutorial on web services - if you opt for C#, Microsoft has a good set of introductory guides on the Visual Studio Express site)
×

Success!

Help @kalyform spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...