使用nutz-integration-cxf 插件集成webservice idea启动运行访问正常,打成jar包访问报错,异常如下:
[INFO ] 2019-12-10 16:48:27,483 org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:437) - Creating Service {http://impl.service.webservice.trace.js.com/}recvMessage from class com.js.trace.webservice.service.RecvMessageSvc
[DEBUG] 2019-12-10 16:48:27,627 org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:333) - Created JAXBContext "jar:file:/F:/shanxiGrid/js-trace/js-trace-consumer/target/js-trace-consumer-0.1.jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class Build-Id: null
Classes known to this context:
[B
boolean
byte
char
com.js.trace.webservice.service.jaxws_asm.RecvMessage
com.js.trace.webservice.service.jaxws_asm.RecvMessageResponse
com.sun.xml.bind.api.CompositeStructure
double
float
int
java.awt.Image
java.io.File
java.lang.Boolean
java.lang.Byte
java.lang.Character
java.lang.Class
java.lang.Double
java.lang.Float
java.lang.Integer
java.lang.Long
java.lang.Object
java.lang.Short
java.lang.String
java.lang.Void
java.math.BigDecimal
java.math.BigInteger
java.net.URI
java.net.URL
java.util.Calendar
java.util.Date
java.util.GregorianCalendar
java.util.UUID
javax.activation.DataHandler
javax.xml.bind.JAXBElement
javax.xml.datatype.Duration
javax.xml.datatype.XMLGregorianCalendar
javax.xml.namespace.QName
javax.xml.transform.Source
long
short
void
" with classes [class com.js.trace.webservice.service.jaxws_asm.RecvMessage, class com.js.trace.webservice.service.jaxws_asm.RecvMessageResponse].
[DEBUG] 2019-12-10 16:48:27,701 org.nutz.ioc.impl.ScopeContext.remove(ScopeContext.java:85) - Remove object 'recvMessageWeb' from [app]
[DEBUG] 2019-12-10 16:48:27,701 com.js.trace.processor.LogTimeProcessor.process(LogTimeProcessor.java:26) - [GET ]URI=/natdock/sxagri 663ms
[WARN ] 2019-12-10 16:48:27,702 org.nutz.mvc.impl.processor.FailProcessor.process(FailProcessor.java:28) - Error@/natdock/sxagri :
org.nutz.ioc.IocException: IocBean[recvMessageWeb] throw Exception when creating
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:152)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:241)
at org.nutz.ioc.impl.NutIoc.get(NutIoc.java:271)
at org.nutz.mvc.impl.processor.ModuleProcessor.process(ModuleProcessor.java:116)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.EncodingProcessor.process(EncodingProcessor.java:27)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at org.nutz.mvc.impl.processor.UpdateRequestAttributesProcessor.process(UpdateRequestAttributesProcessor.java:15)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at com.js.trace.processor.GlobalsSettingProcessor.process(GlobalsSettingProcessor.java:48)
at org.nutz.mvc.impl.processor.AbstractProcessor.doNext(AbstractProcessor.java:44)
at com.js.trace.processor.LogTimeProcessor.process(LogTimeProcessor.java:21)
at org.nutz.mvc.impl.NutActionChain.doChain(NutActionChain.java:44)
at org.nutz.mvc.impl.ActionInvoker.invoke(ActionInvoker.java:67)
at org.nutz.mvc.ActionHandler.handle(ActionHandler.java:31)
at org.nutz.mvc.NutFilter.doFilter(NutFilter.java:202)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at com.alibaba.druid.support.http.WebStatFilter.doFilter(WebStatFilter.java:123)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at org.nutz.mvc.WhaleFilter.doFilter(WhaleFilter.java:171)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at com.netflix.hystrix.contrib.requestservlet.HystrixRequestContextServletFilter.doFilter(HystrixRequestContextServletFilter.java:53)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)
at org.eclipse.jetty.websocket.server.WebSocketUpgradeFilter.doFilter(WebSocketUpgradeFilter.java:214)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1610)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588)
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557)
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:502)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)
at org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)
at java.lang.Thread.run(Thread.java:748)
Caused by: org.apache.cxf.service.factory.ServiceConstructionException: Could not resolve a binding for http://schemas.xmlsoap.org/wsdl/soap/
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:361)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:182)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:268)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:146)
at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)
at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)
at org.nutz.integration.cxf.AbstractCxfModule.loadBus(AbstractCxfModule.java:139)
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.init(CXFNonSpringServlet.java:77)
at org.nutz.integration.cxf.AbstractCxfModule._init(AbstractCxfModule.java:86)
at org.nutz.integration.cxf.AbstractCxfModule$FM$_init$fd3a93ac716761ef652deda007bf9ab8.invoke(AbstractCxfModule.java)
at org.nutz.ioc.impl.ObjectMakerImpl$2.trigger(ObjectMakerImpl.java:180)
at org.nutz.ioc.weaver.DefaultWeaver.onCreate(DefaultWeaver.java:89)
at org.nutz.ioc.impl.ObjectMakerImpl.make(ObjectMakerImpl.java:141)
... 61 more
Caused by: org.apache.cxf.BusException: No binding factory for namespace http://schemas.xmlsoap.org/wsdl/soap/ registered.
at org.apache.cxf.bus.managers.BindingFactoryManagerImpl.getBindingFactory(BindingFactoryManagerImpl.java:93)
at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createBindingInfo(AbstractWSDLBasedEndpointFactory.java:348)
... 73 more
[DEBUG] 2019-12-10 16:48:27,707 org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1567) - FinalSession=null old_session_manager=null this=org.eclipse.jetty.server.session.SessionHandler2061543916==dftMaxIdleSec=1800
[DEBUG] 2019-12-10 16:48:27,707 org.eclipse.jetty.server.Server.handle(Server.java:505) - handled=true async=false committed=false on HttpChannelOverHttp@3dedd521{r=1,c=false,a=DISPATCHED,uri=//localhost:8082/natdock/sxagri?wsdl,age=693}
[DEBUG] 2019-12-10 16:48:27,708 org.eclipse.jetty.server.HttpChannelState.unhandle(HttpChannelState.java:399) - unhandle HttpChannelState@4f8141ec{s=DISPATCHED a=NOT_ASYNC i=true r=IDLE w=false}
[DEBUG] 2019-12-10 16:48:27,708 org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:327) - HttpChannelOverHttp@3dedd521{r=1,c=false,a=COMPLETING,uri=//localhost:8082/natdock/sxagri?wsdl,age=694} action COMPLETE
[DEBUG] 2019-12-10 16:48:27,709 org.eclipse.jetty.server.HttpChannel.sendResponse(HttpChannel.java:815) - sendResponse info=null content=HeapByteBuffer@389a367d[p=0,l=0,c=0,r=0]={<<<>>>} complete=true committing=true callback=Blocker@267711e1{null}
[DEBUG] 2019-12-10 16:48:27,709 org.eclipse.jetty.server.HttpChannel.commit(HttpChannel.java:871) - COMMIT for /natdock/sxagri on HttpChannelOverHttp@3dedd521{r=1,c=true,a=COMPLETING,uri=//localhost:8082/natdock/sxagri?wsdl,age=695}
200 null HTTP/1.1
Date: Tue, 10 Dec 2019 08:48:27 GMT
X-Powered-By: nutz/1.r.67-SNAPSHOT <nutzam.com>