One Star

WS Client with client certificate

I'm trying to call a WS from within a bean in my route.
Using basic http authentication works fine but using https and a client certificat doesn't work.
The strange thing is that when I use the same code in a separate eclipse environment then it works.
Here's a code snippet:
QName serviceName = new QName("", "InvoiceReceiverService");
QName portName = new QName("", "InvoiceReceiverPort");
Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING,
""); client = service.getPort(portName,;
In setupTLS() I set up the client certificate and the trust store.
The error I get from the WS is: WSDL Metadata not available to create the proxy, either Service instance or ServiceEndpointInterface beans.InvoiceReceiverSEI should have WSDL information

I suspect that in the studio environment different classes are loaded than in my eclipse environment. But I don't know how to control that.
Any help would be most welcome, thanks.