Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Purpose of Web Service Namespaces

Purpose of Web Service Namespaces

Scheduled Pinned Locked Moved C#
csharpasp-netvisual-studiowcfcom
4 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AspDotNetDev
    wrote on last edited by
    #1

    I've created a few ASP.NET Web Service Applications. When you create one, it sets an attribute above the main service class which has a property, Namespace, that gets defaulted to http://tempuri.org/. According to MSDN, that default namespace should be changed:

    MSDN:

    It is highly recommended that this default namespace, which is http://tempuri.org, be changed before the XML Web service is made publicly consumable. This is important because the XML Web service must be distinguished from other XML Web services that might inadvertently use the namespace as the default (http://tempuri.org/).

    What I want to know is the real purpose of this namespace and why it is important. How does that namespace help distinguish services? Is it if they are installed to the same folder on the server, it will prevent a clash of some sort? Don't you still need to specify the location of the service in any web service requests (e.g., "mydomain.com/Service1.asmx" or "mydomain.com/Service2.asmx")? And shouldn't that prevent any clashes? Any illumination you could provide would be appreciated.

    [Forum Guidelines]

    P J 2 Replies Last reply
    0
    • A AspDotNetDev

      I've created a few ASP.NET Web Service Applications. When you create one, it sets an attribute above the main service class which has a property, Namespace, that gets defaulted to http://tempuri.org/. According to MSDN, that default namespace should be changed:

      MSDN:

      It is highly recommended that this default namespace, which is http://tempuri.org, be changed before the XML Web service is made publicly consumable. This is important because the XML Web service must be distinguished from other XML Web services that might inadvertently use the namespace as the default (http://tempuri.org/).

      What I want to know is the real purpose of this namespace and why it is important. How does that namespace help distinguish services? Is it if they are installed to the same folder on the server, it will prevent a clash of some sort? Don't you still need to specify the location of the service in any web service requests (e.g., "mydomain.com/Service1.asmx" or "mydomain.com/Service2.asmx")? And shouldn't that prevent any clashes? Any illumination you could provide would be appreciated.

      [Forum Guidelines]

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Perhaps this[^] (from tempuri.org) might help to explain why.

      "WPF has many lovers. It's a veritable porn star!" - Josh Smith

      As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

      My blog | My articles | MoXAML PowerToys | Onyx

      A 1 Reply Last reply
      0
      • P Pete OHanlon

        Perhaps this[^] (from tempuri.org) might help to explain why.

        "WPF has many lovers. It's a veritable porn star!" - Josh Smith

        As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

        My blog | My articles | MoXAML PowerToys | Onyx

        A Offline
        A Offline
        AspDotNetDev
        wrote on last edited by
        #3

        Not really. :(

        [Forum Guidelines]

        1 Reply Last reply
        0
        • A AspDotNetDev

          I've created a few ASP.NET Web Service Applications. When you create one, it sets an attribute above the main service class which has a property, Namespace, that gets defaulted to http://tempuri.org/. According to MSDN, that default namespace should be changed:

          MSDN:

          It is highly recommended that this default namespace, which is http://tempuri.org, be changed before the XML Web service is made publicly consumable. This is important because the XML Web service must be distinguished from other XML Web services that might inadvertently use the namespace as the default (http://tempuri.org/).

          What I want to know is the real purpose of this namespace and why it is important. How does that namespace help distinguish services? Is it if they are installed to the same folder on the server, it will prevent a clash of some sort? Don't you still need to specify the location of the service in any web service requests (e.g., "mydomain.com/Service1.asmx" or "mydomain.com/Service2.asmx")? And shouldn't that prevent any clashes? Any illumination you could provide would be appreciated.

          [Forum Guidelines]

          J Offline
          J Offline
          Jurgen Rohr
          wrote on last edited by
          #4

          Hi, having wondered about this myself, I don't know, whether I can provide real illumination, but at least I can share my thougts about it. I'm sure, that the EndpointAddress is not really suitable for identifying the service. In any network such a service can be addressed in at least two or three ways: 1. http://mydomain.com/myservice.asmx 2. http://13.13.200.7/... and eventually 3. http:/mydomain.dyndns.org/... There is no reason, to interpret the addressed service in different ways. Furthermore there might be 'copies' of the service in load balancing environments. So, the ony way to identify the service correct is via the namespace - as you do in C# and other languages. The provided namespace does not free you from specifiying the location. In fact you can provide anything (maybe regarding some naming rules) as a namespace - even if it doesn't exist. Cheers Jürgen

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups