473,326 Members | 2,102 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Sending uname/pword in soapHeader

HI all:
I have consumed a wsdl file, it has 2 elements username and password.

I am not able to set it in a header.

I am able to create a new instance of the class, then see username and
password element, but if i pass the values, it is not going in header.

Peoplesoft on other end requires the uname and password to be sent in
header

Help me out
Neal

Nov 23 '05 #1
2 2853
ne****@gmail.com wrote in news:1116433128.493419.67150
@g44g2000cwa.googlegroups.com:
Peoplesoft on other end requires the uname and password to be sent in
header


Adding items to a header is easy.

Vendor = new xxx.Vendor();
Vendor.AuthHeaderValue = new xxx.AuthHeader();
Vendor.AuthHeaderValue.Username = aUsername;
Vendor.AuthHeaderValue.Password = aPassword;
Vendor.AuthHeaderValue.Version = 1;

AuthHeader was defined in the WSDL and .NET of course created the proxy class
for it too. Tkae a look around your CS file that was generated from teh WSDL.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Nov 23 '05 #2
ne****@gmail.com wrote in news:1116433128.493419.67150
@g44g2000cwa.googlegroups.com:
Peoplesoft on other end requires the uname and password to be sent in
header


Adding items to a header is easy.

Vendor = new xxx.Vendor();
Vendor.AuthHeaderValue = new xxx.AuthHeader();
Vendor.AuthHeaderValue.Username = aUsername;
Vendor.AuthHeaderValue.Password = aPassword;
Vendor.AuthHeaderValue.Version = 1;

AuthHeader was defined in the WSDL and .NET of course created the proxy class
for it too. Tkae a look around your CS file that was generated from teh WSDL.
--
Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/
"Programming is an art form that fights back"

Blog: http://blogs.atozed.com/kudzu
Nov 23 '05 #3

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

Similar topics

1
by: justin_sun | last post by:
All the sample code that I can find on SoapHeader is at least one level down within a root node. However, I'm working on a project needs to create a soap header like this: <SOAP-ENV:Header>...
0
by: justin_sun | last post by:
I'm working on a project needs to create a soap header like this: <SOAP-ENV:Header> <MessageID> uuid:6B29FC40-CA47-1067-B31D-00DD010662DA </:MessageID> <To>http://abc.example</To>...
7
by: Michael Peters | last post by:
I wish to change/set the namespace for a header in my web service. I have found the following code and it does not appear to work and my assumption is because I am using RPC encoding... ...
0
by: Peter Morris [Droopy eyes software] | last post by:
I'm not sure what my problem is so I thought I'd post here to see if anyone can shed some light onto my problem. 1) I have a SoapHeader descendant called AuthenticateUserHeader that has UserName...
0
by: Mannfred | last post by:
I've written a complex web service in C# to be used by SmartDevices and I'm trying to reduce size of the message to the absolute minimum to save on cost, every byte counts etc. Is there any way...
10
by: Andy Kendall | last post by:
I have a problem accessing my custom SoapHeader from a SoapExtension. My extension has no compile time reference to the class derived from SoapHeader, so how can cast it into a SoapHeader of the...
0
by: Fred | last post by:
I am trying to build a consumer to a webservice which use soapheader. I am using Visual Studio 2003. Please see the wsdl-file below. Why is it that the SOAPHEADER is empty when I use it int the...
1
by: Joseph Geretz | last post by:
Given the following Web Service method definition: public DataTable GetData() { ... } If GetData throws an exception, obviously the functional return is toast.
4
by: Rasika WIJAYARATNE | last post by:
Hi everyone, We have a web method that accepts a type of AuthHeader containing credentials for validating WS calls, which is shown below: public class AuthHeader : SoapHeader { public string...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.