Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help using Airport Web Service

Status
Not open for further replies.

abcfantasy

Programmer
Jun 3, 2006
110
DK
Hello, I'm new to web services and I need to create an Airport Web service using
My problem is, when I add the web reference, no data source is added. I had used a weather tracking service for a tutorial, and a data source had been added.

Should I create the database manually? Right now all I'm getting is the results in a long string (xml format i guess).

Any help will be appreciated
Thanks in advance
Andrew

ABC -
 
You should expect to get XML from a webservice - it makes it very easy to deal with!

As for the database - I would recommend creating your own database unless one has been provided to you.

Make your next tutorial on how to deal with xml.
 
I think the author of the WS should change the return from String to DataSet.
 
If the return type is changed to DataSet, only .Net apps could use the service, correct?
 
Yeah.

The idea of XML is that it can pass data through any firewalls, port appliances, and over any OS. You can easily take that data and turn it into a dataset though.

Otherwise its like saying "I think MS should return my sql query as a listview for my form"

It just wouldn't work...
 
Thanks for the help.

I learned how to read values from Xml.

As for the database:
First of all, defining a new table, there is a datatype Xml. Can this be of any help and simplify my work?

Secondly, I'm also new with databases. Would it be good to use DataAdapter.Insert( ) to add a new row?

Thanks again
Andrew

ABC -
 
Sorry for posting again but I think I'm doing it all wrong. What I have in mind is to read the values in the xml one by one and store them in variables, then use the Insert() method passing those variables as parameters to add the new row.

But I think there is a faster and more automatic way of adding the data. I've noticed that the xml string starts with the following:

<NewDataSet> <Table> <Airport...

So could there be a way of linking that xml to the dataset maybe?

Thanks, any help is much appreciated.
Andrew

ABC -
 
Look at this:

DataSet ds = new DataSet();
ds.ReadXml(yourXMLStream);

 
Yeah i noticed about that one. But what should I do next?

I've got the data set created already. This is what I'm doing:

Code:
this.airportDatabaseDataSet.Airports.ReadXml( sReader );
this.airportsTableAdapter.Fill( this.airportDatabaseDataSet.Airports );

But the data grid is still empty.
What am I missing?

ABC -
 
datagrid.DataSource = airportDatabaseDataSet;
datagrid.DataBind();
 
Sorry but it seems I'm getting nowhere.

By datagrid do you mean the datagridview? It's data source is set to the airportsBindingSource, whose data source is set to airportDatabaseDataSet. And it has no DataBind method.

I'm really lost in this. I lost track of what's happening and what's not happening. I got tired of trying out different ways and test different things, and never had any result.

ABC -
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top