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. SoapHeaders???

SoapHeaders???

Scheduled Pinned Locked Moved C#
xmlquestiondatabasewcfcom
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.
  • B Offline
    B Offline
    bakerfishsticks
    wrote on last edited by
    #1

    I have no problems sending a soap header in my call but how do i read the soap
    header response. This is using the proxy generated class I modified it to send
    the header info. Heres an excerpt of what i have: private SessionInfo objHeader = null; [System.Web.Services.Protocols.SoapHeader "sessionObject",Direction=SoapHeaderDirection.Out)] [System.Web.Services.Protocols.SoapRpcMethodAttribute("execute", RequestNamespace=_RequestNS, ResponseNamespace=_RequestNS)] [return: System.Xml.Serialization.SoapElementAttribute("result")] public string execute(string sql) { object[] results = this.Invoke("execute", new object[] {sql}); return ((string)(results[0])); } The sessionObject is a property that set's the private objHeader. How in the world
    do i read the header coming back from the soap call:confused: This is what the header object looks like: [XmlRoot("SessionInfo")] public class SessionInfo : SoapHeader { /// [XmlAttribute("xmlns")] public string xmlns=@"http://www.aspconverters.com/SessionInfoHeader"; /// /// user id from succesful login /// [XmlElement(ElementName="SESSION_USER")] public string SESSION_USER = ""; /// /// session id from succesful login /// [XmlElement(ElementName="SESSION_ID")] public string SESSION_ID = ""; [XmlElement(ElementName="SESSION_SIGNATURE")] public string SESSION_SIGNATURE = ""; [XmlElement(ElementName="messageID")] public string messageID = ""; [XmlElement(ElementName="id")] public string id = ""; }

    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