473,406 Members | 2,816 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,406 software developers and data experts.

gSoap authentication from C# Soap Client

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.
here is some code I call to initilize the soap call from the C# form.

public partial class MyForm : Form
{
public MyForm()
{
InitializeComponent();

Service service = new Service();
}
...
...
...
Thanks,
Enda Manni

Jan 11 '08 #1
2 8431
Enda,

How did you add authentication on the server? Are you using message
security or transport security? In other words, are you counting on using
the authentication provided by the HTTP transport (in the headers) or is it
embedded in the message?

This is assuming, of course, you are using HTTP as the transport
mechanism for your SOAP calls.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Enda Manni" <en*********@hotmail.comwrote in message
news:E7**********************************@microsof t.com...
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.
here is some code I call to initilize the soap call from the C# form.

public partial class MyForm : Form
{
public MyForm()
{
InitializeComponent();

Service service = new Service();
}
..
..
..
Thanks,
Enda Manni

Jan 11 '08 #2
Hi,

I am using SOAP authentication, with a username and password. Here is the
soap request I would like to receive at the web service.

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://localhost:80/Service.wsdl"
xmlns:ns2="http://tempuri.org/ns1.xsd"><SOAP-ENV:Body><ns2:getBatteryLevel></ns2:getBatteryLevel></SOAP-ENV:Body></SOAP-ENV:Envelope>POST
/ HTTP/1.1
Host: localhost:8080
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 489
Connection: close
Authorization: Basic dXNlcjpwYXNz
SOAPAction: ""

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns1="http://localhost:8080/Service.wsdl"
xmlns:ns2="http://tempuri.org/ns1.xsd"><SOAP-ENV:Body><ns2:GetDBOldestPendingRow><iMaxRows>100</iMaxRows></ns2:GetDBOldestPendingRow></SOAP-ENV:Body></SOAP-ENV:Envelope>
Is there a way I can get this info into the C# client request?

Thanks,
Enda

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.comwrote in
message news:eX**************@TK2MSFTNGP02.phx.gbl...
Enda,

How did you add authentication on the server? Are you using message
security or transport security? In other words, are you counting on using
the authentication provided by the HTTP transport (in the headers) or is
it embedded in the message?

This is assuming, of course, you are using HTTP as the transport
mechanism for your SOAP calls.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Enda Manni" <en*********@hotmail.comwrote in message
news:E7**********************************@microsof t.com...
>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.
here is some code I call to initilize the soap call from the C# form.

public partial class MyForm : Form
{
public MyForm()
{
InitializeComponent();

Service service = new Service();
}
..
..
..
Thanks,
Enda Manni

Jan 14 '08 #3

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

Similar topics

0
by: Eric Dennison | last post by:
I've been playing around with NuSOAP as a PHP based SOAP server and client. Works great! Now I'm trying to write (using gSOAP) a simple C/C++ based client to test against my simple SOAP server....
0
by: Torsten Mueller | last post by:
Does anybody use gSOAP 2.7 in a multithreaded environment? Are the gSOAP functions (especially soap_serve) really thread safe? I use pthreads on Solaris. The main function has a loop like this:...
0
by: Naoum Naoumov | last post by:
So I have a gsoap server and a PHP soap client and I am trying to return a list (vector) of objects to the PHP client. However, the client seems to only store the last element of the array ... Any...
5
by: ayaz.usman | last post by:
Hi, I've built a web services proxy server, in C# using wsdl.exe, by importing wsdl. Howeever, when I go to : http://localhost/sample.asmx?wsdl, they wsdl there does not match the wsdl I fed...
1
by: cherman | last post by:
I don't know if anybody here worked with gSOAP software, but I do hope so. I've made some simple server app using gSOAP example. Everythig worked fine until I switched it into ssl mode. Using it...
0
by: sumeta | last post by:
Hello Everyone , i m a fresher nd have to Develop TR-069 protocol (CPE WAN Management Protocol) using gSOAP toolkit , in c/c++ in Linux .. CPE WAN Management Protocol , intended for...
0
dav01it
by: dav01it | last post by:
Does someone have experience with gSoap and .NET webservices? I've build a .NET webservice that works very well but only with .NET clients. Creating a client with gsoap 7.10 gives errors: (...)...
4
by: gcharbon | last post by:
Hi community, I have a problem with a Soap client written in php. I have a local server (coded in c and a client in c too, it works fine), but i want to test client in php, and i have an error...
0
by: leon70 | last post by:
Hi Group, I built a gSoap 2.7.11 Web services client in C++ on AIX and have got it talking to the remote service. The service is sending back an array of objects to my client but the client is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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...
0
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...
0
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...
0
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...

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.