Sean Rock
Sean Rock

Reputation: 133

How can I control the case of the SchemaLocation in the generated wsdl of a wcf service?

We've got two web servers (win2008 sp2) load balanced. On one of the machines the service name (e.g myService.svc) portion of the SchemaLocation url that is generated in the wsdl types is camelCased while on the other server it is PascalCased (e.g. MyService.svc). Some php soap clients have an issue with this and interpret them as separate urls and end up with duplicate type definitions.

The code is the same on both servers - i've copied it from one to the other to make sure. I've been trough IIS (where i'm guessing the problem may be) however I cannot find anything that would control or affect the casing of only the service name portion of the url. I've even tried renaming the physical file (myservice.svc) to lower case however that had no effect.

Has anyone else had this or can point me in the right direction?

Many thanks.

Upvotes: 1

Views: 323

Answers (1)

Sixto Saez
Sixto Saez

Reputation: 12680

You can add a configuration attribute httpGetUrl to the service behavior metadata to control what goes into the WSDL SchemaLocation value. This blog post explains how you would do it for the the domain name but it should work for the whole URI.

Upvotes: 1

Related Questions