cheap oakleys replica michael kors bags cheap christian louboutin online elite jerseys wholesale cheap nfl jerseys discount ray bans cheap michael kors cheap ray bans replica oakleys wholesale replica michael kors wholesale oakley sunglasses cheap fake ray bans cheap jerseys china cheap christian louboutin outlet fake cheap oakleys cheap oakleys cheap jerseys sale cheap christian louboutin discount oakleys wholesale nfl jerseys cheap michael kors handbags michael kors handbags discount christian louboutin cheap jerseys michael kors on sale discount ray bans wholesale jerseys cheap michael kors fake oakleys online cheap michael kors bags replica ray bans discount ray bans authentic jerseys cheap christian louboutin cheap oakleys cheap oakleys outlet nfl jerseys red bottoms shoes on sale cheap ray bans cheap nfl jerseys cheap replica oakleys michael kors on sale cheap christian louboutin outlet Cheap Elite Jerseys cheap michael kors cheap ray bans cheap jerseys free shopping cheap fake oakleys cheap oakleys sale cheap michael kors outlet ray bans shop fake cheap oakleys cheap authentic nike jerseys christian louboutin online fake cheap oakleys fake oakleys store cheap jerseys wholesale cheap christian louboutin replica oakleys cheap jerseys wholesale cheap replica oakleys michael kors handbags wholesale jerseys china discount nhl jerseys wholesale replica michael kors cheap ray bans cheap jerseys cheap fake oakleys fake oakleys cheap michael kors store cheap ray bans wholesale oakleys jerseys wholesale christian louboutin outlet cheap mlb jerseys oakley sunglasses authentic jerseys christian louboutin outlet cheap replica oakleys wholesale authentic jerseys wholesale mlb jerseys michael kors handbags cheap jerseys online shopping cheap nhl jerseys michael kors bags cheap fake oakleys cheap jerseys from china cheap fake oakleys 2016 cheap fake oakleys cheap michael kors cheap discount ray bans fake cheap oakleys cheap jerseys free shopping cheap christian louboutin online wholesale nfl jerseys cheap jerseys from china wholesale christian louboutin wholesale mlb jerseys official jerseys fake cheap oakleys cheap michael kors handbags wholesale jerseys cheap wholesale jerseys cheap fake oakleys oakley sunglasses cheap discount oakleys oakleys sunglasses usa cheap michael kors online wholesale and retail oakleys cheap michael kors outlet cheap wholesale jerseys wholesale cheap jerseys china cheap replica oakleys fake oakleys online authentic jerseys wholesale ray bans fake cheap oakleys jerseys wholesale replica ray bans wholesale sunglasses wholesale mlb jerseys cheap cheap nfl jerseys cheap michael kors outlet cheap fake ray bans cheap oakleys sale cheap fake ray bans oakleys sunglasses michael kors bags fake cheap oakleys fake cheap oakleys authentic wholesale jerseys nhl jerseys cheap michael kors outlet cheap oakleys online wholesale jerseys fake ray bans online store michael kors handbags outlet wholesale jerseys china fake ray bans ray bans outlet cheap christian louboutin cheap nba jerseys cheap ray bans cheap ray bans wholesale nfl jerseys wholesale sunglasses michael kors bags outlet cheap ray bans on sale fake cheap oakleys cheap nfl jerseys cheap nhl jerseys cheap oakleys cheap jerseys cheap fake oakleys michael kors outlet cheap jerseys store fake ray bans christian louboutin shoes discount nba jerseys michael kors for sale cheap fake oakleys fake ray bans sunglasses cheap michael kors handbags oakley sunglasses michael kors handbags michael kors on sale fake cheap oakleys cheap nfl jerseys replica oakleys cheap oakleys outlet cheap oakleys cheap authentic nfl jerseys paypal cheap fake oakley sunglasses cheap oakleys cheap jerseys paypal
Consume WCF Service with Basic Authentication from soapUI Tool » Inder Singh's Blog
Nov 272012

When WCF services get consumed by .NET clients, framework takes care of what gets written onto the wire and all the complexity related to SOAP message serialization, security, etc. is hidden behind the scenes. One does not need to pay much attention to the underlying details. My current project gave me this fabulous opportunity to look under the hood because the WCF services are consumed by external business partner who will be implementing the client in Java. The business partner team has not involved the developers in the project yet, the business analyst is using the soapUI tool to test drive the services and was unable to connect to the service because of some authentication issues. Hence, I got assigned the task of investigating the problem. In this post, I will walk through some of the quirks in the soapUI tool and show how to make it work but first I will start with a little background of the different components/concepts.

Basic Authentication
The services are secured using Basic Authentication protocol over SSL which is pretty standard. In simple terms, the username/password credentials are from Windows Active Directory domain and need to be sent in the HTTP header.

soapUI Tool
soapUI is an open-source tool which can be used to test the SOAP based services. You can read more about it as well as download a free copy from the their website.

The problem was discovered in soapUI 4.5.0, it might exist in other versions of the tool as well but I have not verified yet.

Problem and the Solution
When a service method request is sent to the service the username and password credentials need to be sent in the HTTP header as part of the request. By default this does not happen and the following is the workaround on how to achieve this to make a successful call to WCF Service secured with Basic Authentication.

If you are new to using soapUI, it’s a pretty straight-forward and simple to use tool. You will need to create a new soapUI project using the WSDL for the service.
Following are two simple setting changes you need to make so that Username\Password credentials are sent as part of the request:
1. Open Preferences dialog for the tool using File > Preferences menu and check the “Authenticate Preemptively” checkbox on the “Http Settings” tab as shown on the screenshot below.

soapUI Preferences Screenshot

soapUI (File > Preferences)

2. Specify username and password strictly as shown in the screenshot below. Username property must be set to username along with the domain name, e.g. Domain\Username and Password for the Password Property. Specifying domain name in the Domain property did not work, also specifying username without domain name did not yield the correct results.

soapUI (Request Username and Password Properties)

soapUI (Request Username and Password Properties)

Note: Service name, services methods and usernames are hidden in the screenshots for client privacy reasons.
For those curious how I figured this out. I used Fiddler to see the exact messages sent for successful calls made by .NET Client and then compared that message to the one sent by soapUI. I found that an extra piece of information was included for the successful and then trial/error led me to the successful call.

Mostly I use WCF Test Client provided with .NET Framework for quick testing on the services but it does not allow making calls to WCF Services secured using Basic Authentication (or at least I haven’t figured out a way yet) so soapUI can be handy to .NET Developers who are not planning to consumer the services from JAVA or some other language.

 Posted by on November 27, 2012

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>