web-services

Calling a web service from a windows service

I'm sure there's an elegant solution to the problem but I just can't get my head around it. I am trying to call a web service from within a Windows service. The web service is secured (using Windows authentication). The account that the windows service runs under does have the rights to call the web service but I can't figure out how to ...

Returning XML natively in a .NET (C#) webservice?

I realize that SOAP webservices in .NET return XML representation of whatever object the web method returns, but if I want to return data formatting in XML what is the best object to store it in? I am using the answer to this question to write my XML, here is the code: XmlWriter writer = XmlWriter.Create(pathToOutput); writer.WriteStar...

Serialising state that is NOT exposed as a property

I have a problem with serialisation. The class in question represents a network packet and has an associated byte array for payload, which may be null. I exposed this using GetData and SetData methods in line with Microsoft Framework Design Guidelines recommendations, because in order to prevent bizarre crosstalk, reading and writing th...

Secure method for registering new application instance with server

I have a client/server application and I'm wondering what is a secure method to implement registration of new clients with the server. So far, I have the following: A user downloads the client from them web, and installs it. During the installation the client registers with the server and receives a secret key (certificate). Each follo...

Using web.py as non blocking http-server

while learning some basic programming with python, i found web.py. i got stuck with a stupid problem: i wrote a simple console app with a main loop that proccesses items from a queue in seperate threads. my goal is to use web.py to add items to my queue and report status of the queue via web request. i got this running as a module but c...

RESTful Design: Paging Collections

I am designing a REST api that needs paging (per x) enforces from the server side. What would be the right way to page through any collection of resources: Option 1: GET /resource/page/<pagenr> GET /resource/tags/<tag1>,<tag2>/page/<pagenr> GET /resource/search/<query>/page/<pagenr> Option 2: GET /resource/?page=<pagenr> GET /resou...

RESTful webservice to sum a list of numbers.

PHP makes this sort of thing dirt simple but I'd like to know how other languages do it. To standardize on a simple example, how would you implement the following webservice to sum a list of numbers: http://server.com/sum?summands=LIST where LIST is a list of space-separated real numbers. For example, http://server.com/sum?summands...

Analyze the use of a ASP.NET webservice

Hi, long time ago I wrote webservice that is still in use. Now I plan to refacture it. The webservice is full of most likely unused functions and I have no idea how it is used by the clients. In order to strip away the unused functions I need to analyze the function calls and data of currently installed webservice. Is there a (free/ope...

how to Intregate Yahoo API Search in web-Application using Asp.net

hello everyone i want to intregate yahoo search api in my web application in asp.net with c#. i don't know how to call yahoo api. pls tell me with code. ...

ASMX page returning old Web Methods

I must be dumb (and i m sure i am making mistake but cant figure out at the moment) Actually i deployed ASMX page containing reference to a Class Library which contains few web methods. It exposes those methods when i browse the site. But some how it is not showing me any further methods which i have added in it. The DLL is strong name ...

Problem Converting byte[] to Bitmap c#

Hi, I have an urgent problem, i'm trying to convert a byte array to a bitmap but it always shows me: System.ArgumentException: Parameter is not valid. my code is as follow: Im passing the bytes through a webservice with: string DecodedString = string.Empty; DecodedString = System.Text.Encoding.GetEncoding(1251).GetString(bytes); s...

Adding fields to a WebService

I have a SOAP service that exposes a method TradeDetail getTradeDetail() TradeDetail stores 5 fields, transaction number, dates etc I need to add a couple of fields to TradeDetail. I want to keep backward compatibility (for a while) and it looks as if my options are limited to creating a new class with the extra fields TradeDetail2 ...

Flags with web services

I have a flag attribute enumeration that is behind a web service as follows: [Serializable,Flags] public enum AccessLevels { None = 0, Read = 1, Write = 2, Full = Read | Write } My problem is the consumer of my web service does not have the original constant values of the enum. The resulting proxy class client side has...

DefaultCredentials in Accessing CRM / Sharepoint Web Services

Hi everyone, I made an application that access CRM's web service. The problem is, when I deployed the dll into Sharepoint server, it returned error 401 unauthorized. Apparently the System.Net.CredentialCache.DefaultCredentials didn't work (my suspicion). Here's the code. CrmSdk.CrmAuthenticationToken token = new CrmSdk.CrmAuthenticatio...

Lightweight Webservice producing in Java (without an application server)

Is there any Java library allowing to build a simple standalone webservice server without any application server framework? ...

Least intrusive way of securing a web service?

I am maintaining a public website (no authorization required) that uses web services over https to perform various operations. Most of the calls to the web services are invoked from javascript. What has recently occurred to me is that a malicious hacker could, if he/she chose to, call the webservices directly in an attempt to play havo...

.NET Remoting vs. Web Services vs. Windows Communication Foundation (WCF)

Anyone willing to help me out with pros/cons on .NET Remoting, Web Services, and WCF? I have worked a bit with .NET Remoting and Web Services and I am architecting a new ASP.NET 3.5 web app where I will be using a SQL 2008 DB. Primarily I am wondering if it would be worthwhile to really look into WCF for this app. In this particular i...

Implementing a nested asynch "call stack" scenario in .NET

I'm attempting to refactor some moderately complex existing .NET code to be usable in Silverlight. The core issue is that all Silverlight web services calls must be asynch, and the existing code was implemented in a fairly typical synchronous manner. Existing call stack for a typical operation might be something like this: Page -> Get...

Which type of creation of web-services is your primary choice?

"Bottom up" or "top down"? First I used top down but I felt to much design options that didn't have any implementation or validation. Now my approach is "bottom up" heaven when a create a new service. Bottom-up: when you use the code to make the web-service. Top-Down: when you create and use the wsdl file to make the web-service and...

flex 3 webservices

hi, im using the webservice component in my flex app but find im using the same code over and over again when using the same webservice calls through my app. Are there any best practices for creating webservice components? Should i be putting all the code in an actionscript class and if so have you any samples? ...