Results 1 to 3 of 3

Thread: Raise error in cWebHttpHandler

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Adelaide, South Australia
    Posts
    2,859

    Default Raise error in cWebHttpHandler

    Hi

    I'm working on a cWebHttpHandler project, that is SOAP in and out. It is modernising an old cWebService service.
    The advantages are obviously
    - Much better 'own' mapping, with fine tuned error messages
    - Versioning can be done within the message
    - Measurements have shown it is considerably faster (trice as fast, when just parsing)

    I like the peErrorType which you can set to one of
    Define httpErrorHtml
    Define httpErrorJson
    Define httpErrorSoap
    Define httpErrorEmpty

    And, as per doc, when setting to httpErrorSoap a soap error is returned, but ONLY when the WebApp.exe cannot be reached.
    Code:
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">   <soap:Body>
          <soap:Fault>
             <soap:Code>
                <soap:Value>soap:Receiver</soap:Value>
             </soap:Code>
             <soap:Reason>
                <soap:Text>Error during Web Application Server session initialization, please try again later. Session denied. Web Application 'TestErrors' is not started. Select Start Web Application in the DataFlex Web Application Server Administrator to start the Web Application Please check the Windows event log for further information about the problem.</soap:Text>
             </soap:Reason>
          </soap:Fault>
       </soap:Body>
    </soap:Envelope>
    If you need to raise your own coded errors you use
    Send SetResponseStatus 500 "Invalid XML element value bla.bla.bla"

    However this is always passed back as HTML, and does not take the peErrorType into account.

    Am I doing something wrong, or is this possibly a bug in 19.1?

    Kind regards
    Marco
    Last edited by Marco; 7-Jul-2020 at 09:58 PM.
    Marco Kuipers
    DataFlex Consultant
    28 IT Pty Ltd - DataFlex Specialist Consultancy
    DataFlex Channel Partner for Australia and Pacific region
    Adelaide, South Australia
    www.28it.com.au

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •