PDC all Task implementation within one Scenario, Asim Javed 335-BSCS-13 Section-B

DriverService

DriverService

Running project

Running project

DriverService

DriverService

DriverService

 

Driver Service Implementation:

In this Scenario I created the WCF service, hosting the WCF service using a console application, and I implemented the WCF services with multiple contracts and expose each service contract using a different endpoints.

 WCF DataContract and DataMemberh:

Next I create the DataContract and DataMember attributes.To understand DataContract and DataMember attributes in WCF, first let’s understand what is meant by Serialization.With respect to WCF, Serialization is the process of converting an object into an XML representation. The reverse process that is reconstructing the same object from the XML is called as Deserialization.

 KnownType attribute in WCF:

If we have classes related by inheritance, the wcf service generally accepts and returns the base type. If you expect the service to accept and return inherited types, then use KnownType attribute.

Message Contract in WCF

With Data Contracts we have very limited control over the SOAP XML request and response messages that are generated. Use Message Contracts, if you want to have full control over the generated XML SOAP messages.  

Posted in PDC