Solved

How can I add values to SOAP Header?

Posted on 2008-10-10
2
1,819 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 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

627 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