Apache Cxf 跳过https的安全验证
以下方式怎么跳过https安全验证?
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
cxf的使用方式:
<jaxrs:client
id="hdpos-connector.ts.rs.service.nCardService"
address="https://172.11.17.23:8834"
serviceClass="com.iponkan.connector.ts.rs.in.ncard.RsNCardService">
<jaxrs:providers>
<ref bean="tsJsonProvider" />
</jaxrs:providers>
<jaxrs:inInterceptors>
<bean class="org.apache.cxf.interceptor.LoggingInInterceptor" />
</jaxrs:inInterceptors>
<jaxrs:outInterceptors>
<bean
class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
<bean class="com.iponkan.orchid.trace.cxf.TraceOutInterceptor" />
</jaxrs:outInterceptors>
</jaxrs:client>
java代码:
@Path("ncard/v1")
@Consumes(MediaType.APPLICATION_JSON)
@Produces(MediaType.APPLICATION_JSON)
public interface RsNCardService {
public static final String BEANID = "iponakan-connector.ts.rs.service.nCardService";
@POST
@Path("login")
RsLoginResult login(@QueryParam(value = "username") String username,
@QueryParam(value = "password") String password);
@POST
@Path("ppc/mbr/cardNums")
RsMbrResult queryCardNums(@QueryParam(value = "accountCode") String accountCode,
@QueryParam(value = "accountType") Integer accountType,
@QueryParam(value = "storeCode") String storeCode, @HeaderParam("x-auth-token") String token);
}