wcf

Subscribing to PropertyChanged of WCF service's DataContract proxy classe

I like the idea of extending on the client side classes that are data contracts of WCF services using partial classes. But I encountered a problem that considerably spoils the party. Imagine on the server side I have a class: [DataContract] public class SolidObject { [DataMember] public Point Position { get; set; } [DataMem...

How to consume WCF wsHttpBinding Service in application built in 2.0?

WCF service is running with 'wsHttpBinding' Binding. The application which gonna consume WCF Service is non-wcf compliance or in other words, it is on the top of Framework 2.0 and I can't use ServiceModel in this app (since only 3.5 supports ServiceModel). Any suggestions, how to consume above WCF Service in application built in 2.0? ...

WCF & optional XmlElements (no datacontract)

I asked a question about deserializing based on an attribute with data contracts. Apparently this isnt possible so I have to convert my DataContract to use XmlElement's (see http://stackoverflow.com/questions/2177079/net-represent-xml-in-class-without-xsd) I'm assuming datacontracts cannot intermingle with xmlelements. How can I define...

Validating WCF Web Service XML body using a MessageInspector

I have a built a WCF web service against a pre-existing XSD schema which uses the XmlSerializer serializer. I would like to validate incoming requests and outgoing requests against this pre-existing schema. MSDN contains a worked example of how this can be accomplished using WCF MessageInspectors. The technique described involves creati...

Does PNRP work on a LAN with no Internet connection?

So, I'm trying to make sense of WCF in general, and this MSDN chat client sample in particular. I have been testing with the configuration below, and it seems to be working fine. However, what will happen if the Internet connection is lost (or nonexistent)? Will the peers still be able to find each other? (According to this question, I w...

ReadAsDataContract exception while reading namespace

I'm trying to consume twitter's REST api mentioned at this link using WCF REST starter kit mentioned at this link. I'm using the same objects in DataContract as mentioned in the article - statusList and status. [assembly: ContractNamespace("", ClrNamespace = "TwitterShell")] [CollectionDataContract(Name = "statuses", ItemName = "statu...

Automatically Passing WCF headers from Service to Service

Hi, We have and app that is using custom headers to pass what we call a "callerid". The caller is just a way of identify which customer is calling the service, so we can connect them to the right db etc. At the moment we have 3 services which all require the callerid to function. so a call might be callerid --> callerid --> callerid S...

Usage of compression on WCF web service and gSOAP

Hi all, I wish to add compression to the WCF based web service to reduce the payload and increase throughput. But the issue is that I consume the service from a c/linux application using gSOAP. I know gSOAP allows compression, but I am not sure if gSOAP and WCF based web service can talk to each other with compression on. Please put fo...

Is it possible to call a WCF Service hosted in a Windows Service within SharePoint?

I have a WCF Service hosted in a Windows Service in the same server where i have moss. The WCF works well calling it from a Console application, but if i call it from a page within Sharepoint, it throws a timed out exception. I added the following configuration to the webconfig: <system.serviceModel> <bindings> <wsHttpBind...

Monitoring WCF web services

Hi all, I'm new with WCF and I've deployed a web site with IIS7 that have 2 .svc files. On each svc files, there a service with some methods available through the interface. What I would like is to know how many times each method is called and who calls each method. I would like if possible to have my custom monitoring then I can for e...

Problem in deployment of wcf service using localhost in service url

I have created and deployed the wcf service on server as a windows service, with url in app.config as "http://localhost:portnumber/...." I am accessing this wcf service from browser of client machine(Client machine is different from server) by using url "http://servername:portnumber/......" but I am not able to access it because it seems...

DataContract Serialization - Base class property names not working.

I have a base class like the following: [Serializable] public class SerializableDomainObject<T> { public SerializableDomainObject() { ID = Guid.NewGuid(); } [DataMember(Name="ID", Order = 0)] public Guid ID { get; private set; } public void Save() { // serialize } public void Load()...

Read WCF Message body twice - "Message Cannot be read"

Hi, I have a WCF Message (Channels.Message) which i'm trying to extract the body using .GetBody(). however, i notice that i can do it only once, and if i'm trying to use "GetBody<>" again, i'm getting :"This message cannot support the operation because it has been read." Any idea how can i re-read the message body? thanks ...

Reliable n-Tier WCF (Threading issue?)

I am working on an n-Tier application using WCF between the layers such that: Tier 1: Silverlight application Invokes the search request IClientBroker clientBroker = UIContext.CreateWcfInterface<IClientBroker>("Data/ClientBroker.svc"); clientBroker.BeginSearchForClients(SearchTerm, 20, (result) => { ...

Caching WCF Proxy?

Hi , I am trying to use Channel Factory and caching it in my asp.net mvc. I am using PerSession Instance mode as I need to know the state. Because of this I cannot close the proxy immediately. And I dont want to reopen ,close proxy everytime. If I leave the proxy open it is timing out at the 12th time. I can increase the concurrent sess...

Need help implementing wcf threading with duplex channel.

I am implementing a duplex channel and all works ok. Now I have to implement it in a thread safe manner.I am kind of stuck and wondering if you could point me or suggest anything. This is just a quick demo code to give you an idea of what I am doing. How can I make the Buy Function Process asyncronous and ThreadSafe? [Service...

WCF Rest Service Client - Parameter Names are case sensitive

Hello, When using the following interface to talk to PHP from .NET, .NET builds the request body XML with parameter names barcode and branch. The parameter names should be Barcode and Branch. Yes, the PHP server is case sensitive. Am I forced to capitalise my parameter names? or can I specify names using attributes? Many Thanks Neil...

How to port WCF RESTful web service to Axis 2/C (or WSO C++)

We are looking at redoing some web service applications (currently in prototype phase) from WCF/C# to a C++ cross platform web service framework. So, I'm looking at Axis2/C or WSO2 WSF/C++ as possible frameworks. I'd really like to port the functionality already written in the WCF service to the other service frameworks. Here's the fu...

How to get the origin IP of a netTcpBinding call in WCF?

The called method have access to binding-level information like the origin IP address? ...

XML Schema not working with Web Service Software Factory

I am trying to create an XML schema to use with the Web Service Software Factory. It's a fairly simple schema that is just a group of person objects. The (simplified) schema file looks like: <?xml version="1.0" encoding="utf-8" ?> <xs:schema targetNamespace="http://tempuri.org/XMLSchema.xsd" elementFormDefault="qualified" xm...