Solved

Consume webservices

Posted on 2008-09-30
4
486 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

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…
Online collaboration is quickly becoming embedded in the workplace, and its benefits are tangible. See what the current landscape looks like and what the future holds for collaboration tools and the future of work.
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…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…

773 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