WCF wsdl namespace

A tempuri.org-ról

Hogyan is szabaduljunk meg a tempuri.org namespace-től egy WCF szolgáltatás WSDL leírójában?



1.) In your ServiceContract attribute constructor define the Namespace property.

[ServiceContract(Namespace = "http://myservice.com")]

public interface IMyService

2.) For your ServiceClass create the ServiceBehavior attribute with Namespace property

[ServiceBehavior(Namespace = "http://myservice.com")]

class MyService : IMyService

3.) In all your bindings set the bindingNamespace property

<endpoint binding="basicHttpBinding" bindingNamespace="http://myservice.com"....



Forrás: http://my-tech-talk.blogspot.com/2009/01/how-to-get-rid-of-httptempuriorg-in-wcf.html 

Az egész olyan Microsoft-os...


3, azaz három különböző helyen kell beállítani és ami a legfontosabb beleforgatni a kódba a namespace-t.



Ha így teszünk akkor kapjuk meg a következő WSDL részletet:
<wsdl:definitions name="..." targetNamespace="http://myservice.com">
<wsdl:types>...


Jó tudni...