Solved

Consume webservices

Posted on 2008-09-30
4
494 Views
Last Modified: 2012-05-05
I have a webservice done.

How do I start to consume the service

Up to now I have created the proxy class on my project
webservices.doc
0
Comment
Question by:magie2858
  • 2
  • 2
4 Comments
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 22603945
shoudnt your GetContent getContent = new GetContent(); in webservicetest.aspx.cs  file be in some funciton which you will call after some event
0
 

Author Comment

by:magie2858
ID: 22604001
Hi Raqi

So I have to create a function that I call after an OnClick event before I use the get content method?

If yes can you pelase give me an example.  Something simple like

I click input on a text box an id and when i click a button the result appears on a label

I am not actually sure that this is so simple with c# but if it is I would appreciate your help

0
 

Author Comment

by:magie2858
ID: 22604094
Hi John

but I cannot get it to work

I thought the relevant to me section from the article you email me is the
"Configuring Multiple Site Maps in the Web.config file" because different areas of my website need different navigational structures.

So I've done two  sitemap files

the Web.sitemap and the Members.sitemap and I added the code on the Web. Config

below are the code snippets

------------------------------------------------

This is the Web.sitemap

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
  <siteMapNode url="~/resort.aspx" title="RESORT DETAILS"  description="Resort Details">
  <siteMapNode url="~/food.aspx" title="FOOD &amp; ENTERTAINMENT"  description="Food and Entertainment"/>
  <siteMapNode url="~/photogallery.aspx" title="PHOTO GALLERY"  description="Photo Gallery" />
  <siteMapNode url="~/accommodation.aspx" title="ACCOMMODATION"  description="Accommodation" />
  <siteMapNode url="~/facilities.aspx" title="FACILITIES"  description="Facilities" />
  <siteMapNode url="~/leisure.aspx" title="SPORTS AND LEISURE"  description="Sports and Leisure" />
  <siteMapNode url="~/directions.aspx" title="HOW TO GET THERE"  description="How to get there" />
  <siteMapNode url="~/localinfo.aspx" title="LOCAL INFORMATION"  description="Local Information" />
  <siteMapNode url="~/weather.aspx" title="WEATHER"  description="Weather" />
 
 
  </siteMapNode>
</siteMap>


AND THE Members.SiteMap

?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    <siteMapNode url="memberscare.aspx" title="Members Care"  description="Members Care">
        <siteMapNode url="membersprofile.aspx" title="Members Profile"  description="Members Profile" />
      <siteMapNode url="services.aspx" title="Services &amp; Downloads"  description="Services and Downloads" />
      <siteMapNode url="calendars.aspx" title="Holiday Calendar"  description="Holiday Calendar" />
      <siteMapNode url="exchange.aspx" title="Holiday Exchange"  description="Holiday Exchange" />
      <siteMapNode url="fees.aspx" title="Annual Fees"  description="Annual Fees" />
      <siteMapNode url="bookonline.aspx" title="Holidays online"  description="Holidays Online" />
      <siteMapNode url="faqs.aspx" title="FAQ's"  description="FAQ's" />
      <siteMapNode url="suggestions.aspx" title="Members Suggestions"  description="Members Suggestions" />
    </siteMapNode>
</siteMap>

Code from the Web.Config
<siteMap defaultProvider ="XmlSiteProvider">
    <providers>
      <add
      name ="MembersSiteMap"
      type="System.Web.XmlSiteMapProvider"
      siteMapFile="Members.sitemap" />
     
    </providers>
   
  </siteMap>


--------

Then I created a new page and drag a new TreeView from the Tools
On the Choose Data Source / new Source I selected SiteMap but only gives me the option of the first site map. I typed the name of the Members Site Map as it is on the WebConfig but I get nothing but more tthan Root 1 / Parent / Leaf but no connection to my Members Site Map
Can you let me know where I am going wrong.

Thank you
 
0
 
LVL 26

Accepted Solution

by:
Anurag Thakur earned 125 total points
ID: 22639904
sorry for the late reply
the follwoing link sample explains how to create and consume a simple web service
http://www.codersource.net/published/view/332/simple_web_service_in.aspx
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
For some reason Google Apps has decided to reserve 'www' for your new domain which results in an error when trying to map the web address 'www' to a certain site in your Google Sites. The error is 'this address is already being used' and after some …
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question