【发布时间】:2013-09-06 09:20:53
【问题描述】:
我正在尝试从独立的 java 类(包含 main 方法)调用 jax ws Web 服务。我已经在 SOAP UI 中尝试过,它会返回响应。
我的 Java 代码:在 main() 方法中:
GInformation getGMInfo = new GInformation();
GInformationResult getGMResult = new GInformationResult();
GKService GKProxy = getProxy();
//Set the Request
XMLGregorianCalendar xmlGreg = null;
getGMInfo.setRequestId("");
getGMInfo.setMessageDateTime(xmlGreg);
try {
//Get the response
getGMResult = GKProxy.getGInformation(getGMInfo);
System.out.println("Address: "+getGMResult.getInfo());
} catch (OperationFaultException e) {
e.printStackTrace();
} catch (SystemFaultException e) {
e.printStackTrace();
}
但它失败并出现这样的错误:
org.apache.axis2.AxisFault: WSWS7130E: No Secure Sockets Layer (SSL) configuration is available for the https://mklip.verd.Gin/WS/v2.8 endpoint.
我已经尝试纠正这个问题很长时间了,而且我快要发疯了。 有人能告诉我我在做什么错吗? 是否有可能从一个独立的 java 类调用 jax-ws 或者我们需要网络服务器吗?但是这个应用程序没有网络服务器。
【问题讨论】:
-
@PaulVargas :不要认为它是重复的。我知道这是证书问题。但真正的问题是如何绕过它?这里有解决方法吗?如果是这样,我该怎么做?还是我需要 wsdl 服务托管商的证书才能使其工作?
-
只有当你想通过 HTTPS 调用服务器时才需要配置 SSL。如果您不想要安全连接,可以将地址更改为 HTTP 连接。
标签: java web-services jax-ws