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. Get full SOAP message

Get full SOAP message

Scheduled Pinned Locked Moved C#
wcfxmltutorialquestion
3 Posts 3 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.
  • N Offline
    N Offline
    Nandiator
    wrote on last edited by
    #1

    I have a webservice and I need to log the full SOAP message. I need to get the full SOAP message, including both SOAP Header and SOAP Body. [WebMethod] public string MyMethod() { string szSOAPMessage = ""; string szReply = ""; szSOAPMessage = ????(); // This is the part I need to know Log( szSOAPMessage ); DoSomething(); return szReply; } Does anybody know how to get it?

    J M 2 Replies Last reply
    0
    • N Nandiator

      I have a webservice and I need to log the full SOAP message. I need to get the full SOAP message, including both SOAP Header and SOAP Body. [WebMethod] public string MyMethod() { string szSOAPMessage = ""; string szReply = ""; szSOAPMessage = ????(); // This is the part I need to know Log( szSOAPMessage ); DoSomething(); return szReply; } Does anybody know how to get it?

      J Offline
      J Offline
      J4amieC
      wrote on last edited by
      #2

      It doesnt really happen like that... the SOAP message actually specifies how to call "MyMethod", what parameters to pass to it, and what response to expect. If you compile your webservice and view it in a browser by entering debug, or browsing directly, you will see it lets you call your webmethods to test them. These pages will display a great deal of info on the format of the messages sent. To access the actual soap message in transit, you need to go one step above your actual method, to the proxy class generated for you when you add a web reference (it can be viewed by going to Project>View all files in the menu of VS).

      1 Reply Last reply
      0
      • N Nandiator

        I have a webservice and I need to log the full SOAP message. I need to get the full SOAP message, including both SOAP Header and SOAP Body. [WebMethod] public string MyMethod() { string szSOAPMessage = ""; string szReply = ""; szSOAPMessage = ????(); // This is the part I need to know Log( szSOAPMessage ); DoSomething(); return szReply; } Does anybody know how to get it?

        M Offline
        M Offline
        Maqsood Ahmed
        wrote on last edited by
        #3

        Hello, Have a look at SoapExtension class in MSDN. Also see this HTH. Cheers :) Maqsood Ahmed - MCAD.net Kolachi Advanced Technologies http://www.kolachi.net

        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