- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 .net 中开发的 Web 服务,该服务接受用户名和密码作为 SOAP header 的一部分。我创建了 SOAPHandler 来创建 header 。
我打印了如下消息:
<soapenv:Header xmlns:wsa="http://www.w3.org/2005/08/addressing">
<wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsse:UsernameToken>
<wsse:Username>xxxxxxxxxxx</wsse:Username>
<wsse:Password>xxxxxxxx</wsse:Password>
</wsse:UsernameToken>
</wsse:Security>
</soapenv:Header>
当我点击该服务时,我收到以下错误。
[4/3/16 18:53:10:342 EET] 00000027 SystemErr R javax.xml.ws.WebServiceException: org.apache.axis2.AxisFault: Must
> Understand check failed for header
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> : Security
> [4/3/16 18:53:10:343 EET] 00000027 SystemErr R at org.apache.axis2.jaxws.ExceptionFactory.createWebServiceException(ExceptionFactory.java:175)
> [4/3/16 18:53:10:343 EET] 00000027 SystemErr R at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:70)
> [4/3/16 18:53:10:343 EET] 00000027 SystemErr R at org.apache.axis2.jaxws.ExceptionFactory.makeWebServiceException(ExceptionFactory.java:128)
> [4/3/16 18:53:10:343 EET] 00000027 SystemErr R at org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:586)
> [4/3/16 18:53:10:343 EET] 00000027 SystemErr R at org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.doInvoke(AxisInvocationController.java:130)
> [4/3/16 18:53:10:344 EET] 00000027 SystemErr R at org.apache.axis2.jaxws.core.controller.impl.InvocationControllerImpl.invoke(InvocationControllerImpl.java:93)
> [4/3/16 18:53:10:344 EET] 00000027 SystemErr R at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invokeSEIMethod(JAXWSProxyHandler.java:391)
> [4/3/16 18:53:10:344 EET] 00000027 SystemErr R at org.apache.axis2.jaxws.client.proxy.JAXWSProxyHandler.invoke(JAXWSProxyHandler.java:208)
> [4/3/16 18:53:10:344 EET] 00000027 SystemErr R at com.sun.proxy.$Proxy37.authenticateSP(Unknown Source)
> [4/3/16 18:53:10:344 EET] 00000027 SystemErr R at com.id3global.id3gws._2013._04.IGlobalAuthenticate_BasicHttpBindingGlobalAuthenticate_Client.main(IGlobalAuthenticate_BasicHttpBindingGlobalAuthenticate_Client.java:90)
> [4/3/16 18:53:10:345 EET] 00000027 SystemErr R at com.eeft.ws.ppd.EwalletBalanceInquiryWSBeanPortBindingImpl.ewalletBalanceInquiry(EwalletBalanceInquiryWSBeanPortBindingImpl.java:104)
> [4/3/16 18:53:10:345 EET] 00000027 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> [4/3/16 18:53:10:345 EET] 00000027 SystemErr R at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
> [4/3/16 18:53:10:345 EET] 00000027 SystemErr R at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
> [4/3/16 18:53:10:345 EET] 00000027 SystemErr R at java.lang.reflect.Method.invoke(Method.java:611)
> [4/3/16 18:53:10:345 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeMethod(JavaDispatcher.java:203)
> [4/3/16 18:53:10:346 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.dispatchers.java.JavaDispatcher.invokeOperation(JavaDispatcher.java:158)
> [4/3/16 18:53:10:346 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processRequestResponse(SoapRPCProcessor.java:490)
> [4/3/16 18:53:10:346 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.dispatchers.SoapRPCProcessor.processMessage(SoapRPCProcessor.java:433)
> [4/3/16 18:53:10:346 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.dispatchers.BasicDispatcher.processMessage(BasicDispatcher.java:134)
> [4/3/16 18:53:10:346 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.dispatchers.java.SessionDispatcher.invoke(SessionDispatcher.java:204)
> [4/3/16 18:53:10:346 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:263)
> [4/3/16 18:53:10:346 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.handlers.jaxrpc.JAXRPCHandler.invoke(JAXRPCHandler.java:153)
> [4/3/16 18:53:10:346 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.handlers.WrappedHandler.invoke(WrappedHandler.java:64)
> [4/3/16 18:53:10:347 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:263)
> [4/3/16 18:53:10:347 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.PivotHandlerWrapper.invoke(PivotHandlerWrapper.java:263)
> [4/3/16 18:53:10:347 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.WebServicesEngine.invoke(WebServicesEngine.java:336)
> [4/3/16 18:53:10:347 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.transport.http.WebServicesServlet.doPost(WebServicesServlet.java:1246)
> [4/3/16 18:53:10:347 EET] 00000027 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
> [4/3/16 18:53:10:347 EET] 00000027 SystemErr R at com.ibm.ws.webservices.engine.transport.http.WebServicesServletBase.service(WebServicesServletBase.java:344)
> [4/3/16 18:53:10:347 EET] 00000027 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
> [4/3/16 18:53:10:347 EET] 00000027 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1700)
> [4/3/16 18:53:10:348 EET] 00000027 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:970)
> [4/3/16 18:53:10:348 EET] 00000027 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:508)
> [4/3/16 18:53:10:348 EET] 00000027 SystemErr R at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
> [4/3/16 18:53:10:348 EET] 00000027 SystemErr R at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3994)
> [4/3/16 18:53:10:348 EET] 00000027 SystemErr R at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
> [4/3/16 18:53:10:348 EET] 00000027 SystemErr R at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:945)
> [4/3/16 18:53:10:348 EET] 00000027 SystemErr R at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
> [4/3/16 18:53:10:348 EET] 00000027 SystemErr R at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:191)
> [4/3/16 18:53:10:349 EET] 00000027 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
> [4/3/16 18:53:10:349 EET] 00000027 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:516)
> [4/3/16 18:53:10:349 EET] 00000027 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:307)
> [4/3/16 18:53:10:349 EET] 00000027 SystemErr R at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:278)
> [4/3/16 18:53:10:349 EET] 00000027 SystemErr R at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
> [4/3/16 18:53:10:349 EET] 00000027 SystemErr R at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
> [4/3/16 18:53:10:349 EET] 00000027 SystemErr R at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:175)
> [4/3/16 18:53:10:349 EET] 00000027 SystemErr R at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
> [4/3/16 18:53:10:349 EET] 00000027 SystemErr R at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
> [4/3/16 18:53:10:350 EET] 00000027 SystemErr R at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
> [4/3/16 18:53:10:350 EET] 00000027 SystemErr R at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
> [4/3/16 18:53:10:350 EET] 00000027 SystemErr R at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
> [4/3/16 18:53:10:350 EET] 00000027 SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
> [4/3/16 18:53:10:350 EET] 00000027 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1662)
> [4/3/16 18:53:10:350 EET] 00000027 SystemErr R Caused by: org.apache.axis2.AxisFault: Must Understand check failed for header
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
> : Security
> [4/3/16 18:53:10:350 EET] 00000027 SystemErr R at org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:127)
> [4/3/16 18:53:10:351 EET] 00000027 SystemErr R at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:191)
> [4/3/16 18:53:10:351 EET] 00000027 SystemErr R at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:363)
> [4/3/16 18:53:10:351 EET] 00000027 SystemErr R at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:416)
> [4/3/16 18:53:10:351 EET] 00000027 SystemErr R at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
> [4/3/16 18:53:10:351 EET] 00000027 SystemErr R at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
> [4/3/16 18:53:10:351 EET] 00000027 SystemErr R at org.apache.axis2.jaxws.core.controller.impl.AxisInvocationController.execute(AxisInvocationController.java:581)
> [4/3/16 18:53:10:351 EET] 00000027 SystemErr R ... 50 more
我删除了 Mustunderstand 标签并将值更改为零,但仍然出现相同的错误。
最佳答案
我错过了重写处理程序中的 getHeaders()
方法。下面的帖子帮助我添加了它开始工作的处理程序。
@Override
public Set<QName> getHeaders() {
QName securityHeader = new QName("http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd",
"Security");
HashSet<QName> headers = new HashSet<QName>();
headers.add(securityHeader);
return headers;
}
关于java - 必须了解 header http ://docs. oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd 检查失败:安全性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35843867/
我一直在尝试各种 Java Web 服务堆栈(CXF、Metro 和 Spring-WS),并得出的结论是,它们中没有一个比 Spring 的 SimpleJaxWsServiceExporter 的
我正在尝试用 java 创建一个 Soap 客户端,我必须使用我的私钥对 Soap 消息进行签名。 我正在使用配置了 WS-Security 的 SoapUI 获取响应。 我已经使用 wsimport
我正在尝试为一个 SOAP 服务组装一个小型 CXF 客户端,该服务在其 wsdl 中具有 SignedSupportingTokens ws-security 策略。我已配置CXF客户端如下
我正在尝试使用基于 Java 的 Web 服务,但每次我尝试连接时都会收到这样的错误: org.apache.ws.security.WSSecurityException: The security
问题的第 1 部分: 使用 npm Soap,我尝试对以下端点 var url 进行 SOAP 调用。 var sslRootCAs = require('ssl-root-cas/latest')
我正在尝试请求这项内部服务,负责该服务的团队表示它需要用户名 + 密码并使用证书加密。 我想到使用这个模块node-soap并且我在文档中找到了这个: 1- https://github.com/vp
我尝试从使用 PasswordText WSS 类型的 Web 服务获取信息。首先,我使用 soapUI 对其进行了测试并成功获取了数据。然后我在Java上实现了认证,写了SecurityHandle
最近几天一直在为这个错误而苦苦挣扎 Authentication of type {http://service.soap.xcompany.com}AuthenticationHeader had
我正在使用 jax-ws 从 JAVA 调用使用 WS-Security 的 SOAP 服务。问题是响应包含一些 MustUnderstand header ,并且我收到 Element notund
我正在使用 .net 中开发的 Web 服务,该服务接受用户名和密码作为 SOAP header 的一部分。我创建了 SOAPHandler 来创建 header 。 我打印了如下消息: x
Web 服务托管在没有 Internet 连接的服务器上 我正在使用 SOAPUI 访问 Web 服务 url 并进行测试 但得到以下错误信息任何帮助真的很感激
我浏览了以下链接:SOAPFaultException "MustUnderstand headers (oasis-200401-wss-wssecurity-secext-1.0.xsd) are
我是一名优秀的程序员,十分优秀!