Alex Rivera | Logout

What's a good design pattern for web method return values?

Asked 2008-09-02T14:00:09.420
9

When coding web services, how do you structure your return values? How do you handle error conditions (expected ones and unexpected ones)? If you are returning something simple like an int, do you just return it, or embed it in a more complex object? Do all of the web methods within one service return an instance of a single class, or do you create a custom return value class for each method?

Edit
Report

1 Answer

1

If you're using SOAP web services then SOAP faults are the standard way to return error details, where the fault messages can return whatever additional detail you like.

answered 2008-09-02T14:18:09.780

Your Answer