Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Webservices 101

Reply
Thread Tools

Webservices 101

 
 
Arjen
Guest
Posts: n/a
 
      12-04-2005
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


 
Reply With Quote
 
 
 
 
Martin Kulov
Guest
Posts: n/a
 
      12-04-2005
"Arjen" <(E-Mail Removed)> wrote in message
news:dmvnvd$m2n$(E-Mail Removed)1.ov.home.nl...
> [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,

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

MCAD Charter Member
MCSD.NET Early Achiever
MCSD


 
Reply With Quote
 
 
 
 
Scott M.
Guest
Posts: n/a
 
      12-04-2005
[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?
> - 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
>



 
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
VoIP 101 Silverstrand Front Page News 10 09-08-2005 07:20 AM
SIP 101 - Session Initiation Protocol Explained Silverstrand Front Page News 0 07-29-2005 05:31 PM
Review: Battalion-101~ S Notebook Review Silverstrand Reviews & How-To's 0 06-20-2005 02:52 AM
Sybex, CBT Nuggets, and Study Notes For Sale SY0-101 ButtercupsMom Microsoft Certification 0 05-01-2005 01:05 PM
Exam SY0-101 CompTIA Security+ Jester_10 Microsoft Certification 1 03-16-2005 11:35 AM



Advertisments