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