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 / December 2005

Tip: Looking for answers? Try searching our database.

Webservices 101

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Arjen - 04 Dec 2005 21:44 GMT
Hi,

I have some starters questions.

The blank webservice in the 'webservice template' in 'visual web developer'
start with some lines of code. I hope some one can tell me more about it.

[WebService(Namespace = "http://tempuri.org/")]
- Where is this namespace used for?
- Who use it?
- What happens when I change or remove it?
- Do I need to use this line?
- Do I need to use it when using UDDI?

[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
- What's this?

public Service () {
  //Uncomment the following line if using designed components
  //InitializeComponent();
}

- What does this mean?

Thats it! Hope someone will help!

Thanks!
Arjen
Martin Kulov - 04 Dec 2005 22:02 GMT
> [WebService(Namespace = "http://tempuri.org/")]
> - Where is this namespace used for?
> - Who use it?
> - What happens when I change or remove it?
> - Do I need to use this line?
> - Do I need to use it when using UDDI?

Hi Arjen,
you need to set a correct namespace, before you deploy your web service.
Think of it as a unique identificator for your service. Without it your
consumers mey experience problems accessing your service.

> [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
> - What's this?

From MSDN:
WebServiceBindingAttribute.ConformsTo Property
Note: This property is new in the .NET Framework version 2.0.

Gets or sets the Web Services Interoperability (WSI) specification to which
the binding claims to conform.
The WS-I organization publishes guidelines to ensure the interoperability of
Web services across platforms. This property indicates the WSI specification
to which the binding claims to conform.

> public Service () {
>   //Uncomment the following line if using designed components
>   //InitializeComponent();
> }
>
> - What does this mean?

It means that if you are going to use Visual Studio designer to drag and
drop components to your web service, you need to uncomment the line, so the
designer should work. I am not sure if you are gonna need it in production
code.

HTH,

Signature

Martin Kulov
http://www.codeattest.com/blogs/martin

MCAD Charter Member
MCSD.NET Early Achiever
MCSD

Scott M. - 04 Dec 2005 23:21 GMT
[WebService(Namespace = "http://tempuri.org/")]

WebServices transmit their requests and responses as XML.

In XML, the tags are user-defined and that leaves the potential that 2
applications may wind up using the same tag name, but for different
meanings.

The Namespace here is not a reference to a .NET namespace, it is a
declaration of what XML namespace you wish to use for the XML tags requested
and responded in your WebServices (same concept as .NET namespaces, but used
for XML tags).

You should replace http://tempuri.org with your own organization's URL
followed by a slash "/" and something you make up to define your service.
The resulting URL need not actually exist as a browsable resource on a web
server.

> - Where is this namespace used for?
> - Who use it?
[quoted text clipped - 16 lines]
> Thanks!
> Arjen

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



©2009 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.