Questions tagged [servicecontract]

A Service Contract is a contract between a (web) service (such as a WCF service) and a client.

A contract between a (web) service and its client is called a Service Contract. Both the service and its client typically express this contract through an interface, which in WCF is attributed with ServiceContract.

References

86 questions
1
vote
0 answers

Wcf rest service - how to use service contract namespace

I have a wcf service, which I made restfull, but editing the intereface and the webconfig. In the interface, I have the following: [ServiceContract] public interface ITsmApi { [OperationContract] [WebInvoke(UriTemplate =…
dillci
  • 65
  • 2
  • 10
1
vote
1 answer

Can't add WCF service reference to client project using netTcpBinding

I have a WCF service that uses NetTcpBinding and I'd like to host it in a WPF application. The service seems to start correctly, but when I'm trying to get it's metadata using 'Add service reference' in visual studio I get this exception: The URI…
Peter
  • 1,047
  • 2
  • 18
  • 32
1
vote
2 answers

this Operation is not supported in WCF Test Client Error

Actually i implemented WCF service in IIS Host Using WCF Test Client tool I get this error: "this Operation is not supported in WCF Test Client". http://desbiz:49615/GestionProvision.svc Using wsdl in IExplorer all is…
Alhambra Eidos
  • 1,515
  • 4
  • 21
  • 31
1
vote
1 answer

Advantage of using interface as Service contract in WCF

i am searching right write up why we need to use interface as Service contract in WCF. i got this url Why does .net WCF Service require the Interface and from here i came to know that we can write service contract attribute on class instead of…
Thomas
  • 33,544
  • 126
  • 357
  • 626
1
vote
2 answers

What is the format of the DataContractAttribute.Namespace Property?

This MSDN article recommends always to provide a namespace to a ServiceContract and DataContract. Examples usually have a "schema" prefix and a URI type pattern for the namespace such as Namespace="urn:WCFEssentials/Samples/2008/12" instead of a…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
1
vote
0 answers

Discuss Advantages of multiple endpoints in WCF service

One guy explained this way but not very clear to how to implement it. From experience: Using different binding, for example one BasicHttpBinding for Java clients while using WsHttpBinding for .NET clients. Also HTTPS for some and HTTP for…
Thomas
  • 33,544
  • 126
  • 357
  • 626
1
vote
0 answers

Change how an IDictionary is serialized in ServiceContract

class Foo { public string Name { get; set; } public IDictionary Attributes { get; set; } } [ServiceContract] interface IFooService { [OperationContract] [WebInvoke( Method = "GET", UriTemplate =…
Mizipzor
  • 51,151
  • 22
  • 97
  • 138
1
vote
0 answers

Are different mexHttpBinding for different endpoints possible in WCF?

I have 3 service contract interfaces in my WCF library like this: public interface ServiceContract1{} public interface ServiceContract2{} public interface ServiceContract3 : ServiceContract1, ServiceContract2 {} Also I have a service which…
Gökhan Çoban
  • 600
  • 8
  • 17
1
vote
1 answer

Change in UriTemplate on WCF interface causes whole service to fail.

This is my first attempt at a service via WCF which is hosted in a Windows Service. I have noticed that if I do something incorrectly in the UriTemplate it completely breaks everything and I don't know why. Example: In the first code example…
CathalMF
  • 9,705
  • 6
  • 70
  • 106
1
vote
3 answers

Using WCF, how can I make sure only trusted assemblies call my service?

I have a simple service contract, defined as: [ServiceContact] public interface IEcho { [OperationContract] void Hello(string value); } which is implemented in a local WCF service (accessed through a net.pipe:// address). I need to know who…
Pierre Arnaud
  • 10,212
  • 11
  • 77
  • 108
1
vote
0 answers

WCF - Interface parameter in service contract

I have a WCF service that will be used by .NET clients. I want to use an interface as a parameter in the operation contract. I haven't fully implemented the service to the point of being able to test this approach and I don't want to spend a lot…
lintmouse
  • 5,079
  • 8
  • 38
  • 54
1
vote
1 answer

WCF Contracts and namespaces?

Hi, The default namespace of data/servce contracts in WCF is "http://tempuri.org/". By setting the ServiceContract.Namespace and ServiceBehavior.Namespace we can get a custom namespace. I do however got some questions on this : Do I have to use a…
Banshee
  • 15,376
  • 38
  • 128
  • 219
1
vote
0 answers

RequestSecurityTokenResponse won't deserialize

I've got a WCF client connecting to an STS server, which I don't have any control over (it's a 3rd party PHP service). After days of research I managed to talk to the server in a way it accepts using purely WCF. Of course, it would have been easy to…
0
votes
4 answers

Get WCF Contracts implemented by a service

Is there any possibility as a client to get a list of contracts a WCF host exposes? I would like to query a service and to ask what interfaces it implements.
Daniel Bişar
  • 2,663
  • 7
  • 32
  • 54
0
votes
0 answers

Consume WCF service with ServiceContract(ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign) in Node.JS

I am new to node.js, want to know whether there is any library to consume WCF service with ServiceContract(ProtectionLevel = System.Net.Security.ProtectionLevel.EncryptAndSign) in Node.JS application. I was using WCF.JS to consume WCF service with…
Ashok
  • 1