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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. ATL Web Server return values question?

ATL Web Server return values question?

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++wcfsysadminxml
3 Posts 2 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.
  • O Offline
    O Offline
    Ollie
    wrote on last edited by
    #1

    After looking at the MS sample ATL Server projects is it better to always return S_OK from a method([web_method]) and pass back error information through either an out paremeter or through a soap header? Cheers Ollie:confused:

    P 1 Reply Last reply
    0
    • P Philip Patrick

      Well, I guess yes, because if you will return something other then S_OK (like E_FAIL, whatever), the error can be intercepted before it will come to your code. Thus the result can be unknown, depending of the implemntation, maybe it will raise exception, maybe it will let it go.. Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer Need Web-based database administrator? You already have it!

      O Offline
      O Offline
      Ollie
      wrote on last edited by
      #2

      Well in my C# application that consumes the web services it raises a SOAP exception and there is no defining information in the exception that will tell me why it failed. If I want to return rich error information from COM(i.e. IErrorInfo) then I am going to have to return this as either a parameter or a soap_header, but i do not want to specify an extra parameter in every method defined, so I am thinking of using a soap_header set as an out parameter..... Any thoughts......

      1 Reply Last reply
      0
      • O Ollie

        After looking at the MS sample ATL Server projects is it better to always return S_OK from a method([web_method]) and pass back error information through either an out paremeter or through a soap header? Cheers Ollie:confused:

        P Offline
        P Offline
        Philip Patrick
        wrote on last edited by
        #3

        Well, I guess yes, because if you will return something other then S_OK (like E_FAIL, whatever), the error can be intercepted before it will come to your code. Thus the result can be unknown, depending of the implemntation, maybe it will raise exception, maybe it will let it go.. Philip Patrick Web-site: www.stpworks.com "Two beer or not two beer?" Shakesbeer Need Web-based database administrator? You already have it!

        O 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