473,657 Members | 2,753 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to create SOAP request header with Security.

bhu
I have a simple helloworld web service ,
when i call this service from the client this is the message sent.
-----SoapRequest at 6/7/2006 10:18:11 PM
<?xml version="1.0" encoding="utf-8"?><soap:Envel ope
xmlns:soap="htt p://schemas.xmlsoap .org/soap/envelope/"
xmlns:xsi="http ://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http ://www.w3.org/2001/XMLSchema"><soa p:Body><HelloWo rld
xmlns="http://tempuri.org/" /></soap:Body></soap:Envelope>

i got this by creating the soaplogger class
but i want to create a soap message like this.
<soapenv:Header >
<wsse:Securit y xmlns:wsse:=htt p://schemas.xmlsoap .org/ws/2003/06/secext
soapenv:mustUnd erstand="1">
<wsse:UsernameT oken>
<wsse:Usernam e>----Username here---</wsse:Username>
<wsse:Passwor d>---PW here ------</wsse:Password>
</wsse:UsernameTo ken>
</wsse:Security>
</soapenv:Header>

The C# client code is this.
ClientApp.TESTS ERVER.Service1W se proxy = new
ClientApp.TESTS ERVER.Service1W se();
UsernameToken tok = new
UsernameToken(" kkkkk","bhu***" ,PasswordOption .SendPlainText) ;
proxy.RequestSo apContext.Secur ity.Tokens.Add( tok);
textBox1.Text = proxy.HelloWorl d();

Can any one please let me know, how to resolve this issue.

thank you

bhu
Jun 8 '06 #1
0 1462

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

Similar topics

6
20245
by: john deviney | last post by:
I have a C#/.Net 1.1 client talking to a Java based web service. I need to insert a soap header on the client side which is expected on the server side. Currently, the Java ws provider, Axis, does not support automatic wsdl generation of custom headers so the wsdl has no information regarding the required header. I've read through a lot of material and managed to get a workable solution but it is far from ideal. I created a new...
0
4665
by: Daniel Thune, MCSE | last post by:
I am having a problem with formatting a SOAP Header in a .Net client. The client calls a Java Axis 1.1 based web service. In order to authenticate the caller, the web service call is intercepted by another web service that validates a security token in the header. I have pasted my current SOAP message that my code sends as captured from a trace function that I added. Below that is a sample SOAP message that the developer of the web...
0
3582
by: IT Drone | last post by:
I suspect what I want to do is simple, but after hours of googling I can't come up with an answer. I'm consuming a Java-based web service from an ASP.NET app. I want a request that includes 3 extra parameters in the header: id, login, and password. The request is supposed to look like this: <?xml version="1.0" encoding="UTF-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
3
7719
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
6321
by: Stu | last post by:
Hi, Im using vis studio 2003 and I think wse is out of the question as clients could be using java which doesnt support it. So I managed to find some code which allows you to develop a custom soap header called by using a http module. The problem Im having is I cannot seem to get the event to raise to fire off my authenticate method in the global.asax. The module is plumbed in to my web.config file Code Below:-
4
2477
by: Joseph Geretz | last post by:
We use a Soap Header to pass a token class (m_Token) back and forth with authenticated session information. Given the following implementation for our Logout method, I vastly prefer to simply code m_Token = null in order to destroy the session token when the user logs out. However, I'm finding that setting class instance to null results in no header being sent back to the client, with the result that the client actually remains with an...
6
46780
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
6084
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...
3
16310
by: Enda Manni | last post by:
Hi, I have a gSoap Web Service written using C++, it uses SOAP username and password authentication. I also have a C# form client consuming the web service, all this was working fine until I added the authentication on the server, now I can not get the client to authenticate. Can someone tell me how to add authentication info to the SOAP message posted from the C# SOAP client.
0
8816
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...
0
8717
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8600
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...
0
7311
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5629
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4150
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2726
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
2
1930
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1600
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.