我正在利用ResWebservice进行一些基本业务,如创建/研究。 请求xml研究类似情况
<customer>
<name/>
.....
</customer>
For a successful operation I return the same customer XML with extra fields populated in it(eg. systemId etc which we blank in the request) . with Response.Status=2000
For an unsuccessful operation i return something like this with different error codes . e.g Response.Status = 422(Unprocessable entity) Response.Status= 500(Internal Server Error) and few others..
<errors>
<error> An exception occurred while creating the customer</error>
<error> blah argument is not valid.</error>
</errors>
现在我不清楚,这是向客户发送错误的正确方式。 或许应该站在答复的头脑中。
I will really appreciate any help. Thanks!