Webservices namespace- What does it do?

Discussion in 'ASP .Net Web Services' started by RobGSCL, Oct 25, 2006.

  1. RobGSCL

    RobGSCL Guest

    I have three questions about the namespace parameter of a webservice:

    What does it do?

    Is it necessary for it to be unique?

    Is there a way to modify it at runtime? I'll be deploying an app at
    multiple locations and I don't want to have to recompile every time we
    implement.

    TIA
    Rob
    RobGSCL, Oct 25, 2006
    #1
    1. Advertising

  2. RobGSCL

    Scott M. Guest

    The WebService Namespace (as identified by the compiler attribute) looks
    like a URL, but does not need to represent (in its entirety) a REAL
    browseable resource on your organization's web server. It is not meant to
    reflect the location the webservice is being served from and should remian
    static.

    It is used in conjunction with the XML data that will be sent to and
    returned from the WebService. Since XML tags can be made up, we need a way
    to "group" tags into logical containers. Just like .NET makes use of
    Namespaces to group, organize and prevent naming collisions of classes, XML
    uses Namespaces to do the same for XML markup. The format of an XML
    namespace, however, takes the form of something that we know to be unique to
    us (because if we just made up a word for our namespace name, it is possible
    that others could inadvertently come up with the same term. So, we make a
    namespace name from our company or organization's URL. Why in the world
    would widget.com use "http://acme.com" in their namespace names? Well, they
    wouldn't. Since our domain name is guaranteed to be unique in the world, we
    START (key word here - START) our namespace off with our domain name. But
    then, we add more to that (and this is the part to be clear on) that is
    completely made up. So the whole URL becomes something that may not really
    exist on the web, but that doesn't matter, because we're not trying to
    browse to that address. We're just trying to identify our XML markup in a
    way that no one else would.

    For example: http://wallStreetMillionaires.com/services/stockQuote may
    contain an XML tag called "string" and
    http://dotComMillionaires.com/services/realTimeQuote might also contain an
    XML tag called "string", but we'd now have a way to know who's "string" is
    who's. But, we don't need to browse to either address, nor is our code
    going to attempt to resolve those addresses. They're just names for our
    tags.

    Hope this helps.

    -Scott


    "RobGSCL" <> wrote in message
    news:...
    >I have three questions about the namespace parameter of a webservice:
    >
    > What does it do?
    >
    > Is it necessary for it to be unique?
    >
    > Is there a way to modify it at runtime? I'll be deploying an app at
    > multiple locations and I don't want to have to recompile every time we
    > implement.
    >
    > TIA
    > Rob
    >
    Scott M., Oct 25, 2006
    #2
    1. Advertising

  3. "Scott M." <> wrote in message
    news:eAOjQf%...
    > The WebService Namespace (as identified by the compiler attribute) looks
    > like a URL, but does not need to represent (in its entirety) a REAL
    > browseable resource on your organization's web server. It is not meant to
    > reflect the location the webservice is being served from and should remian
    > static.


    In fact, it looks like a URL because it's a URN, and every URL is a URN.

    You can also use something like urn:myService.myApplication.company.com.
    That makes it clear that you're not describing the location of some file on
    the Internet.

    John
    John Saunders, Oct 25, 2006
    #3
  4. RobGSCL

    Scott M. Guest

    Actually, it looks like a URL because it is a URI (Uniform Resource
    Indicator), not a URN, and every URL is a URI. URN's (Uniform Resource
    Names) look very different from URL's (Uniform Resource Locator).

    The World Wide Web Consortium standard for XML namespace names says that the
    namespace should take the form of a URI (which both URL's and URN's are).



    "John Saunders" <john.saunders at trizetto.com> wrote in message
    news:eDVJghO%...
    > "Scott M." <> wrote in message
    > news:eAOjQf%...
    >> The WebService Namespace (as identified by the compiler attribute) looks
    >> like a URL, but does not need to represent (in its entirety) a REAL
    >> browseable resource on your organization's web server. It is not meant
    >> to reflect the location the webservice is being served from and should
    >> remian static.

    >
    > In fact, it looks like a URL because it's a URN, and every URL is a URN.
    >
    > You can also use something like urn:myService.myApplication.company.com.
    > That makes it clear that you're not describing the location of some file
    > on the Internet.
    >
    > John
    >
    >
    Scott M., Oct 26, 2006
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Èý¹â
    Replies:
    1
    Views:
    555
    William F. Robertson, Jr.
    Jul 29, 2003
  2. =?Utf-8?B?Q29ybmUgUmFiZQ==?=

    Webservices SOAP and Namespace prefixes

    =?Utf-8?B?Q29ybmUgUmFiZQ==?=, Oct 26, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    5,844
    =?Utf-8?B?Q29ybmUgUmFiZQ==?=
    Oct 26, 2004
  3. Replies:
    0
    Views:
    5,110
  4. Anonymous
    Replies:
    3
    Views:
    513
    Ron Natalie
    Aug 18, 2003
  5. Jason Heyes
    Replies:
    1
    Views:
    438
    Woebegone
    Nov 19, 2004
Loading...

Share This Page