wcf

Web Services for Remote Portlets in C# / .NET -- Options?

I recently had my mind expanded by a new concept: Web Services for Remote Portlets, or WSRP. I learned of it during a presentation on a Java-based web portal we are considering purchasing at work; we are a .NET shop and WSRP would be the means by which we would extend this portal. Although I cannot control the end decision as to whethe...

WCF: Separate service per Business Entity

Hi, If for example, you have customers, orders and products. Do you create a separate service for each of these business entities? It kinda feels logical that you should create a service contract for each of these. However, since you have to explicitly specify the contract that your service will implement… this sort of forces you to c...

WCF - contract-first vs. code-first - how to document easily / properly?

Folks, I'm facing this problem here: I'm designing my second larger batch of WCF services which external parties will consume. For the first batch, I used a strict "contract-first" approach: manually created the WSDL and XSD files, and from those, generated my service and data contracts and implemented my WCF service. Worked ok, I was...

How to write a WCF REST service that image data can be POSTed to?

I've been looking for examples for how to write a WCF REST service that allows image data to be POSTed to. I may be missing something (I generally am), but does anyone know how to do it? Is it as simple as getting the HTTP request from inside your WCF REST service, and extracting the binary data? If so, is there an example as to how to d...

Problem with WCF client calling one-way operation

I have run into a problem when calling web service on a SAP PI bus from my WCF client. The operation is defined as one-way, and the method on my proxy operation contract is decorated accordingly when the service reference is added. However, the service client gets an exception when calling the according operation: The one-way operation...

What are my binding options for a self hosted cross domain WCF service with remote thick clients?

I'm trying to build a WCF self hosted service (eventually in a windows service) that will receive binary and text base messages from remote thick clients that have no accounts on my hosted machine. I'm trying to figure out both my binding options and security options, and in reading the patterns and practices guides, my head has complet...

Distributed transactions with WCF

Basic architecture: n physical boxes each hosting the same WCF service, sitting begind a load balancer. Each box hitting a single database infrastructure that does not support transactions - don't ask :( So, in the data access layer of my app I need some method of distributed transactions. What are my options? Note that clients to my...

WCF and subclasses

I have this ServiceContract [OperationContract(IsOneWay=true)] void ProcessMessage(Message message); and these objects [DataContract] public class Message { [DataMember] public long Id { get; set; } [DataMember] public string Body { get; set; } } [DataContract] public class ExtendedMessage : Message { [Da...

NetDataContractSerializer equivalent for Silverlight?

Has anyone developed or know of a place where I could find a Silverlight implementation of NetDataContractSerializer? This WCF and Silverlight Comparison states that Silverlight does not ship with an implementation of NetDataContractSerializer. I'm hoping to avoid developing one myself. Thanks! ...

WCF Post / WebRequest Works - WebClient doesn't

Hi, I have a WCF Service declared as follows: [OperationContract, XmlSerializerFormat] [WebInvoke(UriTemplate = "ProessUpload", BodyStyle = WebMessageBodyStyle.Bare, RequestFormat = WebMessageFormat.Xml)] void ProcessUpload(ProductConfig stream); I am trying to call this service using WebClient but I am always getting a response...

Entity framework in a layered architecture?

Doing some experiments around WCF and Entity Framework. A couple of questions. Option 1: I understand that entity framework classes can be serialized over WCF directly, with sp1 onwards. How ever, I would like to know how scenarios like delay loading, eager loading, context management etc is handled in this, if they are handled at all?...

Serialization of objects using WCF and Silverlight

Is there a way to hook into how specific types are serialized when using WCF and Silverlight. For example, I need to tweak how System.DateTime properties are serialized/deserialized. ...

How I can implement sync calls to WCF services in SIlverlight?

Hi! Sometimes I need to call WCF service in Silverlight and block UI until it returns. Sure I can do it in three steps: Setup handlers and block UI Call service Unblock UI when everything is done. However, I'd like to add DoSomethingSync method to service client class and just call it whenever I need. Is it possible? Has anyone re...

Web service discovery in WCF : Ws-Discovery or UDDI ?

I know the distinction between UDDI and Ws-Discovery (well know location to search a service vs broadcast). But my question is : what is the simplest way to discover a webservice in WCF ? By simplest I mean what is already implemented in WCF and can be used now ? I've not seen any built-in implementation in WCF for UDDI or Ws-Discovery. ...

How can I change the address of a WCF service reference?

I have an application which is used internally and uses WCF for communication between client and server portions, however it will soon need deploying to sites where server names are different. The WCF services are hosted as a Windows service using the netTcp binding. At the moment, the addresses of the services are specified using the Ad...

Throwing generic FaultException

I have a WCF service that if something goes wrong throws a generic FaultException. I don't know why, sometimes the clients will catch a non-generic FaultException instead of the generic exception. Does anybody know, what the problem is? ...

How WsDualHttpBinding is doing to know about the callback channel ?

Hi, something seems very wierd to me, I have tried to look inside WCF with Reflector but forgive me it's too hard to understand :(. When client A call a duplex service on server B with wsDualHttpBinding, I was thinking that client A include the client base address (the address of the callback) in the header of the request like this <a:...

Windsor WCF Integration Facility Async

I'm using Windsor WCF Integration Facility and am curently looking for a way to call a method asnyc. I was considering just using a background worker and doing the work on completion. Is there a more elegant way of doing this, i don't have a good feeling with selected way. I've looked at the following email: http://groups.google.com/gr...

WCF Service exposing DTO or Entity

I have read questions and answers about this topic but I still have some question without answer. If I create a method to convert Entity to DTO i'll run into some circular calling methods (probably caused by errors in Model), for example: Product class has a property Supplier that point to a Supplier class that contains a List property...

How to customize WCF XML serialization

We have an existing SOAP web service interface that we want to implement using WCF for a new application. This seems to work fine except for one small detail. The XML namespace of the return type of a function must be different than the XML namespace of the web service itself. And for the life of me, I can't get it to work. I've recreat...