Web services and namespaces

Ask a Question related to ASP.NET Web Services, Design and Development.

  1. #1

    Default Web services and namespaces

    Hi.

    VS.NETO help says the following about the webservice attribute:

    "The WebServiceAttribute is not required for an XML Web service to be
    published and executed. You can use the WebServiceAttribute to specify a
    name for the XML Web service that is not restricted by the rules for a
    common language runtime identifier, which is used in the service description
    and the Service help page for the XML Web service."

    I removed the WebService attribute from a web service I am writing, since
    the help says that it is not necessary. When I run the web service I noticed
    that the [url]http://tempuri.org[/url] namespace was used automatically. I believe
    then, that the WebService attribute is necessary. What is the real role of
    this attribute? What kind of problems I may have if my web service does not
    have a namespace?

    TIA,
    Erik Cruz


    Erik Cruz Guest

  2. Similar Questions and Discussions

    1. how to send objects with different namespaces to multiple Web Services
      I have a problem where i would like to send the same object to 2 or more different webservices which accept objects with exactly the same...
    2. Namespaces in PHP5, removed?
      Hi All, I read in a forum somewhere that namespaces, though once supposed to be a part of PHP5, have been removed. Is this true? Can anyone...
    3. How does a DLL change namespaces?
      My ASP.NET web service runs fine on my local PC, and it has the namespace that I gave it. But when I upload it to my hosting company I get this...
    4. RubyDotNet r4 and namespaces
      I grabbed the r4 release of RubyDotNet from http://www.saltypickle.com/rubydotnet, and it works great (well, on my laptop. My main PC seems to...
    5. Duplicate Namespaces
      When I include a class (MasterData : DataSet), as a return type or an OUT argument in a Web Service I get an error "Duplicate namespace, , ". when...
  3. #2

    Default Re: Web services and namespaces

    Hi Scott.

    No problems with the syntax for designating the namespaces. I would like to
    know if it is possible to create a web service without a namespace and if
    so, what disadvantages or problems can I find when running the web service?

    TIA,
    Erik Cruz

    "Scott M." <s-mar@BADSPAMsnet.net> wrote in message
    news:emEt9MevDHA.3532@TK2MSFTNGP11.phx.gbl...
    > The Namespace is an XML designation that you create to help organize your
    > stuff. TempURI is just an example. If you look at the comments generated
    > in VS.NET when you make a web service, you'll see syntax for designating
    > your custom namespace.
    >
    >
    > "Erik Cruz" <erikacf.spammers.out@antares.com.br> wrote in message
    > news:%23TI3UpZvDHA.3496@TK2MSFTNGP11.phx.gbl...
    > > Hi.
    > >
    > > VS.NETO help says the following about the webservice attribute:
    > >
    > > "The WebServiceAttribute is not required for an XML Web service to be
    > > published and executed. You can use the WebServiceAttribute to specify a
    > > name for the XML Web service that is not restricted by the rules for a
    > > common language runtime identifier, which is used in the service
    > description
    > > and the Service help page for the XML Web service."
    > >
    > > I removed the WebService attribute from a web service I am writing,
    since
    > > the help says that it is not necessary. When I run the web service I
    > noticed
    > > that the [url]http://tempuri.org[/url] namespace was used automatically. I believe
    > > then, that the WebService attribute is necessary. What is the real role
    of
    > > this attribute? What kind of problems I may have if my web service does
    > not
    > > have a namespace?
    > >
    > > TIA,
    > > Erik Cruz
    > >
    > >
    >
    >

    Erik Cruz Guest

  4. #3

    Default Re: Web services and namespaces

    The Namespace is an XML designation that you create to help organize your
    stuff. TempURI is just an example. If you look at the comments generated
    in VS.NET when you make a web service, you'll see syntax for designating
    your custom namespace.


    "Erik Cruz" <erikacf.spammers.out@antares.com.br> wrote in message
    news:%23TI3UpZvDHA.3496@TK2MSFTNGP11.phx.gbl...
    > Hi.
    >
    > VS.NETO help says the following about the webservice attribute:
    >
    > "The WebServiceAttribute is not required for an XML Web service to be
    > published and executed. You can use the WebServiceAttribute to specify a
    > name for the XML Web service that is not restricted by the rules for a
    > common language runtime identifier, which is used in the service
    description
    > and the Service help page for the XML Web service."
    >
    > I removed the WebService attribute from a web service I am writing, since
    > the help says that it is not necessary. When I run the web service I
    noticed
    > that the [url]http://tempuri.org[/url] namespace was used automatically. I believe
    > then, that the WebService attribute is necessary. What is the real role of
    > this attribute? What kind of problems I may have if my web service does
    not
    > have a namespace?
    >
    > TIA,
    > Erik Cruz
    >
    >

    Scott M. Guest

  5. #4

    Default Re: Web services and namespaces

    You need to investigate XML a bit more and this will become clear. In XML,
    namespaces are used to qualify and define what xml tags are what, similarly
    to how in .NET, namespaces keep classes straight.

    You do need a namespace for your web service and it can take the form of a
    URL. You can then make up the rest. If you put it in the form of a URL
    though, you can use your company's domain name (which is guaranteed by DNS
    to be unique).

    Namespaces for web services help not only you keep your stuff straight, they
    also help the consumers of the web service understand what they are
    consuming.


    "Erik Cruz" <erikacf.spammers.out@antares.com.br> wrote in message
    news:u1RkKKfvDHA.1424@tk2msftngp13.phx.gbl...
    > Hi Scott.
    >
    > No problems with the syntax for designating the namespaces. I would like
    to
    > know if it is possible to create a web service without a namespace and if
    > so, what disadvantages or problems can I find when running the web
    service?
    >
    > TIA,
    > Erik Cruz
    >
    > "Scott M." <s-mar@BADSPAMsnet.net> wrote in message
    > news:emEt9MevDHA.3532@TK2MSFTNGP11.phx.gbl...
    > > The Namespace is an XML designation that you create to help organize
    your
    > > stuff. TempURI is just an example. If you look at the comments
    generated
    > > in VS.NET when you make a web service, you'll see syntax for designating
    > > your custom namespace.
    > >
    > >
    > > "Erik Cruz" <erikacf.spammers.out@antares.com.br> wrote in message
    > > news:%23TI3UpZvDHA.3496@TK2MSFTNGP11.phx.gbl...
    > > > Hi.
    > > >
    > > > VS.NETO help says the following about the webservice attribute:
    > > >
    > > > "The WebServiceAttribute is not required for an XML Web service to be
    > > > published and executed. You can use the WebServiceAttribute to specify
    a
    > > > name for the XML Web service that is not restricted by the rules for a
    > > > common language runtime identifier, which is used in the service
    > > description
    > > > and the Service help page for the XML Web service."
    > > >
    > > > I removed the WebService attribute from a web service I am writing,
    > since
    > > > the help says that it is not necessary. When I run the web service I
    > > noticed
    > > > that the [url]http://tempuri.org[/url] namespace was used automatically. I
    believe
    > > > then, that the WebService attribute is necessary. What is the real
    role
    > of
    > > > this attribute? What kind of problems I may have if my web service
    does
    > > not
    > > > have a namespace?
    > > >
    > > > TIA,
    > > > Erik Cruz
    > > >
    > > >
    > >
    > >
    >
    >

    Scott M. Guest

  6. #5

    Default Re: Web services and namespaces

    What would happen to a web service if the domain specified in the namespace no longer exists? Would the web service still work if there is no domain controller reference in the network for the domain name used in the namespace?
    Sandy Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139