473,763 Members | 6,666 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

SOAP Header problem to non .NET webservice

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:
<webServices>
<soapExtensionT ypes>
<add type="SimpleHea der.HeaderAdder , SimpleHeader" priority="1"
group="Low"/>
</soapExtensionTy pes>
</webServices>

SimpleHeader class:
using System;
using System.Text;
using System.Web.Serv ices.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.He aderAdder class:
public override void ProcessMessage( SoapMessage aobjSoapMessage )
{
switch (aobjSoapMessag e.Stage)
{
case SoapMessageStag e.BeforeSeriali ze:
MyHeader lobjSoapHeader = new MyHeader();
lobjSoapHeader. CurrentUser = istrFilename ;
aobjSoapMessage .Headers.Add(lo bjSoapHeader);
break;
case SoapMessageStag e.AfterSerializ e:

Nov 21 '06 #1
0 1452

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
3691
by: Corne Rabe | last post by:
Hi all I've got a webservices that will be called by a delphi product. They have defined a soap message that they will use to call my webservice. A header snippet is found below: <soap:Header> <mm:TheHeader xmlns:mm="http://The URL"> <SomeValue>123</SomeValue> <AnotherValue>blabla</AnotherValue> </mm:TheHeader >
3
5256
by: ryan.mclean | last post by:
Hi everyone! I'm hoping that someone can help me out. I have a webservice written in vb.net. This service uses the SoapHeader to secure the webservice to users that give a username and password. I am trying to call this webservice via classic asp. This works as long as the service is not authenticated. Here is the asp code: ...
5
8268
by: jb | last post by:
*Please* help --- I'm tearing my hair out. I want to use sessionstate in a webservice, accessed from a client, written in script (JScript, InfoPath). I have written my webservice (C# .NET). I have marked the method(s) with EnableSession=true. I have read everything there is to read! I am told that to reuse session, my client needs to receive a cookie in the header from the webservice and then pass this back in all future calls. ...
3
7726
by: Sydney | last post by:
Hi, I am trying to construct a WSE 2.0 security SOAP request in VBScript on an HTML page to send off to a webservice. I think I've almost got it but I'm having an issue generating the nonce value for the UserName token. Is it possilbe at all to do this from VBScript (or jscript?)? I know I will be limited with what I can do with the SOAP message. Eg/ can't sign/encrypt it etc. Thanks,
1
2111
by: Peter van der veen | last post by:
Hi I have a problem in VB.net 2.0 We are using a third party webservice. I have loaded the wsdl file and can access the functions the service has. Now this party wants that we add a SOAP header element named 'Vendor' so that they can distinguis which vendor called the webservice.
6
43062
by: Peter van der veen | last post by:
Hi I have the following problem. I'm calling a webservice from within a VB.net 2005 Windows program. For this i got a WSDL file and loaded that in VB. Until now i just call the webservice and everything works OK. Now i need to add an extra attribute/header element to the SOAP header before i contact the webservice.
6
46805
by: John | last post by:
I'm trying to call a Webservice (Non-.NET) That requires the insertion of security credentials into the SOAP header. Up until know I've been creating Dynamic proxy classes to call web services and not been dealing with the inner workings of SOAP. Looks Like I need to learn a little about soap and Manually calling Web Services..... Any help will be very appreciated !!!
1
6091
by: novicedlh | last post by:
Hello, I am creating a webservice that collects user information and stores it in a database. Since the user information contains sensitive data like SSN I am planning to use WS-Security (WSE 2.0) in my WebService to digitally sign and encrypt the data. Here are the steps I followed to digitally sign the message: 1) I created a X.509 certificate using Certification Services in Windows Server 2003. 2) I installed the certificate...
0
3062
by: broersen | last post by:
Hello, Does someone know how to create manually the header for an SOAP message, without having an WSDL? I also use an X509 certificate for connecting to the webservice. Can anyone help me to get on the right road. I have to talk to an old Java webservice, so that's why I don't have an WSDL. I'm sending it with HTTPWebRequest or HTTPSWebRequest with VB but I needed a header like this: Request:
0
2778
by: broersen | last post by:
Hello, Does someone know how to create manually the header for an SOAP message, without having an WSDL? I also use an X509 certificate for connecting to the webservice. Can anyone help me to get on the right road. I have to talk to an old Java webservice, so that's why I don't have an WSDL. I'm sending it with HTTPWebRequest or HTTPSWebRequest with VB but I needed a header like this: Request:
0
9564
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9387
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10148
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9938
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9823
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5406
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2794
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.