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
0
votes
1 answer

One class implements two service contracts

I want to create a class that implementing 2 service contracts, and exposing 2 end-points on different ports (I get the ports as input to the program). My question is very similar to this question, but I want two end-points each one on different…
user3343396
  • 725
  • 2
  • 13
  • 25
0
votes
1 answer

add constant parameters in rest api calls

I make WCF REST api calls from a client. For this, I use a dedicated object of type WebChannelFactory, where IRestApi is a ServiceContract. Then, I can just call methods of IRestApi through a channel I use (created by CreateChannel()). My…
user1028741
  • 2,745
  • 6
  • 34
  • 68
0
votes
2 answers

WCF without service contract interface is possible

i was searching google to know that how we can easily convert asmx service to wcf and there i saw people write code like this is my old asmx service [WebService(Namespace="http://kennyw.com/sampleservices/")] public class MyService :…
Mou
  • 15,673
  • 43
  • 156
  • 275
0
votes
2 answers

Need Best Guidance to change WCF service contract later

i am new but reading some article on wcf i came to know that if i change the ServcieContrcat then i have to change not only the Service end but Clients end too and it's really difficult to manage. Example 1: Developer have to create WCF service for…
Thomas
  • 33,544
  • 126
  • 357
  • 626
0
votes
1 answer

WCF Binding Filter Option

Is it possible that we can expose few methods (OperationContract) of one contract ServiceContract) to one WCF binding and rest methods (OperationContract) of same contract (ServiceContract) to other binding ?
0
votes
1 answer

Are client service contracts still autogenerated in WCF 4.0?

I have a net.tcp binding example that apparently dates back to .NET 2.0 runtime version. The client code of the WCF Net.TCP binding example has an interface marked as "System.CodeDom.Compiler.GeneratedCodeAttribute("System.ServiceModel", "2.0.x.x")…
Lord of Scripts
  • 3,579
  • 5
  • 41
  • 62
0
votes
1 answer

Calling a WCF service from a client without having the contract interface and DTO

I have 3rd party wcf soap service which needs to-be consume so i have discovered a way to generate code in memory and invoke the service with simple input arguments. I would like to do the same with complex arguments can anyone please help me as to…
Navap
  • 1,050
  • 9
  • 18
0
votes
1 answer

Working of ServiceContract attribute in WCF

I just started reading about WCF. In the book the author has mentioned : The ServiceContract attribute maps a CLR interface/class as a WCF contract independently of that type's visibility. How is this possible? The explanation given was: The type…
Sat
  • 161
  • 1
  • 2
  • 8
0
votes
1 answer

Events don't get hit WCF Service implementation

I have a WCF Service interface, a class that implements the contract and a hosting winforms application. This then starts worker processes who connect back to the WCF server and then the events should be getting triggered. The client worker process…
driverobject
  • 331
  • 2
  • 10
0
votes
1 answer

WCF ServiceContract and SOAP response not called *Response

I'm writing a SOAP consumer using WCF. In the following WCF service contract, WCF expects that the response has a Body and an element called HelloResponse: [ServiceContract] public interface HelloService { string Hello(string input); } On the…
Allanrbo
  • 2,278
  • 1
  • 23
  • 27
-1
votes
1 answer

Is it possible to use WebChannelFactory to make requests to WebAPI/OdataController functions/actions?

I have implemented OdataController(s) for my Web-API. Is it possible to use a ChannelFactory (or WebChannelFactory) to communicate with the Web-API, specifically i would like to call custom Functions and/or Actions. Of course, the OdataController i…
1 2 3 4 5
6