Where’s My WCF WSDL?

Ran into an issue the other day where I was not able to find the WSDL for a new WCF service.  Tried navigating to the WSDL through the browser and all I got was a blank page.  Knowing that WCF doesn’t have to provide a WSDL I verified that things were configured properly for expsoing it.  Everything else worked, I could connect to it from my WCF client application and through the WCF Test Client.  Luckily I basically copied the service definition from another service and I was able to identify a missing foward slash at the end of the base address.  Surprisingly that was the missing piece.  So make sure that base address ends with a forward slash.

<service behaviorConfiguration=Xyz.ServiceBrokerBehavior
                  
name=Xyz.SomeService>
  <
host>
   
<baseAddresses>
     
<add baseAddress=http://localhost:9090/Xyz/SomeService/  />
    </
baseAddresses>
 
</host>
  <
endpoint address=SomeService
                        
binding=basicHttpBinding
                        
bindingConfiguration=DefaultHttpBindingConfig
                        
name=SomeServiceHttp
                        
contract=Xyz.ISomeService />
  <
endpoint address=mex
                        
binding=mexHttpBinding
                        
name=Mex
                        
contract=IMetadataExchange />
</
service>

btw – In my search to figure out this problem I found a nice article by Keith Elder.  About half way down there is a section titled “Exposing Our Service’s WSDL”.  http://www.keithelder.net/blog/archive/2008/01/17/Exposing-a-WCF-Service-With-Multiple-Bindings-and-Endpoints.aspx

Hope this saves you some hair,
Tom

Explore posts in the same categories: .NET

Tags:

You can comment below, or link to this permanent URL from your own site.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: