java cxf swing 结合发布webservice

在一个桌面程序中需要用到webservice,使用swing编写桌面程序,用cxf及内置的jetty发布webservice,目前在eclipse中可以正常运行,
但是一旦打包成jar文件就会报错:
[main] DEBUG org.apache.cxf.common.logging.LogUtils - Using org.apache.cxf.common.logging.Log4jLogger for logging.

[main] INFO org.apache.cxf.wsdl.service.factory.ReflectionServiceFactoryBean - Creating Service {http://schemas.xmlsoap.org/soap/}WebserviceImplService from class com.test.IWebservice

[main] DEBUG org.apache.cxf.jaxb.JAXBDataBinding - Created JAXBContext "jar:file:/E:/am-win-x86/AMStartup.jar!/com/sun/xml/bind/v2/runtime/JAXBContextImpl.class Build-Id: null
Classes known to this context:
[B
boolean
byte
char
com.sun.xml.bind.api.CompositeStructure
com.test.jaxws_asm.SayHello
com.test.jaxws_asm.SayHelloResponse
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.test.jaxws_asm.SayHello, class com.test.jaxws_asm.SayHelloResponse].

[main] INFO com.test.Test - webService发布失败

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:352)

at org.apache.cxf.jaxws.JaxWsServerFactoryBean.createBindingInfo(JaxWsServerFactoryBean.java:182)

at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:259)

at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:144)

at org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:168)

at org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:211)

at com.test.Test.publishWebservice(Test.java:51)

at com.test.Test.<init>(Test.java:31)

at com.test.Test.main(Test.java:71)

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:339)

... 8 more
不知道具体是什么原因,另外我使用的打包工具是fatjar,求大婶帮助

1个回答

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!