Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Web services and namespaces

Reply
Thread Tools

Web services and namespaces

 
 
Erik Cruz
Guest
Posts: n/a
 
      12-07-2003
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 http://tempuri.org 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


 
Reply With Quote
 
 
 
 
Erik Cruz
Guest
Posts: n/a
 
      12-08-2003
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." <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
> > 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 http://tempuri.org 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
> >
> >

>
>



 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      12-08-2003
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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 http://tempuri.org 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
>
>



 
Reply With Quote
 
Scott M.
Guest
Posts: n/a
 
      12-09-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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." <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:%(E-Mail Removed)...
> > > 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 http://tempuri.org 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
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How .NET web services client handles exceptions from Java web services? John ASP .Net Web Services 4 03-31-2006 10:13 PM
.NET 2.0 Membership services and Web Services va ASP .Net Security 0 02-12-2006 11:09 PM
What is the difference between C# windows Services and web services in vs.net? Nick ASP .Net 1 09-12-2005 02:33 PM
how to send objects with different namespaces to multiple Web Services IanT ASP .Net Web Services 1 06-30-2004 04:36 AM
how to implement Services Interface Tier (web services) Szymi MCSD 0 11-03-2003 10:50 AM



Advertisments