locked
very basic question re webservice namespaces RRS feed

  • Question

  • This is a VERY basic question. sorry :)

    I'm new to Webservices. I created the sample project found in the help text. It creates a webservice with a

    <WebService(Namespace:="http://tempuri.org/")>  listed in it.

    When running the service, a warning is issues that this is a temporary placeholder only and should be replaced with a custom one. The problem is I can't find any reference to what I should do. I have searched thru the help text and this forum, and I'm not getting an answer I can relate to.

    I'm sure I've missed something somewhere, but I'm a bit lost right now.

    Any help appreciated.

    Thanks - Kerry

    Wednesday, November 22, 2006 1:52 PM

Answers

  • You have just found the first major problem every webservice developer hits. To change the namespace add this attribute to the top of the webservice class with the appropriate namespace:

    [WebService(Namespace = "http://OmegaCoder.Com/")]
    Wednesday, November 22, 2006 2:38 PM
    Moderator

All replies

  • Kerry,

    Do you mean replacing the http://tempuri.org/ ?

    Yes, you should replace it and put any meaningfull name for your service and/or your enterprise naming standards....

    Suppose you're creating a Sales service for Contoso company... you may have http://www.contoso.com/services/sales as your namespace.....

    Did I respond your question?

    Rgds, Rodrigo

    Wednesday, November 22, 2006 1:58 PM
  • Thanks Rodrigo.

    So do I have to have some class file or something in that location? Or is this just a name only with nothing really behind it?

    I appreciate your help.

    Kerry

    Wednesday, November 22, 2006 2:03 PM
  • You have just found the first major problem every webservice developer hits. To change the namespace add this attribute to the top of the webservice class with the appropriate namespace:

    [WebService(Namespace = "http://OmegaCoder.Com/")]
    Wednesday, November 22, 2006 2:38 PM
    Moderator
  • Thanks everyone. I see how simple this is. I just assumed that there had to be something that was at the recieving end of the URI.

    Sometimes you can't see the forest for the trees.

    Thanks for your help.

    Kerry

    Friday, November 24, 2006 5:16 PM