web-services

How do I fill a DataSet or a DataTable from a LINQ query resultset ?

How do you expose a LINQ query as an ASMX web service? Usually, from the business tier, I can return a typed DataSet or DataTable which can be serialized for transport over ASMX. How can I do the same for a LINQ query? Is there a way to populate a typed DataSet or DataTable via a LINQ query?: public static MyDataTable CallMySproc() ...

How do I print an HTML document from a web service?

I want to print HTML from a C# web service. The Web Browser control is overkill, and does not function well in a service-environment, nor does it function well on a system with very tight security constraints. Is there any sort of free .NET library that will support the printing of a basic HTML page? Here is the code I have so far, th...

Homegrown consumption of web services

I've been writing a few web services for a .net app and now I'm ready to consume them. I've seen numerous examples where there is homegrown code for consing the service as opposed to using the auto generated methods Visisl Studio creates when adding the web reference. Is there some advantage to this?...

How to pass enumerated values to a web service

My dilemma is, basically, how to share an enumeration between two applications. The users upload documents through a front-end application that is on the web. This application calls a web service of the back-end application and passes the document to it. The back-end app saves the document and inserts a row in the Document table. The d...

Timer-based event triggers

I am currently working on a project with specific requirements. A brief overview of these are as follows: Data is retrieved from external webservices Data is stored in SQL 2005 Data is manipulated via a web GUI The windows service that communicates with the web services has no coupling with our internal web UI, except via the database....

How to easily consume a web service from PHP

Is there a tool for PHP which can generate code for consuming a web service based on its WSDL? Something comparable to clicking "Add Web Reference" in Visual Studio or the Eclypse plugin which does the same thing for Java. ...

Document or RPC based web services

My gut feel is that document based web services are preferred in practice - is this other peoples experience? are they easier to support? (I noted that Sharepoint uses Any for the "document type" in its WSDL interface, I guess that makes it Document based). Also - are people offering both WSDL and Rest type services now for the same fu...

C# WCF Service - Backward compatibility issue

I'm just getting into creating some WCF services, but I have a requirement to make them backward compatible for legacy (.NET 1.1 and 2.0) client applications. I've managed to get the services to run correctly for 3.0 and greater clients, but when I publish the services using a basicHttpBinding endpoint (which I believe is required for...

Web Services -- WCF vs. Standard

Working on a new project and was wondering was there any benefit with going with a WCF web service over a regular old fashion web service. Visual Studio offers templates for both. What are the differences? Pros / Cons? ...

ASP.NET Web Service Results, Proxy Classes and Type Conversion

Hi guys, as you can probably tell from my rep, I have just got my invite so I am a complete n00b! :D First off I would like to say thanks to Jeff and the team for what looks like is going to be an excellent site for the community. So, my question: I am still kinda new to the ASP.NET world, so I could be way off base here, but so far th...

Where can I find some good WS-Security introductions and tutorials?

Can anyone point me to some decent introductions to WS-Security? I'm looking for tutorials or something that provide a fairly gentle introduction to the subject, though I don't mind if it assumes basic knowledge of web services and SOAP. Most of the stuff I've seen so far is very technical and you need a lot of complex, detailed backgro...

Best way to write a RESTful service "client" in .Net?

What techniques do people use to "consume" services in the REST stile on .Net ? Plain http client? Related to this: many rest services are now using JSON (its tighter and faster) - so what JSON lib is used? ...

Calling REST web services from a classic asp page

I'd like to start moving our application business layers into a collection of REST web services. However, most of our Intranet has been built using Classic ASP and most of the developers where I work keep programming in Classic ASP. Ideally, then, for them to benefit from the advantages of a unique set of web APIs, it would have to be ca...

What is the difference between an endpoint, a service, and a port when working with webservices?

I've used Apache CXF to expose about ten java classes as web services. I've generated clients using CXF, Axis, and .NET. In Axis and CXF a "Service" or "Locator" is generated. From this service you can get a "Port". The "Port" is used to make individual calls to the methods exposed by the web service. In .NET the "Service" directly e...

best way to persist data in .NET Web Service

I have a web service that queries data from this json file, but i don't want the web service to have to access the file every time. I'm thinking that maybe i can store the data somewhere else (maybe in memory) so the web service can just get the data from there the next time it's trying to query the same data. I kinda understand what nee...

File Uploads via Web Services

Is it possible to upload a file from a client's computer to the server through a web service? The client can be running anything from a native desktop app to a thin ajax client. ...

Returning Large Results Via a Webservice

I'm working on a web service at the moment and there is the potential that the returned results could be quite large ( > 5mb). It's perfectly valid for this set of data to be this large and the web service can be called either sync or async, but I'm wondering what people's thoughts are on the following: If the connection is lost, the...

How much extra overhead is generated when sending a file over a web service as a byte array?

This question and answer shows how to send a file as a byte array through an XML web service. How much overhead is generated by using this method for file transfer? I assume the data looks something like this: <?xml version="1.0" encoding="UTF-8" ?> <bytes> <byte>16</byte> <byte>28</byte> <byte>127</byte> ... </bytes> ...

Is it possible to return objects from a WebService?

Instead of returning a common string, is there a way to return classic objects? If not: what are the best practices? Do you transpose your object to xml and rebuild the object on the other side? What are the other possibilities? ...

.Net - Returning DataTables in WCF

I have a WCF service from which I want to return a DataTable. I know that this is often a highly debated topic, as far as whether or not returning DataTables is a good practice. Let's put that aside for a moment. When I create a DataTable from scratch, as below, there are no problems whatsoever. The table is created, populated, and r...