How do I provide information to the Web Service when the
information is required as a SOAP Header?
Answer / swapna
The key here is the Web Service proxy you created using
wsdl.exe or through Visual Studio .NET's Add Web Reference
menu option. If you happen to download a WSDL file for a
Web Service that requires a SOAP header, .NET will create a
SoapHeader class in the proxy source file. Using the
previous example:
public class Service1 :
System.Web.Services.Protocols.SoapHttpClientProtocol
{
public AuthToken AuthTokenValue;
[System.Xml.Serialization.XmlRootAttribute
(Namespace="http://tempuri.org/", IsNullable=false)]
public class AuthToken : SoapHeader {
public string Token; }}
In this case, when you create an instance of the proxy in
your main application file, you'll also create an instance
of the AuthToken class and assign the string:
Service1 objSvc = new Service1();
processingobjSvc.AuthTokenValue = new AuthToken();
objSvc.AuthTokenValue.Token = <ACTUAL token value>;
Web Servicestring strResult =
objSvc.MyBillableWebMethod();
Is This Answer Correct ? | 0 Yes | 0 No |
Define https.
what is web methods?
Tableau Training for Beginners
WHAT ARE THE ADVANTAGES OF DEDICTED HOSTING OVER SHARED HOSTING?
Explain the functioning of dynamic pages in a website?
What is an example of a web based application?
Which method is used to post a Web page to another Web page?
Give me an example of how you have planned projects from start to finish. What is your development lifecycle?
What software do you use to build websites? Give me an example of a project that you built using JavaScript. What kind of functionality did you create?
On a scale of 1 to 10 rate your proficiency in CSS, JavaScript, PhotoShop, Illustrator, Flash, ActionScript, HTML, DHTML.
1.What is Ipconfig? What purpose u can use it? 2.How can u know what ports are busy in ur machine? 3.How can u know particular port is free/ not in ur machine? 4.How many drivers in JDBC? Which Driver u r using? Why?
What are the various ways of accessing a web service?