开发者

Name attribute on the <wsdl:definitions> tag

开发者 https://www.devze.com 2023-01-11 19:55 出处:网络
I am writing a WCF service and need to control the value of the name atttribute on the wsdl:definitions tag in the generated WSDL document. The ServiceBehavior and the ServiceContract attributes do no

I am writing a WCF service and need to control the value of the name atttribute on the wsdl:definitions tag in the generated WSDL document. The ServiceBehavior and the ServiceContract attributes do nothave any property on them that dictates the output value of the name in the definitions tag. Changing the service implementation class name does not make a difference either. Any help is appreciated.

EDIT:

The ServiceBehavior Name named parameter translates directly into both the wsdl:definitions element's name attribute value and the wsdl:service element's name attribute value. In WCF, is there a way to assign a different value to the wsdl:definitions element's name attribute?

[ServiceBehavior(Name = "FooService", 
                 Namespace = "http://foo.bar/2011/01/", 
                 ConcurrencyMode = ConcurrencyMode.Multiple, 
                 InstanceContextMode = InstanceContextMode.PerCall)]
public class FooService: IFooService
{
     //etc...
}

becomes:

<wsdl:definitions name="FooService" ... >
开发者_开发知识库

and

<wsdl:service name="FooService">

How can I make the wsdl:definitions element's name attribute value be "FooDefinition"?

0

精彩评论

暂无评论...
验证码 换一张
取 消