简体   繁体   中英

Build on Jenkins fails: error: package com.sun.xml.internal.ws.client does not exist

I've added this line to my JAX-WS client

bindingProvider.getRequestContext().put(BindingProviderProperties.REQUEST_TIMEOUT, this.timeoutRequest);

It builds just fine in IntelliJ, but the build can't complete on Jenkins. I'm getting error: package com.sun.xml.internal.ws.client does not exist

As I understand, I shouldn't use internal classes, so is there a different way of setting request timeout?

Project appears to use org.apache.cxf JAX WS implementation.

Used org.apache.cxf.transports.http.configuration.HTTPClientPolicy to set timeout.

Client client = ClientProxy.getClient(port);
HTTPConduit http = (HTTPConduit) client.getConduit();
HTTPClientPolicy httpClientPolicy = new HTTPClientPolicy();
httpClientPolicy.setConnectionTimeout(this.timeout);
httpClientPolicy.setReceiveTimeout(this.timeout);
http.setClient(httpClientPolicy);

There's more info in Apache CXF docs .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM