Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Adding Authentication in C# client for gSOAP C++ webservices........

Adding Authentication in C# client for gSOAP C++ webservices........

Scheduled Pinned Locked Moved C#
wcfsecurityxmlcsharpc++
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    King Julien
    wrote on last edited by
    #1

    Hi CP gurus, I have a gSoap Web Service written using C++, it uses SOAP username and password authentication. I also have a C# 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 web service methods. Can someone tell me how to add authentication info to the SOAP message posted from the C# SOAP client. It may look something like this... <?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:Bodyns2: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:Bodyns2:GetDBOldestPendingRow<iMaxRows>100</iMaxRows></ns2:GetDBOldestPendingRow></SOAP-ENV:Body></SOAP-ENV:Envelope> No how to add the blocked Authentication line in the SOAP message.....??? Searched Google... but no clue is left.... Thank in advance for your help.....

    Have a Happy Coding.....

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups