WS Client with client certificate

One Star

WS Client with client certificate

Hi
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("http://cxf.healthgate.app.itv.com/", "InvoiceReceiverService");
QName portName = new QName("http://cxf.healthgate.app.itv.com/", "InvoiceReceiverPort");
Service service = Service.create(serviceName);
service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING,
"https://192.168.10.221:9445/ITVHealthGate/cxf-services/InvoiceReceiverPort");
com.itv.app.healthgate.cxf.InvoiceReceiverSEI client = service.getPort(portName, com.itv.app.healthgate.cxf.InvoiceReceiverSEI.class);
setupTLS(client);
In setupTLS() I set up the client certificate and the trust store.
The error I get from the WS is:
javax.xml.ws.WebServiceException: 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.
Laci

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

An API-First Approach to Modernizing Applications

Learn how to use an API-First Approach to Modernize your Applications

Watch Now

Talend API Designer – Technical Overview

Take a look at this technical overview video of Talend API Designer

Watch Now

Getting Started with APIs

Find out how to get started with APIs

Read