Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How can I add values to SOAP Header?

Posted on 2008-10-10
2
Medium Priority
?
1,822 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 16

Accepted Solution

by:
Gyanendra Singh earned 1500 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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Shoutout to Emily Plummer (http://www.experts-exchange.com/members/eplummer26.html) for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

722 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