I created a custom web service in my sharepoint using CSKDev template. Everything looks good when I'm testing my service locally. But problems came up when I decided to test it on our sample farm with Internet access.

Assuming we have local domain named foo.local, and two load-balanced servers - web1 and web2. Our site can be accessed from outside via eg. sharepoint.foo.com. The problem is that when I try to access service metadata, I find that additional wsdl schemas are pointing locally, not externally, eg. accessing site http://sharepoint.foo.com/_vti_bin/IntegrationServices/PortalMessageService.svc/mex

results in wsdl with reference to:

<xsd:import schemaLocation="https://web1.foo.local/_vti_bin/IntegrationServices/PortalMessageService.svc/mex?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/" /> 

web1.foo.local is not accessible from Internet, so how to fix this? What should I do to make additional schemas available by the external address of our portal?


When I open my service metadata with WcfTestClient and open Client.dll.config, I can see three bindings looking the same and three endpoints where only first has configured address.

2 Answers 2


Please check the endpoint address and see if defining it to sharepoint.foo.com does the trick.

Also I ran into this where you have multiple suggestions, specifically instructions in how to configure the endpoint of the mex.

  • I don't have any XML configuration at all since sharepoint does all the configuration. I also can't change host header because I have and SSL binding with certificate without wildcard.
    – jjczopek
    Commented Jan 24, 2012 at 12:29

This was the same problem with ASP.NET WSDL web services in SharePoint 2007, and why originally you had to create custom WSDL generation pages. This has been fixed in SharePoint 2010 by using SharePoint service factories.

If you are using the Microsoft SharePoint web service factories, the root domain should not be a problem as the WSDL generation for the endpoint is dynamic based on the URL when accessing the service. Check my blog post to see how to use the out-of-box service factories.


  • I'm aware of these factories and since I created my on template provided by CKSDev, MultipleBaseAddressBasicHttpBindingServiceHostFactory is used and yet this issue is present...
    – jjczopek
    Commented Jan 23, 2012 at 22:43
  • How are your zones configured? Do you have each Url associated with a zone on an extended web application, or are both zones on the same IIS virtual directory? Commented Jan 25, 2012 at 9:00
  • I have one web application (no extended web application). My zones are: Default - sharepoint.foo.local, Intranet - - load-balancer cluster address, Internet - sharpoint.foo.com, Ekstranet - XXX.XXX.XXX.XXX (public IP address)
    – jjczopek
    Commented Jan 26, 2012 at 12:24
  • I think your approach of multiple zones mapped to the same virtual web application may be at the root of the problem. The Service Host factory is using the URL of the default zone within the context of the virtual web application. I would suggest extending the web application for a zone, instead of using alternate access mappings with the same default web application. Commented Jan 26, 2012 at 18:22
  • I'll try this out and come back to share results with you.
    – jjczopek
    Commented Jan 26, 2012 at 19:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.