locked
Removing tempuri.org from WSDL for a WCF web service RRS feed

  • Question

  • User-200757374 posted

    I was just wanting to "cleanup" my WSDL for my .NET 4.0 WCF Web Service and I have most references to tempuri.org changed, except two.

    I have added

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

    and

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


    But, my WSDL still has a reference to 

    <wsdl:definitions ... xmlns:i0="http://tempuri.org/" ...

    and 

    <wsdl:import namespace="http://tempuri.org/" ...

    Any suggestions on the proper way of cleaning these up?

    Thanks,
    Jim 

    Tuesday, December 7, 2010 4:20 PM

All replies

  • User694699059 posted

    add this over the data contracts:

    [DataContract(Namespace="http://www.mysite.com/")]  

    Tuesday, December 7, 2010 5:47 PM
  • User-200757374 posted

    Thanks for the reply, but, that did not get rid of the last two tempuri.org references either.  Anything else to try?

    Thanks,
    Jim 

    Tuesday, December 7, 2010 11:18 PM
  • User1377527997 posted

    Please see http://www.c-sharpcorner.com/Forums/Thread/108822/get-rid-of-tempuri-in-wsdl.aspx

    Jerry

    Tuesday, January 1, 2013 11:59 AM