Re: Using XML Web Service in VS.NET

Dear all,

I added a "test.asmx" file in my current project and I coded all Web Method in the test.asmx.cs in VS.NET. Now I want to ask how can I call the web methods in other C# Class? Suppose the class name of the asmx is "test". How can I instantiate the object of that class?
Regards,
Joe
0
joecch
2/9/2004 4:34:57 PM
asp.net.xml-web-services 7071 articles. 0 followers. Follow

2 Replies
1028 Views

Similar Articles

[PageSpeed] 45

someone can correct me on this....

i hav done a walkthrough using XML webservice. I have created a windows application that can call methods from the webservice, with the use of a dataset in the webservice.
after "adding a web reference" to my windows application i could call the methods like:
// BEGIN CODE
MyWinApp.localhost.test ws = new MyWinApp.localhost.test() ;
ws.Credentials = System.Net.CredentialCache.DefaultCredentials ;
// END CODE
where MyWinApp was the project name of my windows application and,
test is your asmx file on the webservice.
from there you can use ws.YourMethors(YourParameters);
or however your functions work...
make sure ALL your web methods each individually have [WebMethod] at the begginning of the method itself if you want them all to be seen by other projects that access the webservice.
hope that could help...
Gattling
0
gattling
2/9/2004 11:24:01 PM
How about the web services are located in remote machine, says URL of the asmx file containing the web nethods I want to call is http://www.king.com/test.asmx? How can I obtain the object reference in order to invoke the methods?
0
joecch
2/10/2004 11:12:20 AM
Reply:

Similar Artilces:

xml web service --uploading the file to the xml web service
how can we upload the file in the xml web service 1.i mean what will be the return value in the proxy class 2.and how am i going to send the file to the xml web service----regards Bipul Kumar Here are some links to articles that helped us get this done: http://msdn.microsoft.com/webservices http://www.microsoft.com/downloads/details.aspx?familyid=06255a94-2635-4d29-a90c-28b282993a41&displaylang=en https://www.sys-con.com/dotnet/article.cfm?id=458 Hope this helps....

How to call a .net web service from another .net web service?
Hi all,I have developed two asp .net web services using visual studio .net 2003.I wish to call one web service from another web service.I tried adding a web reference of the web service in another web service and was able to do so.but i m not able to access the web methods provided by the web servicecould you please suggest a way to go about itExpecting quick replyThanxCharmy try to make sure that you reference it in the web reference and call it properly this is sample  [WebMethod()] public double CalcDistance(int x1, int y1, int x2, int y2) { Calculator.Service1 calc = new...

.NET web services Vs Java Web Services
Hello, does anyone know of a book or good source of information that compares .NET and Java Web Services? (I would like soemthing neutral if possible). I am thinking of approaching this subject for my dissertation? Many Thanks Rob Hi Rob, Last year I had to give a powepoint presentation on Web Services. I noticed some good books at barnes and noble that discussed the subject. These books were specific to Java and discussed Web Services in a very clear fashion. They gave some elementary examples that were easy to understand. I have not yet had the pleasure of creatin .NET Web Servi...

.NET vs Java XML Web Services
Does anyone know out of .NET and Java, which one performs better via XML web services? I think that it would really just depend on where you are wanting to deploy your web service. Since both have the overhead of a framwork behind them I would imagine that any performace gains would be small. If you are deploying in a Windows environment I would go with .NET, but mainly because I just like it better. If you want to deploy in Windows and Linux I would use Java. I am not sure how far Mono has come on the Linux platform and if you do not use C# mono would not help you anyway.It's not a bug, i...

Web service in .NET from Java Web Service
Hi there,I'm pretty new to .net (although i have years of experience with the old vb 6, access 2k, as well as java)... and need some with perhaps either some syntax or something.Here is the wsdl.<wsdl:definitions targetNamespace="http://www.dynix.com/schema/book">−<wsdl:types>−<schema targetNamespace="GetBookInfoByISBN">−<complexType name="BookInfoType">−<sequence><element maxOccurs="1" minOccurs="0" name="Title" nillable="true" type="xsd:string"/><element maxOccurs=&quo...

XML vs XML Web Services
I'm getting up to speed with XML and have the following questions: 1) Knowing XML means knowing how to design and create XML Web Services? 2) I found the amount of details on XML/XML Web services overwhelming, harder to digest than HTML or a new language. What's the best approach to learn and use it? Thanks.Please mark the post(s) that have helped you as "Answer" 1. No. They are different things 2. I'd start with a basic XML foundation (basic XML, XPath, and XSD), then review the basic WS things: soap, WSDL, and then from there on move to the WS-specs.Tomas Restrepo ...

.NET Web Service Proxy (EasySoap vs .NET)
Greetings all, I was provided with a URL for a web service that is password protected. I saved the WSDL file from the browser and am attempting to create a .NET Web Service Proxy to use it. When I select EasySoap for the 'Web Service Selection', I see one service ('Services') and five 'Structures' (which is the number of 'methods' that I am expecting to see). But when I select .NET, I still see one service (named differently) and only one structure. Four of the structures are missing. Is there something else I need to do to view the four ...

Can you return .net web controls in a .net page from a web service?
I've got a problem with a project. I've got to compile an entire .net page and return it as part of a Web Service for display. The problem I have is that I need to add WebControls and functionality to the page so that not only the html content and images are displayed (which I've managed) but that textboxes, labels, buttons and datasets can be displayed also. Essentially I need to make a call from one site for a page, populate the page and return it in a state as though it resided on the same server/webspace as the calling page. Code is currently built as follows into a string: strOpenHT...

Adding a VS.NET web reference for more than one web service?
I have a web app exposing several web services: SignOnService.asmx UserService.asmx AdminService.asmx etc I have a Winform app that consumes these services. When I go to Add Web Reference in the winform app, I have to add each one individually as their own web reference. How would I set this up so that they can all be added as one web reference? I think you will have to add them to one file (.cs or .vb) the reason they are comming up separately is becuase they are seperate, they are seperate web services(asmx files), classes and have seperate WSDL description...

Asasp.net web service and xml problem
Hi all ,Im using ,net framework 2.0This is the web service I wrote by request of AS developer (Action script) but when he consume the service  he got the result like this .. <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">   <soap:Body>     <GetTransportDetailsResponse xmlns="http://tempuri.org/">       <GetTransportDetailsResult>&lt;TransportMethods&a...

Consuming .net xml web service in PHP
I have developed .net xml web service. I want a develope php client to access this web service. I dont have much knowledge about PHP. The web service i wrote accepts two string parameters FirstName and LastName, and returns string like Welcome (FisrstName)__(LastName) to web service. The sample php client code i am trying is as below: <?php require_once('nusoap.php'); $parameters = array ("FirstName"=>"Russel", "LastName"=>"Arnold"); // Create a new Soap object $soapclient = new soapclient('http://testwebservice/Servi...

creatig and returning xml in .net web service
I am new to the .net web service world. Recently I started writing a web service. This web service is going to interact with Java client. Hence I will be returning XML from web service. I am writing web service using vb.net in VS2008. My web service is goign to call a stored procedure. Stored procedure is supposed to retun me some records. Based on these records I have to create XML and return it as web service response. Till now I was able to write web service and stored proc. I am not sure how to build a response xml. Does anybody have any link or any idea on how to do this. I trie...

any open source of xml .net web services?
any open source available for xml .net web services by using either vb.net or c#? please advise, thanks. I am not sure how to adapt framework. Basically I want to setup xml web services for people who is using colf fusion to connect my app. Also, what about sqlxml? you can host iis as soap calls too? which one is better sqlxml web service? or xml .net web services? please advise too. thanks for the help...

C#.NET Web services: Manipulating XML
Hi, I am developing a web service in C#.Net1.1 and a new bee to .NET. I have developed a web method to retrieve the data from database and I want to sent the response in the form of XML.I want to manipulate the dataset to get the desired XML.But I dont know how to do that? Can somebody help me in formatting the XML. Also, once I will format the XML, what return type I should use in web method to get XML file as output. Thanks in advance. First of all, I'm sure you already knnow that .NET 1.1 is rather old. At any rate, make sure you're using the latest service pack for .NET 1.1...

Web resources about - Re: Using XML Web Service in VS.NET - asp.net.xml-web-services

Public Broadcasting Service - Wikipedia, the free encyclopedia
... such as PBS NewsHour , Masterpiece , and Frontline . Since the mid-2000s, Roper polls commissioned by PBS have consistently placed the service ...

Netflix starts blocking VPNs, proxies, and other unblocking services
... VPNs. Last week, on January 14, Netflix said that it would begin cracking down on customers who use VPNs, proxies, or other "unblocking" services ...

India is accusing Facebook of misrepresenting how many people want its free internet service
The Indian government is accusing Facebook of misrepresenting how many users expressed support for Free Basics, the company's plan to bring free ...

Bluelock Certified with Advanced Designations to Provide Cisco Powered Cloud and Managed Services
Bluelock Certified with Advanced Designations to Provide Cisco Powered Cloud and Managed Services Business Wire (press release) INDIANAPOLIS(BUSINESS ...

Police: Drive-Thru Customers Attacked Burger King Worker Over Slow Service
We know it can be frustrating to wait for your food to be cooked, bagged, and passed to your eagerly awaiting hands, but it is never okay to ...

Digitimes Research: Amazon launches Alpine chips to support its entertainment services
... in January 2015, Amazon has recently launched its Alpine family chips for front-end network and multimedia applications. The Internet service ...

Cox Gives Up on Its 'Me Too' Streaming Video Service -
Cox has given up on the company's streaming video service before it has even hit the broader market. Back in November we noted how Cox was the ...

IBM might buy live video service UStream for $130 million
The first name that comes to mind when you hear "live-streaming video" might be Twitch, but even despite how that service has grown, it isn't ...

Landesk Unveils Service Desk 2016 with Skype Adapter
The Design App Store allows service desk administrators to create, view and select new modules and customizable capabilities.

General Motors Embraces The Future With Car-Sharing Service Maven
Maven, the new umbrella brand for General Motors's car-sharing efforts, points to a future in which car ownership is no longer the norm. It's ...

Resources last updated: 1/22/2016 8:30:19 PM