- Java 双重比较
- java - 比较器与 Apache BeanComparator
- Objective-C 完成 block 导致额外的方法调用?
- database - RESTful URI 是否应该公开数据库主键?
我正在使用 Jax-ws 为 Onvif IP 摄像头实现客户端应用程序,我正在向摄像头发送创建 PullPointSubscription 的请求,摄像头似乎理解请求并处理请求并发送正确的响应,但是客户端 jax -ws代码抛出异常
MustUnderstand headers:[{http://www.w3.org/2005/08/addressing}Action] are not understood
我不明白到底是什么问题?任何人都可以解释问题是什么以及如何解决?
异常详情
an 29, 2012 11:43:48 AM com.sun.xml.ws.protocol.soap.MUTube getMisUnderstoodHeaders
INFO: Element not understood={http://www.w3.org/2005/08/addressing}Action
javax.xml.ws.soap.SOAPFaultException: MustUnderstand headers:[{http://www.w3.org/2005/08/addressing}Action] are not understood
at com.sun.xml.ws.protocol.soap.MUTube.createMUSOAPFaultException(MUTube.java:148)
at com.sun.xml.ws.protocol.soap.ClientMUTube.processResponse(ClientMUTube.java:109)
at com.sun.xml.ws.api.pipe.Fiber.__doRun(Fiber.java:651)
at com.sun.xml.ws.api.pipe.Fiber._doRun(Fiber.java:600)
at com.sun.xml.ws.api.pipe.Fiber.doRun(Fiber.java:585)
at com.sun.xml.ws.api.pipe.Fiber.runSync(Fiber.java:482)
at com.sun.xml.ws.client.Stub.process(Stub.java:323)
at com.sun.xml.ws.client.sei.SEIStub.doProcess(SEIStub.java:161)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:113)
at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:93)
at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:144)
at $Proxy46.createPullPointSubscription(Unknown Source)
at Test.SubInEventLast(Test.java:173)
at Test.main(Test.java:139)
请求soap消息是
<?xml version='1.0' encoding='UTF-8'?>
<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
<S:Body>
<ns6:CreatePullPointSubscription xmlns:ns2="http://www.w3.org/2005/08/addressing"
xmlns:ns3="http://docs.oasis-open.org/wsn/b-2"
xmlns:ns4="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:ns5="http://docs.oasis-open.org/wsn/t-1"
xmlns:ns6="http://www.onvif.org/ver10/events/wsdl"
xmlns:ns7="http://www.onvif.org/ver10/schema"
xmlns:xmime="http://www.w3.org/2005/05/xmlmime"
xmlns:ns9="http://www.w3.org/2004/08/xop/include"
xmlns:ns10="http://docs.oasis-open.org/wsrf/r-2">
<ns6:Filter>
<ns3:TopicExpression xmlns="http://docs.oasis-open.org/wsn/b-2"
xmlns:tns1="http://www.onvif.org/ver10/topics"
Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">
tns1:Device
</ns3:TopicExpression>
</ns6:Filter>
<ns3:InitialTerminationTime>PT1M</ns3:InitialTerminationTime>
</ns6:CreatePullPointSubscription>
</S:Body>
</S:Envelope>
这是 SOAP react
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope"
xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
xmlns:wsa5="http://www.w3.org/2005/08/addressing"
xmlns:xmime5="http://www.w3.org/2005/05/xmlmime"
xmlns:wsrf-bf="http://docs.oasis-open.org/wsrf/bf-2"
xmlns:wstop="http://docs.oasis-open.org/wsn/t-1"
xmlns:tt="http://www.onvif.org/ver10/schema"
xmlns:wsrf-r="http://docs.oasis-open.org/wsrf/r-2"
xmlns:tan1="http://www.onvif.org/ver10/analytics/wsdl/RuleEngineBinding"
xmlns:tan="http://www.onvif.org/ver10/analytics/wsdl"
xmlns:tan2="http://www.onvif.org/ver10/analytics/wsdl/AnalyticsEngineBinding"
xmlns:tds="http://www.onvif.org/ver10/device/wsdl"
xmlns:tev1="http://www.onvif.org/ver10/events/wsdl/NotificationProducerBinding"
xmlns:tev2="http://www.onvif.org/ver10/events/wsdl/EventBinding"
xmlns:tev3="http://www.onvif.org/ver10/events/wsdl/SubscriptionManagerBinding"
xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2"
xmlns:tev4="http://www.onvif.org/ver10/events/wsdl/PullPointSubscriptionBinding"
xmlns:tev="http://www.onvif.org/ver10/events/wsdl"
xmlns:timg="http://www.onvif.org/ver10/imaging/wsdl"
xmlns:tptz="http://www.onvif.org/ver10/ptz/wsdl"
xmlns:trt="http://www.onvif.org/ver10/media/wsdl"
xmlns:ter="http://www.onvif.org/ver10/error"
xmlns:tns1="http://www.onvif.org/ver10/topics"
xmlns:tnsaxis="http://www.axis.com/2009/event/topics">
<SOAP-ENV:Header>
<wsa5:Action SOAP-ENV:mustUnderstand="true">http://docs.oasis-open.org/wsn/bw-2/SubscriptionManager/CreatePullPointSubscriptionResponse</wsa5:Action>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<tev:CreatePullPointSubscriptionResponse>
<tev:SubscriptionReference>
<wsa5:Address>http://192.168.0.151/onvif/services</wsa5:Address>
<wsa5:ReferenceParameters><dom0:SubscriptionId xmlns:dom0="http://www.axis.com/2009/event">3</dom0:SubscriptionId>
</wsa5:ReferenceParameters>
</tev:SubscriptionReference>
<wsnt:CurrentTime>2010-10-27T09:11:42Z</wsnt:CurrentTime>
<wsnt:TerminationTime>2010-11-24T09:11:42Z</wsnt:TerminationTime></tev:CreatePullPointSubscriptionResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
最佳答案
我在某个特定设备上遇到了同样的问题,我花了几天时间进行搜索和反复试验才找到解决方案(几乎纯属偶然)。我能够通过向端口添加自定义处理程序来解决此问题。处理程序只需要为 WS-Addressing Action header 提供 QName(在调用 handleMessage 时不需要执行任何操作)。
这对我有用:
public class ActionHandler implements SOAPHandler<SOAPMessageContext>
{
@Override
public boolean handleMessage(SOAPMessageContext context)
{
// Auto-generated method stub
return true;
}
@Override
public boolean handleFault(SOAPMessageContext context)
{
// Auto-generated method stub
return false;
}
@Override
public void close(MessageContext context)
{
// Auto-generated method stub
}
@Override
public Set<QName> getHeaders()
{
Set<QName> set = new HashSet<QName>();
// Make sure the '[{http://www.w3.org/2005/08/addressing}]Action' header
// is handled in case the device set the 'MustUnderstand' attribute to '1'
set.add(new QName("http://www.w3.org/2005/08/addressing", "Action"));
return set;
}
}
然后将处理程序添加到绑定(bind)的处理程序链中:
BindingProvider bindingProvider = (BindingProvider) eventPortType;
final Binding binding = bindingProvider.getBinding();
List<Handler> handlerList = binding.getHandlerChain();
if (handlerList == null)
handlerList = new ArrayList<Handler>();
handlerList.add(new ActionHandler());
binding.setHandlerChain(handlerList);
关于java - Jax-ws : Java SOAP exception :MustUnderstand headers:[{http://www. w3.org/2005/08/addressing} Action ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9055289/
我在让“@header”或任何其他@规则在ANTLR中工作时遇到麻烦。具有非常基本的语法,如下所示: grammar test; options { language = CSharp2;
我对来源和寄宿有疑问 我有一个ajax页面“Page A”,它将称为ajax提要“Page B” 我看到来自ajax调用的“页面B”的请求 header 具有源“http://mydomain.com
我在 pandas 中使用了数据透视表并获得了所需的数据框格式,但现在我有两行标题。数据透视表后的结果数据框如下: scenario Actual Plan
我在 pandas 中使用了数据透视表并获得了所需的数据框格式,但现在我有两行标题。数据透视表后的结果数据框如下: scenario Actual Plan
我想在主机将它们发送到网络之前修改数据包头(IP 头、TCP 头)。 例如,如果我使用 firefox 进行浏览,那么我想拦截所有来自 firefox 的数据包并修改 IP/TCP header ,然
我的 header 内容被包装到#header 中,但是当我设置边框显示结构时,它显示我的#header 的内容出现在#header 本身之后。可能是什么问题?这是我的代码: #header { bo
我是一名 Web 开发人员,使用过 PHP 和 .NET。有一年多的 Web 工作经验,我一直无法彻底了解浏览器缓存功能,希望这里的 Web Gurus 可以帮助我。我心中的问题是: 浏览器实际上是如
伙计们,我有一个问题,我不知道如何在一个 header 中连接多个 header ,我们称它为“主 header ”并使用该 header 中的函数,例如 // A.h #include class
我有一个包含 SOAP 消息的 XMLHTTPRequest。 我想添加用于标识消息并将由 C# Web 服务使用的 guid。 GUID 的目标是识别特定用户,并应护送所有用户请求以在服务器上进行身
我一直在阅读粘性标题,这是我目前所发现的。第一个粘性 header 效果很好,但是当它遇到第一个 header 时,我如何向上滚动第一个 header 并使第二个 header 卡住? http://
我想将当前基于 TableView 的数据网格转换为新的 UICollectionView 类。 这就是我当前的网格的样子: 我的网格有两个标题: 年份(2006a、2007a 等)和 类型(“收入”
我目前正在使用 Apollo 服务器。我正在尝试在响应 header 中设置一个属性。并且此属性是从客户端 graphQL 请求 header 中检索的。 我在网上查了一下。并看到了诸如使用插件或扩展
我的 Controller 的方法需要设置一个标题,例如X-Authorization .创建新对象( store Action )后,我执行转发以显示新创建的对象( show Action ): $
我正在研究一些关于 VLAN 的事情,发现了 VLAN 标签 和 header 。 如果我们有标准 802.3 以太网帧 的 MTU(1518 字节), header 802.3 中包含什么? 另外,
我是放心和 Java 的新手,我正在尝试做一个非常基本的测试来检查 API 的响应是否为 200 ok。 谁能告诉我我需要在下面的脚本中更改什么才能传递多个 header Id、Key 和 ConId
在我的项目中,我需要知道 zlib header 是什么样的。我听说它相当简单,但我找不到 zlib header 的任何描述。 例如,它是否包含魔数(Magic Number)? 最佳答案 zlib
我正在使用 JMeter 测试 HTTP 服务器,该服务器接受并验证 APIKey 并在成功时返回一个有时限的 token 。如果我有 token ,我想发送一个 token ;如果没有,我想发送一个
以太网 header 是什么样的? 是吗: 1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|
我们的应用程序支持 CORS 配置 header 。我在两个不同的主机上分别配置了 testApp。两种设置都相互独立工作。host1 上的应用程序配置有 CORS header Access-Con
tlhelp32.h 不包含 windows.h 本身是有原因的吗?我一直在与大量的编译器错误作斗争,因为我在包含 tlhelp32.h 之后包含了 windows.h。这是设计决定还是出于什么原因?
我是一名优秀的程序员,十分优秀!