Webservices 101

Discussion in 'ASP .Net Web Services' started by Arjen, Dec 4, 2005.

  1. Arjen

    Arjen Guest

    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
     
    Arjen, Dec 4, 2005
    #1
    1. Advertising

  2. Arjen

    Martin Kulov Guest

    "Arjen" <> wrote in message
    news:dmvnvd$m2n$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
     
    Martin Kulov, Dec 4, 2005
    #2
    1. Advertising

  3. Arjen

    Scott M. Guest

    [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
    >
     
    Scott M., Dec 4, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kivak Wolf

    Drop down list 101

    Kivak Wolf, Oct 12, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    347
    Ken Cox [Microsoft MVP]
    Oct 12, 2005
  2. TheCoder
    Replies:
    1
    Views:
    397
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Dec 2, 2005
  3. =?Utf-8?B?am9uZWZlcg==?=

    101 Question - Passing a value from one page to another

    =?Utf-8?B?am9uZWZlcg==?=, Dec 22, 2005, in forum: ASP .Net
    Replies:
    2
    Views:
    453
    uttara
    Dec 22, 2005
  4. Replies:
    0
    Views:
    643
  5. Kasu Nai

    Java 101 - Method Calls

    Kasu Nai, Jul 2, 2003, in forum: Java
    Replies:
    1
    Views:
    1,078
    Doug Pardee
    Jul 2, 2003
Loading...

Share This Page