【发布时间】:2017-04-01 16:13:21
【问题描述】:
我正在尝试在 AEM 的 osgi 环境中使用fuelsdk。我收到此错误 -
java.lang.ClassCastException: com.sun.xml.internal.ws.client.sei.SEIStub 无法转换为 org.apache.cxf.frontend.ClientProxy
这是因为 OSGi 在其中嵌入了fuelsdk 的依赖项的包之前加载了系统包。捆绑包得到解决;此错误发生在运行时。
如何强制 OSGi 类加载器在运行时选择 org.apache.cxf.frontend.ClientProxy 而不是 com.sun.xml.internal.ws.client.sei.SEIStub?
我可以使用'uses'指令的组合吗?和/或导入/导出包?
有人建议我使用 -
创建客户端JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.getInInterceptors().add(new LoggingInInterceptor());
factory.getOutInterceptors().add(new LoggingOutInterceptor());
factory.setServiceClass(HelloWorld.class);
factory.setAddress("http://localhost:9000/helloWorld");
soapClient = (Client) factory.create();
我想知道我应该在 factory.setServiceClass() 中使用哪个类;
和
我应该在 factory.setAddress( ) 中使用哪个地址;是端点地址吗? -- https://webservice.s6.exacttarget.com/Service.asmx
非常感谢您的帮助 谢谢
【问题讨论】:
标签: osgi aem osgi-fragment embedded-osgi