AXIS:验证邮件的安全性时发生错误

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AXIS:验证邮件的安全性时发生错误相关的知识,希望对你有一定的参考价值。

我有一个应用程序,使用Web服务与客户端后端进行会谈。我使用Eclipse和客户端提供的WSDL / XSD生成了Java客户端。

当我尝试向后端发送请求时,我看到下面的异常。

     faultSubcode:
 faultString: An error occurred when verifying security for the message.
 faultActor:
 faultNode:
 faultDetail:
        {http://xml.apache.org/axis/}stackTrace:An error occurred when verifying security for the message.
        at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
        at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
        at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:604)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1759)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2915)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:741)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
        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)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at com.app.main.ws.BasicHttpBinding_SendMessage.sendMessage(BasicHttpBinding_SendMessage.java:201)
        at com.app.main.ws.OTPConnector.main(OTPConnector.java:43)

        {http://xml.apache.org/axis/}hostname:machine114

An error occurred when verifying security for the message.
        at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
        at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
        at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:604)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocumentFragmentScannerImpl.java:1759)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2915)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:625)
        at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:116)
        at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:488)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:812)
        at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:741)
        at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:123)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1208)
        at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:525)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:392)
        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)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
        at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
        at org.apache.axis.client.Call.invoke(Call.java:2767)
        at org.apache.axis.client.Call.invoke(Call.java:2443)
        at org.apache.axis.client.Call.invoke(Call.java:2366)
        at org.apache.axis.client.Call.invoke(Call.java:1812)
        at com.app.main.ws.BasicHttpBinding_SendMessage.sendMessage(BasicHttpBinding_SendMessage.java:201)
        at com.app.main.ws.OTPConnector.main(OTPConnector.java:43)

在搜索互联网上遇到这个问题时,似乎这个问题与应用程序点击基于Microsoft技术的webservices应用程序有关,我的应用程序就是这种情况。

请熟悉此问题的任何人提供有关此处可能出现的问题的知识。

谢谢,

答案

面对基于SOAP的Web服务的类似问题。在我们的例子中,我们尝试将基本身份验证作为HTTP标头的一部分发送。将其更改为作为SOAP标头的一部分发送 - 它解决了问题。使用SOAP UI之类的工具

以上是关于AXIS:验证邮件的安全性时发生错误的主要内容,如果未能解决你的问题,请参考以下文章

发送 TLS 电子邮件时 Laravel 证书验证错误

windows远程桌面连接时,显示发生身份验证错误,给函数提供的身份无效

Laravel 5.7 处理来自 API 的电子邮件验证错误

调用经过用户身份验证的 http 触发器时发生错误

当我使用发送邮件任务时,SSIS 包显示错误

win10远程桌面显示发生身份验证错误(代码:0x800706be)是怎么回事啊