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