webservise

Posted by Klbaiju under ASP.NET on 9/21/2009 | Views : 1701 | Status : [Member] | Replies : 8
Hi iam try a webservice example

i want to call an xml file avilable on net by webservice and display in a grid

url is
http://sites.google.com/site/iphonesdktutorials/xml/Books.xml

i need the sample code

it is urgent for me

K L BAIJU




Responses

Posted by: Rtpharry on: 9/21/2009 [Member] [MVP] Bronze

Up
0
Down
I had a little look around for web service samples. This one shows you how to bind a grid view to web service:

http://www.codegod.de/WebAppCodeGod/webservice-aspnet-with-gridview-and-datagridview-AID310.aspx

Its not a perfect fit because the source isnt an xml file but hopefully it will help you a bit...

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/22/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day Klbaiju

look at this

http://www.webservicelist.com/


Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Rtpharry on: 9/23/2009 [Member] [MVP] Bronze

Up
0
Down
Thats a good site Vuyiswa, I haven't seen it before! --added to bookmarks-- :)

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/23/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Cool :) My Website uses a lot of web service from that site

Thank you for posting at Dotnetfunda
[Administrator]

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Klbaiju on: 9/24/2009 [Member] Starter

Up
0
Down
Hi friend i visited that site.
iam trying a bible webservice
this is the url
http://www.webservicex.net/BibleWebservice.asmx
in my example i add
webreference
and add that url
and i import that name space
but it is not working

i want to display the result in a grid view
it need 3 parameter
booktitle,chapter,verse
my requirement is

if i enter these parameter in 3 texbox . if enter the button result should be display in a gridview
how it is possible



Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 9/24/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Day Klbaiju

You cannot just bind anything to a Gridview. Most of the Functions exposed by the Web service they return a String. To use the Third part webservice , you need to Go to your Visual Studio and Add Web Reference and enter the URL you have given us , and give your Web service a meaningfull name in your VS to access it and when you are Done do it like this

private String Bind_Grid()
{
BIBLE.BibleWebservice obj = new BIBLE.BibleWebservice();

String Word = obj.GetBibleWordsByBookTitleAndChapter("Genesis", 1);

return Word;
}


i have used one of the Functions and i hardcoded the parameters as you can see i looked for Genesis 1, and in my page load i call the Function and write the Results in the page not grid, like this
    protected void Page_Load(object sender, EventArgs e)

{
Response.Write(Bind_Grid());

}


You cant bind everything to a Grid.

Thank you for posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Klbaiju on: 9/30/2009 [Member] Starter

Up
0
Down
Hi i really struchk here.

this is an xml file

<?xml version="1.0" encoding="utf-8" ?>
<persons>
<person>
<ID>100</ID>
<Name>arun</Name>
<City>LA</City>
<Job>Se</Job>
</person>
<person>
<ID>101</ID>
<Name>Biju</Name>
<City>CA</City>
<Job>Doctor</Job>
</person>
<person>
<ID>102</ID>
<Name>Vikram</Name>
<City>GA</City>
<Job>Driver</Job>
</person>


</persons>
i want to do a webservice using xmlfile
my requirement is if i pass the id the corresponding name,city and job will be displayed

how it is possible

K L BAIJU


Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kalyaninalluri on: 10/5/2009 [Member] Bronze

Up
0
Down
Web services are distributed asp.net applications that are designed to share business logic over the network.Simplest way to make a web service is to inherit your class from web service base class although it is possible to create a web service, which does not inherit from it. You can communicate with a web service using HTTP -GET, HTTP-POST or SOAP protocols. Web services are about discovery, description and prototcols. UDDI and DISCO specifications are used to discover a web service. WSDL i.e. web service description language is used to describe web service. Clients that communicate with web services use WSDL to create their web service proxies.



Klbaiju, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response