Solved

How can I add values to SOAP Header?

Posted on 2008-10-10
2
1,807 Views
Last Modified: 2013-11-26
I need to add some values to the SOAP header before calling WebService.

How can I do this in VB.Net?
0
Comment
Question by:Gary2Seven
2 Comments
 
LVL 16

Accepted Solution

by:
Gyanendra Singh earned 500 total points
ID: 22685310
0
 
LVL 2

Author Comment

by:Gary2Seven
ID: 22694829
I'm sorry I don't quite get it.

I can see that I can define my own SoapHeader with additional settings;
Public Class mySoapHeader
  Inherits System.Web.Services.Protocols.SoapHeader
  Public Username As String = String.Empty
  Public Password As String = String.Empty
End Class

But how do I get my Webservice call to use that header instead of the default class?
Public WebServiceLink As WebService.HTNGListenerSoap = New WebService.HTNGListenerSoap

??? Somehow here, I need to get WebService to use my header and therefore have username/password in header?

WebServiceLink.ReceiveMessageAsync(XmlString)

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now