Solved

Consume webservices

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

Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

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…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
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…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

732 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