Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / October 2006

Tip: Looking for answers? Try searching our database.

Webservices namespace- What does it do?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RobGSCL - 25 Oct 2006 03:31 GMT
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. - 25 Oct 2006 04:44 GMT
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

>I have three questions about the namespace parameter of a webservice:
>
[quoted text clipped - 8 lines]
> TIA
> Rob
John Saunders - 25 Oct 2006 14:01 GMT
> 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. - 26 Oct 2006 15:52 GMT
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).

>> The WebService Namespace (as identified by the compiler attribute) looks
>> like a URL, but does not need to represent (in its entirety) a REAL
[quoted text clipped - 9 lines]
>
> John

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.