我正在使用JAXWS @webserviceprovider表示法开发Web服务。当我尝试将此服务部署到JBoss eap 6.1时,我收到一个错误,客户端支持SOap1.2消息。 所以我把绑定类型包含在服务中。但是当我将这项服务部署到JBoss eap 6.1时 我收到这个错误 无法解析http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/
的绑定日志:
[org.jboss.msc.service.fail] (MSC service thread 1-6) MSC000001: Failed to start service jboss.deployment.subunit."cifapp.ear"."Test.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.subunit."cifapp.ear"."Test.war".INSTALL: JBAS018733: Failed to process phase INSTALL of subdeployment "Test.war" of deployment "cifapp.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:127) [jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.4.GA-redhat-1.jar:1.0.4.GA-redhat-1]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_30]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_30]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_30]
引起:javax.xml.ws.WebServiceException:org.apache.cxf.service.factory.ServiceConstructionException:无法解析http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/的绑定 at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:368) at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:67) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:250) at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:536) 在org.jboss.wsf.stack.cxf.configuration.NonSpringBusHolder.configure(NonSpringBusHolder.java:116) 在org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:128) 在org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:67) 在org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:74) 在org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:120)[jboss-as-server-7.2.0.Final-redhat-8.jar:7.2.0.Final-redhat-8] ......还有5个 引起:org.apache.cxf.service.factory.ServiceConstructionException:无法解析http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/的绑定 at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:350) 在org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:182) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:258) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:143) 在org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:159) 在org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211) at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:453) at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:333) ......还有13个 引起:org.apache.cxf.BusException:没有注册名称空间http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/的绑定工厂。 at org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:123) at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:338) ......还有20个
请有人帮忙
由于
答案 0 :(得分:1)
刚刚更换了绑定URL,实际绑定URL表示SOAP 服务版
@BindingType(value="http://java.sun.com/xml/ns/jaxws/2003/05/soap/bindings/HTTP/")
以上BindingType网址替换为
@BindingType(value = "http://www.w3.org/2003/05/soap/bindings/HTTP/")
OR
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)
<强>详情:强>
BindingType注释应用于端点实现 类。它指定在发布端点时使用的绑定 这种类型。
端点的默认绑定是SOAP 1.1 / HTTP一个
SOAP 1.1 / HTTP
@BindingType(value = "http://schemas.xmlsoap.org/wsdl/soap/http")
OR
@BindingType(value = SOAPBinding.SOAP11HTTP_BINDING)
SOAP 1.2 / HTTP
@BindingType(value = "http://www.w3.org/2003/05/soap/bindings/HTTP/")
OR
@BindingType(value = SOAPBinding.SOAP12HTTP_BINDING)