Inside the WSDL & Web Services Proxies
page 12 of 16
by Anonymous Contributor
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 65197/ 112

Web Service Client Rules for Inheritors: Rule #2

While implementing SOAP protocol to consume the Web Service, we need to define 2 important attributes for that class:

WebServiceBindingAttribute:

This attribute’s “Name” property maps to a specific binding (FlightServiceSoap in our example) from the WSDL document (shown in Fig 12). As we have seen earlier a binding is like an “interface” and should be implemented with each protocol.

Fig 12: binding mapping to the WebServiceBindingAttribute

In our example it would be:

[System.Web.Services.WebServiceBindingAttribute(Name="FlightServiceSoap", Namespace=http://tempuri.org/)] 

SoapDocumentMethodAttribute:

This attribute holds the value of the “soapAction” attribute of operation element defined in the “FlightServiceSoap” binding. Shown in the Fig 13 below.

Fig 13: SoapDocumentMethodAttribute mapping in WSDL document

In our example it would be: 

[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/GetFlightStatus", Use=System.Web.Services.Description.SoapBindingUse.Literal,ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]

The other two properties “Use” and “ParameterStyle” are set to the default values. These parameters are used to set the format of the SOAP request or response sent to or from the Web Service. Hence this attribute is optional.


View Entire Article

User Comments

Title: Webservice   
Name: Anbazhagan. P
Date: 2009-03-14 12:47:38 PM
Comment:
Very useful website
Title: rakesh   
Name: Name rakesh
Date: 2007-09-13 3:38:58 AM
Comment:
Ok Run
Title: Getting Error   
Name: Dilip Kumar Prusty
Date: 2006-09-18 5:19:48 AM
Comment:
I am getting
The request failed with HTTP status 404: Not Found.
this error .

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2024 ASPAlliance.com  |  Page Processed at 2024-04-26 1:49:55 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search