- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我们正在使用 spring-ws 2.2.0 开发一个合约优先的 WebService。我们正在尝试使用名为 AuthToken
的自定义标签来管理身份验证。 ,位于 SoapHeader 中。AuthToken
具有以下结构:
<authToken>
<username>USERNAME</xa:username>
<password>PASSWORD</xa:password>
</authToken>
@RequestPayload
绑定(bind)方法签名中的注释(
handleMethodRequest
,如下例中指定),我们能够访问未编码的有效负载内容(位于 SoapBody 中)。
1
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "methodRequest")
@ResponsePayload
public MethodResponse handleMethodRequest(@RequestPayload MethodRequest request, @SoapHeader(value = "authToken") AuthToken authToken) { }
2
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "methodRequest")
@ResponsePayload
public MethodResponse handleMethodRequest(@RequestPayload MethodRequest request, AuthToken authToken) { }
3
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "methodRequest")
@ResponsePayload
public MethodResponse handleMethodRequest(@RequestPayload MethodRequest request, org.springframework.ws.soap.SoapHeader header) { }
4
@PayloadRoot(namespace = NAMESPACE_URI, localPart = "methodRequest")
@ResponsePayload
public MethodResponse handleMethodRequest(@RequestPayload MethodRequest request, MessageContext messageContext) { }
No adapter for endpoint [MethodResponse EndpointImplementation.handleMethodRequest(MethodRequest, AuthToken) throws java.lang.Exception]: Is your endpoint annotated with @Endpoint, or does it implement a supported interface like MessageHandler or PayloadEndpoint?
AuthToken
检索用户名和密码子元素。
AuthToken
拦截器内部。不幸的是,我们需要将handleMethodRequest 方法中的AuthToken 字段用于其他目的,例如加载用户特定的数据,在
handleMethodRequest
之外无法访问。 .
handleMethodRequest
中引用用户特定的数据。方法。
最佳答案
对于该用例,唯一支持的注释和参数类型组合是 @SoapHeader
和 SoapHeaderElement
. Spring-WS 目前不支持 unmarshalling headers .
关于端点方法中的 Spring-ws SoapHeader 字段访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26997194/
我在 JBOSS EAP 6.2 上安装了一个 WebService。当我想获取 SOAP header 时出现问题。 引发异常的代码: ArrayList hl = (ArrayList) wsc
我是网络服务新手。经过大量谷歌搜索并尝试了有关从端点访问 SoapHeader 的所有内容后,我仍然无法让它工作。我收到以下错误: java.lang.IllegalStateException: N
我对 PHP 的 SOAP 库还很陌生,在为我访问的服务创建有效的 SoapHeader 时遇到了问题。这是服务 wsdl: http://s7sps1api.scene7.com/scene7/we
我正在尝试使用soap header 发送SOAP请求,如下所示: yyyyxxx 为了做到这一点,我使用 SoapActionCallback 添加标题元素 SoapActionCallbac
PHP SoapClient header 。我在获取子节点中的 namespace 时遇到问题。这是我正在使用的代码: $security = new stdClass; $security->Us
我们正在使用 spring-ws 2.2.0 开发一个合约优先的 WebService。我们正在尝试使用名为 AuthToken 的自定义标签来管理身份验证。 ,位于 SoapHeader 中。Aut
我已经创建了一个 WS-BPEL 工作流,它会调用异步 Web 服务并等待回调响应。 Carbon 应用程序也已成功部署到 BPS。 关于我的外部异步网络服务的详细信息 1.需要通过http进行基本认
我正在使用 SOAP 从第 3 方获取和更新数据,但在通过 __setSoapHeaders 设置连接时我在设置命名空间时遇到了问题。 这是我的代码(示例): $ns = "http://wms.we
如何使用 php 的 Soap 库将属性添加到 Soap header 中的节点上? 尝试了所有可用的示例(包括 StackOverflow 和 php.net(示例、评论等)。 $a = ['_'=
我正在尝试在调用 Web 服务之前在 C# 中添加一个自定义的soap 头信息。我正在使用 SOAP Header 类来完成这项工作。我可以部分地但不能完全按照我需要的方式做到这一点。这是我需要肥皂头
如何将对象添加到 org.springframework.ws.WebServiceMessage 的 soap header 中 这是我希望最终得到的结构: usernam
我们有一个现有的 ASMX Web 服务 (.NET 2.0),我现在正在使用 WCF 和 .NET 4.0 创建一个新服务。 ASMX 服务通过 SoapHeader 实现了自定义身份验证,看起来像
请帮忙:我正在尝试从 SOAPUI 调用 WebService,我注意到该服务需要我通过请求参数提供的用户名和密码。我注意到原始 XML 包含添加到 SOAPHeader 的用户/密码片段。片段如下:
我通过他们提供的 Java 客户端使用 Google Adwords API v201502。 我在对 google 进行 mutate 调用时遇到了这个错误。 我知道 AdwordsSession
我是一名优秀的程序员,十分优秀!