我想在我的本地系统中运行代码时向网址发出xml请求它运行良好我创建了一个war文件并在服务器中部署了相同的文件,但是在服务器中运行时获得异常'javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated'
我使用了groovy http builder
def http = new HTTPBuilder(url)
http.auth.basic('username', 'password')
try {
http.request(Method.POST, ContentType.TEXT) {
req->
headers.accept = "application/xml"
body = request //xml request
response.success = {
resp,reader ->
Response = reader.text
}
}
}
catch(HttpResponseException ex) {
println ex;
}
Run Code Online (Sandbox Code Playgroud)
在这种情况下如何解决这个问题..?