How to make a webservice available to majority of platforms?

R

Ralph

I'm new to webservices but not .Net and was wondering if anyone could
give suggestions on how to build a service that would be available to
ColdFusion clients (internal) as well as unknowns (internet).

I think in most cases my problem is understanding how best to pass
"complex dataypes" back. Say I have a service method that returns
many company names and addresses (several rows with several fields)
based upon a passed in value. If I was building it all in .Net I would
just return something like a dataset or datatable but dealing with
cold fusion and or other platforms I'm not sure how it would be best
to pass that information back. I thought I read it was not good to
pass back a dataset/table because the other systems might not be able
to reconcile the datatype. If someone could give me some tips I would
greatly appreciate it.

Thanks
 
J

Jan Tielens

If you're going for interop., stay away from DataSets and DataTables (like
you mentioned). In most cases custom classes are used instead. For example
suppose you have a Customer table, you'd have to create a Customer Class:

public class Customer
{
public string Name;
public string Telephone;
}

Your webmethod would look like this:
public Customer[] GetCustomers()
{
}

Of course you can choose to implement properties instead of fields.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top