Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7955453
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:42:58+00:00 2026-06-04T03:42:58+00:00

Hi All below is a WebService Class which i would like to use (i

  • 0

Hi All below is a WebService Class which i would like to use (i wrote it). The problem is i am not quite sure how to go about using it. I have a WinForm that Connects to a DB through another instance of DataAccessObject.

The user must be able to click a button which will open the website version of the form and modify the database from there.

The Problem is i don’t know how to Use The Service To Do so

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
using System.Xml.Linq;
using System.Configuration;

/// <summary>
/// Summary description for DataManager
/// </summary>
[WebService(Namespace = "/201103578Site//Default.aspx")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
// To allow this Web Service to be called from script, using ASP.NET AJAX, uncomment         the following line. 
//[System.Web.Script.Services.ScriptService]

public class DataManager : System.Web.Services.WebService 
{
    XElement[] xmlCompany = null;
    XElement[] xmlCandidate = null;
    XElement[] xmlQualification = null;

    public DataManager () 
    {
        //Uncomment the following line if using designed components 
        //InitializeComponent(); 
        DataAccessObject.DataAccessObject daoDataBase = new     DataAccessObject.DataAccessObject(ConfigurationManager.ConnectionStrings[1].ToString());
        daoDataBase.openConnection();

        xmlCompany = daoDataBase.sqlSelectCompany(new SQL.SqlImplementation(), "Select     * From Company");
        xmlCandidate = daoDataBase.sqlSelectCandidate(new SQL.SqlImplementation(),     "Select * From Candidate");
        xmlQualification = daoDataBase.sqlSelectQualification(new     SQL.SqlImplementation(), "Select * From Qualification");
        daoDataBase.closeConnection();
    }

    [WebMethod]
    public XElement[] getXmlCompany()
    {
        return xmlCompany;
    }

    [WebMethod]
    public XElement[] getXmlCandidate()
    {
        return xmlCandidate;
    }

    [WebMethod]
    public XElement[] getXmlQualification()
    {
        return xmlQualification;
    }

}

I would like to call the getXmlCompany and any of the other methods from the Company.aspx.cs file like one would any other method – if possible

Kind Regards

Markus

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T03:42:59+00:00Added an answer on June 4, 2026 at 3:42 am

    When you debug the web service, if everything is right, you will see a list of your web methods there. Now, copy the url in the browser, go to the project that need to use it, add web reference and past the url in. It will look and display your webserivice.

    Further more, you can look into hosting your webservice in IIS so you don’t have to run debug every time.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi All below is the code which i use. <!DOCTYPE html PUBLIC -//W3C//DTD XHTML
I have this problem regarding sql which i will be using in a webservice
I'm using all of the below to take a field called 'code' from my
I have an array of array like below with all numeric values. I want
All of the names below are generic and not the actual names used. I
HI all, I am not sure whether this is possible in C# or in
I've been trying to use a Web Service which has the WSDL file below.
I have an xml webservice which I'm fetching using PrototypeJS. The xml has the
Hi all i am using json to pass data in wcf service. Below is
I'm looking for some thoughts on which design pattern(s) to use for my problem,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.