Question How to return an error-message in a webservice

Hi everybody,

we have an old webservice, and the guy who wrote it 20 years back returned error messages like this:

RETURN ERROR "this is an error".

my questions are:
1. is this text ever sent back to the web-client ?
2. if yes, how does the web-client retrieve this message ?
3. is there a better way to return messages to the client ?

TIA, Wolf
 
Hi Wolf
There are many many ways to do web services with OpenEdge.
How is it implemented? 20 years ago, I suppose this is implemented using webspeed?
What do you call a web-client? The web browser? Or Progress own webclient?
You have to tell us more so that we can help you.
Regards
JC
 
It's not webspeed. We have an appserver running, using SOAP and WSDL. The clients are PHP and C#
The clients call procedures on the appserver, which of course have parameters. So I could just add an extra parameter to the procedures, but this gives problems to currently running web-applications, so it's not really an option.

The errors i'm talking about happen only during developement, e.g. when a client-programmer passes parameters, which don't fit together (eg. if Param-1 = "A", Param-2 may not be "B"). I think the fact, that these errors only happen during developement, was the reason, why the error-messages where not passed back via parameters, but simply with "RETURN ERROR "<errormessage>".

"RETURN ERROR" leads to a SOAP-Fault exception, but this usually shows only "An error was detected while executing the Web Service request. (10893)", which tells the developer exactly nothing. So i want to find a way to pass the actual reason for the error ("<errormessage>".) back to the client-developer, without changing the signature of the existing procedures. That's why I came up with my original 3 questions:

1. is this text ever sent back to the web-client ?
2. if yes, how does the web-client retrieve this message ?
3. is there a better way to return messages to the client ?

I hope I explained it clearly enough

Wolf
 
Top