I am trying to use the fuelsdk in an osgi environment. I am getting this error -

java.lang.ClassCastException: com.sun.xml.internal.ws.client.sei.SEIStub cannot be cast to org.apache.cxf.frontend.ClientProxy

This is because OSGi loads the system bundle before the bundle in which fuelsdk's dependency has been embedded. I have been suggested to create the client using -

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.getInInterceptors().add(new LoggingInInterceptor());
factory.getOutInterceptors().add(new LoggingOutInterceptor());
soapClient = (Client) factory.create();

I would like to know which class should I use in factory.setServiceClass();


which address should I use in factory.setAddress( ) ; is it the endpoint address ? -- https://webservice.s6.exacttarget.com/Service.asmx

Help is highly appreciated Thanks

  • was it ever worked in OSGI ? I am having similar issues. – Purnendra Pratap Singh Jan 10 '17 at 20:48
  • No it did not work unfortunately. I did the basic soap http call and got the response and parsed it. – cqsapientuser Jan 11 '17 at 0:59

It worked for me just by switching off delegate class loader in glassfish-web.xml. To create this file for your web app , use command File--> New --> Glassfish --> Glassfish Descriptor

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.