[英]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我已将此行添加到我的 JAX-WS 客户端
bindingProvider.getRequestContext().put(BindingProviderProperties.REQUEST_TIMEOUT, this.timeoutRequest);
It builds just fine in IntelliJ, but the build can't complete on Jenkins.它在 IntelliJ 中构建得很好,但在 Jenkins 上构建无法完成。 I'm getting
error: package com.sun.xml.internal.ws.client does not exist
我收到
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.项目似乎使用 org.apache.cxf JAX WS 实现。
Used org.apache.cxf.transports.http.configuration.HTTPClientPolicy
to set timeout.使用
org.apache.cxf.transports.http.configuration.HTTPClientPolicy
设置超时。
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 . Apache CXF 文档中有更多信息。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.