关于例外的任何想法?我无法绑定JAX-WS服务,因为抛出异常:
Exception in thread "main" com.sun.xml.internal.ws.spi.db.DatabindingException: java.lang.IllegalArgumentException: can't parse argument number: ''{0}''
at com.sun.xml.internal.ws.db.glassfish.JAXBRIContextFactory.newContext(JAXBRIContextFactory.java:90)
at com.sun.xml.internal.ws.spi.db.BindingContextFactory.create(BindingContextFactory.java:167)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:203)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl$1.run(AbstractSEIModelImpl.java:176)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.createJAXBContext(AbstractSEIModelImpl.java:176)
at com.sun.xml.internal.ws.model.AbstractSEIModelImpl.postProcess(AbstractSEIModelImpl.java:95)
at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:309)
at com.sun.xml.internal.ws.db.DatabindingImpl.<init>(DatabindingImpl.java:85)
at com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:59)
at com.sun.xml.internal.ws.db.DatabindingProviderImpl.create(DatabindingProviderImpl.java:43)
at com.sun.xml.internal.ws.db.DatabindingFactoryImpl.createRuntime(DatabindingFactoryImpl.java:105)
at com.sun.xml.internal.ws.client.WSServiceDelegate.buildRuntimeModel(WSServiceDelegate.java:875)
at com.sun.xml.internal.ws.client.WSServiceDelegate.createSEIPortInfo(WSServiceDelegate.java:892)
at com.sun.xml.internal.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:855)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:435)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:404)
at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:386)
at javax.xml.ws.Service.getPort(Service.java:119)
该项目在Ecplipse,JDK 1.8中运行。 由:
生成的所有工件/**
* This class was generated by Apache CXF 3.2.0
* 2018-03-28T18:06:56.868+02:00
* Generated source version: 3.2.0
*
*/
@WebService(targetNamespace = "...........", name = "IDocuments")
生成wsdl中的类没有错误。 请注意,使用SoapUi,我能够绑定并使用此服务以及以相同方式生成的其他几个@WebService正常工作。
答案 0 :(得分:0)
...解决 问题是多个wsdl生成的冲突。
最后生成的wsdl部署其工厂类。 通过这种方式,请求和响应由错误的上下文创建,并且服务抛出IllegalArgumentException。
通过为每个生成的wsdl定制包来解决问题