Application db connection in web service. i haveto connect the db using that web service. can u help
Not the clearest of questions, but right clicking on references and choosing Add Web Reference should help?
Try adding the reference of the webservice you want to use. The wsdl file will give you the name of the method and the parameters to that method and its return type.
Create the instance of the webservice and invoke the method you want to use as you would have done in case of a normal method.
You should be able to consume the webservice easily as the marshalling, unmarshalling, sending and receiving the data on the network is all done by the .net framework.
Kalpak
You can go through this good starting point tutorial from Scott. It explains step by step how to create and consume web service.
If you are using visual studio 2008:
- Right click on references and click Add Service Reference.
- In the "Address" box, put the location of the wsdl of the web service you are trying to connect to and click go.
- Give it a namespace to put the proxy objects in.
- This will give you a set of objects in the namespace you entered previously including one "ServiceNameClient", use this to call the service.
If you are using visual studio 2005:
- Right click on references and click Add Web Reference.
- In the "URL" box, put the location of the wsdl of the web service you are trying to connect to and click go.
- Give it a name, this will be a namespace to put the proxy objects in.
- This will give you a set of objects in the namespace you entered previously including one "ServiceName", use this to call the service.