This project is read-only.

Service does not emit contract namespace

Topics: Web Api
Feb 2, 2012 at 11:45 PM

I have an existing web service build with WCF Rest.  I'm working on converting it over to the Web API.
I have a data contract that is accepted as a parameter to an operation.  This contract is decorated with the [DataContract(Namespace="blah...")] attribute.

When I register my route for the service via WCF: RouteTable.Routes.Add(new ServiceRoute(...)) - the xmlns is emitted in the service/help page:
"<MyContract xmlns="blah...">"

However, when I register my route, same exact contract, via Web Api: RouteTable.Routes.MapServiceRoute<MyService>() - the xmlns attribute is not there.


Suffice to say, it causes issues with my clients which pass the xmlns in the request object.