- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
sun-jaxws.xml
<?xml version="1.0" encoding="UTF-8"?>
<endpoints version="2.0" xmlns="http://java.sun.com/xml/ns/jax-ws/ri/runtime">
<endpoint implementation="ways.org.commerce.inventory.service.InventoryServiceImpl" name="InventoryServiceImpl" url-pattern="/services/InventoryServiceImpl"/>
</endpoints>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath:applicationContext-Main.xml</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener>
<servlet>
<servlet-name>InventoryServiceImpl</servlet-name>
<servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>InventoryServiceImpl</servlet-name>
<url-pattern>/services/InventoryServiceImpl</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
</web-app>
InventoryServiceImpl.java
@WebService(serviceName = "InventoryServiceImpl")
public class InventoryServiceImpl implements IFInventoryService {
private IFInventoryDAO inventoryDAO;
@WebMethod(exclude = true)
public IFInventoryDAO getInventoryDAO() {
return inventoryDAO;
}
@WebMethod(exclude = true)
public void setInventoryDAO(IFInventoryDAO inventoryDAO) {
this.inventoryDAO = inventoryDAO;
}
@WebMethod(operationName = "addProduct")
public void addProduct(
@WebParam(name = "product") ProductBean product) throws CommerceBaseException {
if (inventoryDAO.productExists(product.getProductUniqueCode())) {
throw new CommerceBaseException("Product Not Found", InventoryErrorCode.PRODUCT_NOT_FOUND_ERROR);
}
inventoryDAO.addProduct(product);
}
@WebMethod(operationName = "getProduct")
public ProductBean getProduct(
@WebParam(name = "productUniqueCode") String productUniqueCode) throws CommerceBaseException {
if (inventoryDAO.productExists(productUniqueCode)) {
throw new CommerceBaseException("Product Not Found", InventoryErrorCode.PRODUCT_NOT_FOUND_ERROR);
}
return inventoryDAO.getProduct(productUniqueCode);
}
@WebMethod(operationName = "productExists")
public boolean productExists(
@WebParam(name = "productUniqueCode") String productUniqueCode) {
return inventoryDAO.productExists(productUniqueCode);
}
}
我遇到以下异常
SEVERE: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener
com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: java.lang.IllegalArgumentException: Prefix '' is already bound to ''
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:139)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4681)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5184)
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5179)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: Prefix '' is already bound to ''
at com.sun.xml.txw2.StartTag.addNamespaceDecl(StartTag.java:171)
at com.sun.xml.txw2.ContainerElement._namespace(ContainerElement.java:313)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.xml.txw2.ContainerElement.invoke(ContainerElement.java:114)
at $Proxy179._namespace(Unknown Source)
at com.sun.xml.ws.wsdl.writer.WSDLGenerator.generateDocument(WSDLGenerator.java:339)
at com.sun.xml.ws.wsdl.writer.WSDLGenerator.doGeneration(WSDLGenerator.java:272)
at com.sun.xml.ws.server.EndpointFactory.generateWSDL(EndpointFactory.java:443)
at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:209)
at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:505)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:253)
at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:147)
at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:124)
... 8 more
20 Oct, 2012 11:17:18 PM org.apache.catalina.core.ApplicationContext log
INFO: Closing Spring root WebApplicationContext
请帮我找出我哪里做错了...
最佳答案
您的 web 服务库和 tomcat 的库之间存在冲突。
使用以下依赖项:
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.2.8</version>
<scope>provided</scope>
</dependency>
关于spring - java.lang.IllegalArgumentException : Prefix '' is already bound to '' 异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12991093/
我想知道这在 SQL 中是否可行。假设您有两个表 A 和 B,并且您对表 A 进行选择并在表 B 上进行联接: SELECT a.*, b.* FROM TABLE_A a JOIN TABLE_B
我认为这只是一个一般的 C++ 问题: 我正在尝试使用 gnu c++ 编译器在 Linux Fedora 上编译本地版本的 ffmpeg。我的源代码位于以下一堆文件夹中: ~//Downloads/
我听说在 Linux 上编译 PHP 时设置 --prefix=PREFIX 选项将允许您一次安装多个 PHP 而不会发生冲突。 (我认为如果未设置默认值是 /usr/local)。但是,我不确定它到
我有以下 conda 环境文件 environment.yml: name: testproject channels: - defaults dependencies: - python=3.7 p
目前在我的 Makefile 中我有: prefix ?= /usr/local 这样我就可以在调用 make 时覆盖 prefix 值,如下所示: make prefix="/new_path" 我
我正在尝试创建一个计算 pptx 中单词的函数文档。问题是我不知道如何只找到这种标签: Some Text 当我尝试:print xmlTree.findall('.//a:t') , 它返回 Syn
gitconfig(1) : If not set explicitly with --file, there are four files where git config will search
嗨,我是 Spring MVC 的新手,我正在关注 Spring 引用文档,我对 View 解析器有疑问。这是我的示例代码。 @Controller @RequestMapping("/form")
我一般都是通过pip安装python包的。 对于 Google App Engine,我需要将包安装到另一个目标目录。 我试过了: pip install -I flask-restful --tar
我对一些使用指令 ngb-pagination 的组件进行了 Angular 测试。来自 ng-bootstrap . 现在,在我的测试中,我模拟这个组件如下: // on next line I g
我无法运行npm install npm@latest -g,而不会遇到权限错误并被迫使用sudo npm install npm@latest -g。我可以在不使用 sudo 的情况下运行它,但是
假设我有一个字符串公式,它的格式是:“func(a+b,c)”,其中func是一个定制函数,这个字符串同时包含中缀(即+)和前缀(即func)表示,我想将其转换为具有所有前缀表示的字符串,“func(
我已经写下了一个简单的函数来确定 str1 是否是 str2 的前缀。这是一个非常简单的函数,看起来像这样(在 JS 中): function isPrefix(str1, str2) // dete
我们有 git remote add origin http://...避免重复输入实际的源代码库路径。但是如何git subtree --prefix=... ?每次拉/推子树内容时,很难跟踪、记住
我的 travis 工作遇到了以下问题: Process Output:Could not find platform independent libraries Process Output:Co
我正在阅读 Artifice 的来源并看到: module Artifice NET_HTTP = ::Net::HTTP # ... end 行:https://github.com/wyc
我正在阅读有关 Angular 路由的文档并创建了一个简单的测试: const routes: Route[] = [ { path: '', redirectTo: '/home', pat
所以使用 Material 我们有一些代码来问一个问题,我们想在输入的前面添加一个 $ 符号或使用占位符。在这个垫子字段内部,我们还有一个垫子标签。如果我使用 matprefix,它会将美元符号放在标
目前我希望为 Apache Mesos 编写一个脚本来启动主/从(在 2 个不同的节点上)。 我有引用http://mesos.apache.org/documentation/latest/depl
我已为文档建立索引,每个文档都有一个字段:“CodeName”,其值类似于以下内容: document 1 has CodeName: "AAA01" document 2 has CodeName:
我是一名优秀的程序员,十分优秀!