Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我开发了一个自定义中介来验证输入参数,并成功测试了它。但是我想向客户端返回带有一些有意义消息的 Http 响应,例如 HTTP 403、警告消息等,任何人都可以告诉我该怎么做吗?
您可以在发送响应之前使用以下代码。
<header name="To" action="remove"/> <property name="RESPONSE" value="true"/> <property name="HTTP_SC" value="403" scope="axis2"/>
在这里,它已将 403 放入 http 状态代码。最后,您应该添加<send/>中介。
<send/>
谢谢。