By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,119 Members | 2,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,119 IT Pros & Developers. It's quick & easy.

SOAP Header problem to non .NET webservice

P: n/a
Hi guys,

I have a C#.NET client which sends SOAP requests to .Net webservices and non
..Net webservices.

If I do not add a SOAP header a get a valid response from all webservices.
If I do add a SOAP header a get a valid response from the .Net webservice
but an error from the client when accessing a non .Net webservice.

The non .Net webservices are created in VB6 and Java.

Furthermore, if a use VB6 and MSSOAP toolkit to send a SOAP request
(including Headers) to the non .Net webservices I get a valid response.

Has anyone a working example of sending SOAP headers to non .Net webservices
Or has anyone a idea what I am doing wrong ?

My config thing:
<add type="SimpleHeader.HeaderAdder, SimpleHeader" priority="1"

SimpleHeader class:
using System;
using System.Text;
using System.Web.Services.Protocols;

namespace SimpleHeader
public class MyHeader : SoapHeader
private string istrUser = "unknown";
public String CurrentUser
get { return istrUser; }
set { istrUser = value; }

The relevant part of SimpleHeader.HeaderAdder class:
public override void ProcessMessage(SoapMessage aobjSoapMessage)
switch (aobjSoapMessage.Stage)
case SoapMessageStage.BeforeSerialize:
MyHeader lobjSoapHeader = new MyHeader();
lobjSoapHeader.CurrentUser = istrFilename ;
case SoapMessageStage.AfterSerialize:

Nov 21 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.