Solved

Consume webservices

Posted on 2008-09-30
4
507 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

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.
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
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…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

690 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