Solved

Consume webservices

Posted on 2008-09-30
4
466 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now