Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi..

I have created webservice in version 3.5 and my application is in version 1.1.

and i have created class in webservice because that class doesn't support old version.
and i want to use that class in my application.. but when i create object of webservice it only shows the webmethod..not class to call.

So ,how can i solve this problem??

Help would be appreciable..
Posted

Are using a .Net WebServive? If so the on solution explorer right click on your client app and choose add service reference.
 
Share this answer
 
Comments
ssd_coolguy 5-Jun-12 9:04am    
hey dude... please read my question carefully. i was not asked about how to add webservice in application.
BlaqProdukt 5-Jun-12 9:10am    
Ohk So you are saying you cant create class objects? Try refreshing the reference the webservice.
ssd_coolguy 5-Jun-12 9:21am    
hey nope...
see i have created webservice and created one class in that webservice (class clsxml) and now when i create object of that webservice that time i want to use that class(clsxml).. but how??
Assume the code below is your webservice

C#
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Diagnostics;
using System.Web;
using System.Web.Services;

namespace WebServiceExample
{
    public class Service1 : System.Web.Services.WebService
    {
        public Service1()
        {
            
            InitializeComponent();
        }

        
        // Add the Description Attribute so you
        // will know the purpose of your WebService
        [WebMethod(Description="This Method prints HelloWorld")]
        public string HelloWorld()
        {
            return "Hello World";
        }
    }
}


Are you saying that you want to use the class "Service1"? or you have an inner class within Service1?
 
Share this answer
 
Comments
ssd_coolguy 5-Jun-12 9:30am    
hey you are saying about webmethods... and i am asking about class in webservice..
if you didn't get question then ask for more clarification..
please don't post it in answer...
BlaqProdukt 5-Jun-12 9:36am    
Ohk you're a bit rude considering I am trying to help. Forget I said anything, maybe someone more preferable to you will answer. nice working with you
ssd_coolguy 5-Jun-12 9:42am    
hey dude.. sorry please don't mide. sorry if i said anything. but actualy from morning i am trying to get answer but i can't hence..i am frustrated.. :(

Thanks for your reply...

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900