cxf 报错:prefix wsdp is not bound to a namespace
来源:互联网 发布:python编辑器 编辑:程序博客网 时间:2024/05/16 09:34
笔者最近在使用cxf框架过程中,当服务端发布service时,出现了一个BUG
打印栈轨如下:
//wsdp前缀不能绑定到名称空间javax.xml.bind.UnmarshalException: prefix wsdp is not bound to a namespace - with linked exception: [java.lang.IllegalArgumentException: prefix wsdp is not bound to a namespace] at com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:740)//引发异常的源头在:Caused by: java.lang.IllegalArgumentException: prefix wsdp is not> bound to a namespace at com.sun.xml.bind.DatatypeConverterImpl._parseQName(DatatypeConverterImpl.java:369) at com.sun.xml.bind.v2.model.impl.RuntimeBuiltinLeafInfoImpl$23.parse(RuntimeBuiltinLeafInfoImpl.java:817) ... 39 more
网上提供了的解决办法最有用的就是:删除多余的包
- cxf-services-ws-discovery-api-3.1.4.jar
- services-ws-discovery-service-3.1.4.jar
- services-wsn-api-3.1.4.jar
- services-wsn-core-3.1.4.jar
5.manifest.jar
从lib中的which_jar文件中(其实就是个文本)有这样的话:
This directory includes the CXF jar, the CXF manifest jar, the
required dependencies, and many optional dependencies. The “modules”
directory contains the cxf.jar split up into smaller pieces if you
—-这是说:这个cxf包可以按需取用部分
………………………..
然后:
For the WS-Discovery Service
- cxf-ws-discovery-api.jar
- cxf-ws-discovery-service.jar
这说明上面提到要删除的包其实是为了启用WS-Discovery服务的.
传统的服务调用模式:客户端在设计时就知道目标服务的地址,并根据这个地址创建客户端结点对服务进行调用;
而启用本项服务,可以在不知道目标服务地址的情况下,动态探测可用的服务并调用,就像动态获取WiFi服务一般.因此看起来myEclipse工具的控制台每隔几分钟就会刷一次,然后继续报一堆错!
而which_jar 也写到了
For the WS-Notification Service:
- cxf-services-wsn-api.jar
- cxf-services-wsn-core.jar
- activemq*.jar
- hawtbuf.jar
- geronimo-j2ee-management_1.1_spec.jar
就是说,要是启用WS-Notification服务,就必须加这些包.
WS-Notification(WSN)是一系列规范,它制定了在 Web 服务环境中创建事件驱动系统的标准流程,对希望接收有关特定主题的需求方发送特定的需求信号.
再看:
The ‘manifest jar’ is a jar containing only a MANIFEST.MF with a classpath that calls in all the other jar.
即:manifest jar’只有MANIFEST.MF,能够调用所有其他jar包.有人反映删除了前面的四个包还是会报异常,那是因为这里写死的路径还在,程序仍然会试图调用这些服务
MANIFEST.MF的东西长这样的:
此处省略废话……………………..
Class-Path: cxf-3.0.12.jar endorsed/jaxb-api-2.2.11.jar endorsed/geron
imo-jaxws_2.2_spec-1.2.jar jaxb-impl-2.2.11.jar jaxb-core-2.2.11.jar
jaxb-impl-2.1.14.jar jaxb-core-2.1.14.jar jaxb-xjc-2.2.11.jar jaxb-xj
c-2.1.14.jar cxf-tools-common-3.0.12.jar velocity-1.7.jar commons-collections-3.2.2.jar
………………..此处省略N字
综上所述:要解决这个问题,删了这些用不到的包.否则程序默认是要开启的.这些类路径都是在ManiFest.里,如果还解决不了,把这个也删了.
- cxf 报错:prefix wsdp is not bound to a namespace
- CXF - prefix wsdp is not bound to a namespace - with linked exception - 报错处理
- prefix wsdp is not bound to a namespace
- Caused by: java.lang.IllegalArgumentException: prefix wsdp is not bound to a namespace
- Java.lang.IllegalArgumentException: prefix wsdp is not bound to a namespace。
- Spring配置文件标签报错:The prefix "XXX" for element "XXX:XXX" is not bound.
- Spring配置文件标签报错:The prefix "XXX" for element "XXX:XXX" is not bound. .
- 报错:The prefix "context" for element "context:annotation-config" is not bound.
- The prefix "mvc" for element "mvc:annotation-driven" is not bound 报错的解决方法
- CXF服务端The prefix "jaxws" for element "jaxws:endpoint" is not bound.
- Error parsing XML: prefix must not be bound to one of the reserved namespace names
- The prefix "tx" for element "tx:annotation-driven" is not bound. ssm配置事物切面报错
- 57 WebGL纹理贴图报错texture bound to texture unit 0 is not renderable.
- The function default must be used with a prefix when a default namespace is not specified
- The function getXX must be used with a prefix when a default namespace is not specified
- The function size must be used with a prefix when a default namespace is not specified
- The function equals must be used with a prefix when a default namespace is not specified
- The function size must be used with a prefix when a default namespace is not specified
- CentOS中安装Cassandra
- c#的数据类型如何转化为json
- tomcat项目支持跨域访问
- 汉诺塔 递归
- 斐波那契数列非递归算法
- cxf 报错:prefix wsdp is not bound to a namespace
- gulp+browser-sync使用方法
- 写一个程序判断字符串中数字的位置
- Window系统安装numpy
- protobuf3 从object-c角度学习数据编码
- 全国名校考研真题大汇总,以此来祭奠我失败的考研经历!
- SpringMVC 两个常用的处理器适配器
- 计算机CPU、内存、指令、硬盘关系
- 重名剔除(Deduplicate)