Java AxisFault:Server.userException 是什么意思?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/3833369/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
AxisFault: What does Server.userException mean?
提问by ryanprayogo
What does the following AxisFault mean?
以下 AxisFault 是什么意思?
Does it mean that:
是否意味着:
- The request that is issued and received by the server and the server throws an (uncaught) exception, and therefore the exception is returned back to the client.
- 服务器发出和接收的请求和服务器抛出一个(未捕获的)异常,因此该异常返回给客户端。
or
或者
- My web app fails to create the SOAP request (so the request is not even sent from the client app)
- 我的 Web 应用程序无法创建 SOAP 请求(因此该请求甚至不是从客户端应用程序发送的)
NB. I'm new to web services
注意。我是 Web 服务的新手
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x1c) was found in the element content of the document.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x1c) was found in the element content of the document.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
采纳答案by ryanprayogo
If your application is respecting the extensibility of the SOAP fault codes, then it means that your server received a SOAP message but was unable to parse it.
如果您的应用程序尊重 SOAP 错误代码的可扩展性,则意味着您的服务器收到了 SOAP 消息但无法解析它。
The invalid XML character (Unicode: 0x1c) was found in the element content of the document
message should be a good indicator of what's wrong.
该invalid XML character (Unicode: 0x1c) was found in the element content of the document
消息应该很好地指示出了什么问题。
Your server is throwing an exception, which Axis sends to the client as a SOAP Fault. The faultCode indicates a Server error. Note that the Server.userException
error code is not a standard value, it just is a more specific type of server fault code.
您的服务器正在抛出一个异常,Axis 将其作为 SOAP 故障发送给客户端。faultCode 表示服务器错误。请注意,Server.userException
错误代码不是标准值,它只是一种更具体的服务器故障代码类型。
The default SOAP faultcode values are defined in an extensible manner that allows for new SOAP faultcode values to be defined. The mechanism uses a dot (.) to define more specific types of errors. It indicates that what is to the left of the dot is a more generic fault code value than the value to the right. See the specs here.
默认的 SOAP 故障代码值是以可扩展的方式定义的,允许定义新的 SOAP 故障代码值。该机制使用点 (.) 来定义更具体的错误类型。它表示点左侧的值是比右侧值更通用的故障代码值。请参阅此处的规格。
So I guess that Server.userException
is a pertinent way of saying that the exception occured at the server but is not something strictly related to the server but related to what the client sent (.userException
). At least that is what I think the authors had in mind. This is for you to discover :D.
所以我想这Server.userException
是说异常发生在服务器上的一种恰当方式,但与服务器无关,而是与客户端发送的内容有关(.userException
)。至少我认为作者是这么想的。这是给你发现的:D。