Introduction

You all know the default page you get when you enter a WCF service’s URL in a browser (e.g. http://localhost/Service.svc). You are greeted by a blue and white (mostly white) screen that informs you that you have just created a service.

You have created a service

(Sorry for the Dutch localization in the screenshot.)

So apart from informing you that you have created a service (handy if you suffer from alzheimer), it also tells you where you can find the WSDL (just append ?wsdl), how to generate proxy classes and how to use these proxies.

That’s all fine, but you know all of this stuff already. Besides, you don’t want to display this message on public-facing services. Time to get rid of it.

Read the rest of this entry »

Advertisements

Introduction

Suppose you have to create an application which consumes a couple of web services offered by a third party. For this post, let’s assume a bank offers a financial API and opted to expose it across multiple endpoints.

Imagine two simple services. One which allows you to withdraw money and another one for depositing money.

Both of these services use a collection of types that are shared between them. How can we make sure these types are also shared on the client side?

Let’s find out…

Read the rest of this entry »

WCF Message Logging

May 10, 2011

Introduction

Suppose you create and host a WCF service and want to log all inbound and outbound messages. How would you go about this? When hosting a service you need to define a service behavior that knows how to log the messages. This post demonstrates how to setup a message logging system that provides this functionality.

Read the rest of this entry »

Introduction

Continuing on the previous article, this post discusses the creation of a simple web application hosted by IIS Express using a feature which Cassini doesn’t support, namely HTTPS.

The built-in Cassini web server (ASP.NET Development Server) only supports HTTP. So if you want to, for instance, use HTTPS when developing a WCF service you are stuck and you’ll have to resort to hosting it in IIS.

Using IIS Express life gets simpler…

Read the rest of this entry »

Introduction

Magento is a PHP based open-source e-commerce web application which launched back in 2008. Created by Varien, based on the Zend Framework, it quickly became one of the most popular e-commerce platforms.

This article is not a primer on Magento, thus a basic understanding of its inner workings is advisable. Knowledge of PHP is not required, but you should at least have a Magento installation up and running.

At the time of this writing I am using the Magento Community Edition version 1.3.2.4 and I’ve inserted the sample data version 1.2.0 into its database.

The default installation of Magento comes bundled with a web services API, called the Magento Core API. This API allows interaction of third party applications with several sets of core data. You can either use SOAP or XML RPC protocols to communicate with the Magento API.

This is great for example if you want to build applications to manage Magento’s customers, orders, products…etc. You can write your own back-end application instead of using Magento’s default Admin Panel. You can also opt to import data into Magento’s database when migrating from another e-commerce platform. The API provides for countless other possibilities to meet your business needs.

This article focuses on communicating with the Magento Core API from .NET’s Windows Communication Foundation (WCF). So let’s get started…

Read the rest of this entry »

Introduction

Most of the time when I need to consume a web service I do so using a .NET client built upon the Windows Communication Foundation (WCF). In most cases the web service in question has also been developed using .NET’s WCF.

About 8 years ago I used PHP as my primary tool for building web sites. At the time I used versions 3 & 4. Recently I had the opportunity to brush up my PHP skills by building a couple of small sites using PHP 5. Besides lending itself more towards object orientend programming I noticed that they added support for SOAP by adding the SoapClient class.

As PHP is still widely used it is not unimaginable, but likely very probably that PHP developers out there need to consume a web service that has been developed with WCF. This article explains how to create WCF services that offer support for PHP clients and how such clients can consume these services.

Let’s start coding…

Read the rest of this entry »

WCF over HTTPS

August 7, 2009

Introduction

A couple of weeks ago I was asked to write a web service that needed to provide a single operation (method) that allowed the user to upload a file using a Secure Sockets Layer (SSL / HTTPS) .

Although they changed their minds and went for a solution using a VPN connection, I still decided to create the web service in case they went back on their decision again.

This article outlines the steps you need to follow in order to create a service to upload a file over HTTPS using WCF. And it’s been quite a while since I wrote my last article for this blog. I figured this would make an interesting topic…

Read the rest of this entry »