Contribution:
wcf
Headline
A web service based on .NET's WCF
Motivation
The Technology:WCF technology supports the development of applications based on service-oriented architecture. Our implementation illustrates a stateful web service created with WCF. It also introduces the use of SOAP over Technology:HTTP. That necessitates the use of DTOs to wrap the domain model into leightweight serializable containers and pass it to the client.
Illustration
Technology:WCF uses contracts to generate Language:WSDL definitions for the web service. The contract is provided by a Language:CSharp interface. It contains all necessary methods for retreiving the company data and invoking the method cut on every entity within the company:
The class
The DTO classes
Architecture
The base folder contains the contract definition this!!ICompanyService.cs and the contract implementation ComanyService.svc.cs. The file this!!CompanyService.svc links to the concrete implementation. DTO definitions are located in the dto folder. Both files, this!!clientaccesspolicy.xml and this!!crossdomain.xml, solve possible cross-domain issues. The .config files in the base folder are generated.
Usage
Requirements:
- You need Microsoft Windows (preferably Vista or 7) running in combination with Technology:.NET 4.0.
- Install Technology:IIS (Internet Information Services) 7 or 7.5 using the installation tutorials on IIS or MSDN. Make sure, that you have installed the "static content" feature as well.
- Download the wcf implementation from github.
- Use Technology:Visual Studio to build the project.
- Go to the "Computer Management" dialog.
- Open the "Services and Applications" root and select the "Internet Information Services (IIS) Manager".
- On the right, there is a panel "Connections". Create a new web site by right click on "web sites".
- Use wcf as "sitename" and link to the physical folder of the wcf implementation. Use port 1212.
We also used:
- version 4.0 of WCF
- version 4.0 of Language:CSharp
- and version 4.0 of the Technology:csc.exe compiler
Attention: When creating a service anywhere other than on the web server, that hosts your Silverlight application, cross-domain issues can arise. Cross-domain calls between Silverlight applications and services present a security vulnerability and must be specifically enabled by an appropriate cross-domain policy. For procedures that describe how to implement such a policy, see "Making a Service Available Across Domain Boundaries" <cite>MSDN2012CD</cite>.
Backlinks
There are no revisions for this page.
User contributions
User edits
Syntax for editing wiki
For you are available next options:will make text bold.
will make text italic.
will make text underlined.
will make text striked.
will allow you to paste code headline into the page.
will allow you to link into the page.
will allow you to paste code with syntax highlight into the page. You will need to define used programming language.
will allow you to paste image into the page.
is list with bullets.
is list with numbers.
will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.
will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.
will allow your to insert code snippets from @worker.
Syntax for editing wiki
For you are available next options:will make text bold.
will make text italic.
will make text underlined.
will make text striked.
will allow you to paste code headline into the page.
will allow you to link into the page.
will allow you to paste code with syntax highlight into the page. You will need to define used programming language.
will allow you to paste image into the page.
is list with bullets.
is list with numbers.
will allow your to insert slideshare presentation into the page. You need to copy link to presentation and insert it as parameter in this tag.
will allow your to insert youtube video into the page. You need to copy link to youtube page with video and insert it as parameter in this tag.
will allow your to insert code snippets from @worker.