当WSO2 API Manager上的服务失败时,故障消息的模式定义是什么。例如,服务的状态被阻止,调用此服务,WSO2回复一个正确的SOAP-Fault消息。什么是am:fault元素的模式(xsd)定义?
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns="http://ibridge.nl/gm/model/employee/1">
<soapenv:Header/>
<soapenv:Body>
<am:fault xmlns:am="http://wso2.org/apimanager">
<am:code>700700</am:code>
<am:message>API blocked</am:message>
<am:description>This API has been blocked temporarily. Please try again later or contact the system administrators.</am:description>
</am:fault>
</soapenv:Body>
</soapenv:Envelope>
答案 0 :(得分:0)
为WSO2创建文档请求以更新文档; https://wso2.org/jira/browse/DOCUMENTATION-866
答案 1 :(得分:0)
默认架构为
<am:fault xmlns:am="http://wso2.org/apimanager">
<am:code>ERROR_CODE</am:code>
<am:message>ERROR_MESSAGE</am:message>
<am:description>ERROR_DESCRIPTION</am:description>
</am:fault>
您可以通过序列自定义故障格式。