我们在运行jboss的linux机器上部署了一个pdf web服务。我们有运行在linux和windows10机器上的weblogic应用服务器。在linux(weblogic)上部署的应用程序在linux(jboss)上访问webservice时没有任何问题。但是部署在windows10中的同一个应用程序无法访问linux机器中的webserice。我得到一个:javax.xml.ws.webserviceeexception:java.io.ioexception:当从windows应用程序调用web服务时,远程主机强制关闭了一个现有连接>。
**请注意:we服务没有任何问题——正如我所说的,只要webservice和应用程序都部署在linux机器上,它就可以正常工作。
某处突然有个插座闭合。我已经查到了wlsprovider.class。但不知道这是怎么回事。
为什么这会发生在windows/linux之间?我也检查了身份,握手和信任都没问题。
以下异常跟踪(部分)。。。。。
javax.xml.ws.WebServiceException: java.io.IOException: An existing connection was forcibly
closed by the remote host>
<Dec 18, 2020 6:59:49,265 AM CST> <Notice> <StdErr> <BEA-000000> at weblogic.wsee.jaxws.spi.WLSProvider > .createServiceDelegate(WLSProvider.java:195)
<Dec 18, 2020 6:59:49,265 AM CST> <Notice> <StdErr> <BEA-000000> at weblogic.wsee.jaxws.spi.WLSProvider > .createServiceDelegate(WLSProvider.java:150)>
<Dec 18, 2020 6:59:49,265 AM CST> <Notice> <StdErr> <BEA-000000> <at javax.xml.ws.Service.<init>(Service.java:77)>
<Dec 18, 2020 6:59:49,265 AM CST> <Notice> <StdErr> <BEA-000000> <at webservices.pdf.client.PdfCreator.<init>(PdfCreator.java:59)>
<Dec 18, 2020 6:59:49,265 AM CST> <Notice> <StdErr> <BEA-000000> <at
reports.showPdf(reportController.java:1534)>
This is the Webservices PDF service definition
=========================== WEB SERVICE ON LINUX ==========================
import java.net.MalformedURLException;
import java.net.URL;
import javax.xml.namespace.QName;
import javax.xml.ws.WebEndpoint;
import javax.xml.ws.WebServiceClient;
import javax.xml.ws.WebServiceFeature;
import javax.xml.ws.Service;
@WebServiceClient(name = "PdfCreator",
wsdlLocation = "htpps://blah.blah/forms?wsdl",
targetNamespace = "urn:weblogicws.webservices.pdf:pdfservice:1.0")
public class PdfCreator extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new QName
("urn:weblogicws.webservices.pdf:pdfservice:1.0", "PdfCreator");
public final static QName PdfCreatorPort = new
QName("urn:weblogicws.webservices.pdf:pdfservice:1.0", "PdfCreatorPort");
static {
URL url = null;
try {
url = new URL("htpps://blah.blah/forms?wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(PdfCreator.class.getName())
.log(java.util.logging.Level.INFO, "Error");
}
WSDL_LOCATION = url;
}
public PdfCreator(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}
public PdfCreator(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public PdfCreator() {
super(WSDL_LOCATION, SERVICE);
}
public PdfCreator(WebServiceFeature ... features) {
super(WSDL_LOCATION, SERVICE, features);
}
public PdfCreator(URL wsdlLocation, WebServiceFeature ... features) {
super(wsdlLocation, SERVICE, features);
}
public PdfCreator(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
super(wsdlLocation, serviceName, features);
}
@WebEndpoint(name = "PdfCreatorPort")
public PdfCreatorPortType getPdfCreatorPort() {
return super.getPort(PdfCreatorPort, PdfCreatorPortType.class);
}
@WebEndpoint(name = "PdfCreatorPort")
public PdfCreatorPortType getPdfCreatorPort(WebServiceFeature... features) {
return super.getPort(PdfCreatorPort, PdfCreatorPortType.class, features);
}
}
==============================WEB Application Side =======================
//This is the code block in the Application Side
@WebServiceClient(name = "PdfCreator",
wsdlLocation = "htpps://blah.blah/forms?wsdl",
targetNamespace = "urn:weblogicws.webservices.pdf:pdfservice:1.0")
public class PdfCreator extends Service {
public final static URL WSDL_LOCATION;
public final static QName SERVICE = new
QName("urn:weblogicws.webservices.pdf:pdfservice:1.0", "PdfCreator");
public final static QName PdfCreatorPort = new
QName("urn:weblogicws.webservices.pdf:pdfservice:1.0", "PdfCreatorPort");
static {
URL url = null;
try {
url = new URL("htpps://blah.blah/forms?wsdl");
} catch (MalformedURLException e) {
java.util.logging.Logger.getLogger(PdfCreator.class.getName())
.log(java.util.logging.Level.INFO, "Error");
}
WSDL_LOCATION = url;
}
public PdfCreator(URL wsdlLocation) {
super(wsdlLocation, SERVICE);
}
public PdfCreator(URL wsdlLocation, QName serviceName) {
super(wsdlLocation, serviceName);
}
public PdfCreator() {
super(WSDL_LOCATION, SERVICE);
}
public PdfCreator(WebServiceFeature ... features) {
super(WSDL_LOCATION, SERVICE, features);
}
public PdfCreator(URL wsdlLocation, WebServiceFeature ... features) {
super(wsdlLocation, SERVICE, features);
}
public PdfCreator(URL wsdlLocation, QName serviceName, WebServiceFeature ... features) {
super(wsdlLocation, serviceName, features);
}
@WebEndpoint(name = "PdfCreatorPort")
public PdfCreatorPortType getPdfCreatorPort() {
return super.getPort(PdfCreatorPort, PdfCreatorPortType.class);
}
@WebEndpoint(name = "PdfCreatorPort")
public PdfCreatorPortType getPdfCreatorPort(WebServiceFeature... features) {
return super.getPort(PdfCreatorPort, PdfCreatorPortType.class, features);
}
}
这是调用pdf服务的块。编号为1534的行是pdfcreator对象的示例化位置。这就是错误开始的地方//报表控制器.java
public static void showPdf(OutputStream outResultStream, String rptname,
String servicesWsdlLocation ) {
try {
PdfCreator pdfService = null;
if (servicesWsdlLocation != null) {
Line:1534 pdfService = new PdfCreator(new URL(servicesWsdlLocation ));
} else {
logger.info("showPdf:servicesWsdlLocation IS NULL");
}
} catch (Exception e) {
e.printStackTrace();
logger.error("Exception in showPdf -> " + e.getMessage());
}
}
暂无答案!
目前还没有任何答案,快来回答吧!