如何在PAX-EXAM中测试OSGi SOAP包?

时间:2017-03-27 13:26:51

标签: osgi-bundle pax-exam pax-web

我可以使用PAX-EXAM测试普通的bundle但是我不能用于OSGi SOAP bunlde,它会在激活OSGi SOAP bundle之前抛出错误:

biz.vnc.commons.exceptions.ServiceUnavailableException: com.sun.xml.internal.ws.api.message.Header not found by abc-zimbra-soap [57]
    at biz.vnc.commons.ws.SOAPServiceInitializer.<init>(SOAPServiceInitializer.java:139)
    at biz.vnc.zimbrainstance.UserZimbraInstance.<init>(UserZimbraInstance.java:201)
    at biz.vnc.zimbrainstance.ZimbraInstance.<init>(ZimbraInstance.java:20)
    at biz.vnc.mw.zimbra.Zimbra.activate(Zimbra.java:51)
.
.
.
Caused by: java.lang.NoClassDefFoundError: com.sun.xml.internal.ws.api.message.Header not found by vnc-zimbra-soap [57]
    at com.sun.proxy.$Proxy48.<clinit>(Unknown Source)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)

我使用PAX-EXAM,有没有其他方法可以测试SOAP OSGi包?

1 个答案:

答案 0 :(得分:0)

最后通过在PAX测试配置中添加此属性来解决它:

bootDelegationPackages( “周日”, “的com.sun。”)