Webservice question

mbf114

Newcomer
Joined
Apr 14, 2003
Messages
11
Location
Pennsylvania
Hello all:
I am doing a project for school which we (My team) are interested in setting up a client which sends a request to an asp listner file which access a database and returns the result. This part is easy, however, we want to have that database populated with information automatically from another webservice already on the web. Does anyone know how this can be done? The basic concept of our project is that our client will have various cities as selections.When a city is selected it will send that cities zip code to our database and pull the temperature for that city.We already have found a webservice that finds the current temperatures for cities based on zip codes but how to capture that XML info and insert into our database is the question.Thanks for your help-- Signed,
A puzzled student
 
It's best you figure out how to do it by yourselves - afterall it is a school project :)
I will give some stuff to think about:
1) Are you sure you need to take the data from the weather ws and add it into yours? It will always be out of sync and doesn't make a lot of sense.
2) Why don't you rather use your db to only hold city names and zip codes, that you will use to call this webservice (e.g. use the selected zip code as input to the ws)
3) A webservice is a piece of code somewhere out there... to use it, like any other dll, you will have to reference it (but as a web reference)

Cheers
 
Thanks for your input

Thanks for your input even though it was not that helpful. I am not asking for the answer as in the code. Just a pointer as to what is involved. Your idea of the database holding the values was our original idea, however, the professor who assigned this task was very clear that the purpose of the assignment is to have 2 webservices communicate and the data stored in the database of our webservice. to retreive. If I could figure out how to set an automatic timer of sorts on the dll of the weather service that would automatically retrieve the data I seek and store it in our database then I could easily retrieve it from there via our webservice. I know how to create and retrieve information from one webservice manually by the click of a button but not from two webservices and not when one is down in the background without user intervention.

compile this code to create an executable which will connect to my test webservice and return the value "sixteenth".

Class module code>>>>>

Function getAll() As String
Dim soapclientx As New SoapClient


soapclientx.mssoapinit ("http://succubus.yk.psu.edu/mbf114/myws/MatthewsWebservice.WSDL")
Dim str1 As String

str1 = soapclientx.getAll()

getAll = str1

End Function

Form Code>>>>>>>>use this code behind a button on form

Private Sub Command1_Click()

'Create a new instance of proxy class
Dim objCProxy As New Class1

MsgBox (objCProxy.getAll())


End Sub
 
Well seeing that its not that helpfull, good luck with your school assignment... the only other pointer I can give you would be to use a windows service to update your db once a day. (but you knew this already?)
 
Back
Top