Hi,
I need to call .Net webservice from my JSP page. My application is Struts application. It is deployed on Oracle application server. Here is the whole process. I have a login form. When user hit login button, my Action class will validate the user information and send his information to the other site by calling .Net web service, so the other site can extract these information. So, in my jsp, I am using Javascript and webservice.htc to call .Net web service method. I am using Oracle 10g Jdeveloper. The whole works smoothly on my local computer. However, when I deploy them on our test server. I always get "service unavailabe" error. We are on Unix system, J2ee enviroment, with Oracle application server as web server.
Here is part of my JSP page. By the way, webservice.htc is in the same directory as this JSP.
-
<%@ page contentType="text/html;charset=windows-1252"%>
-
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
-
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
-
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>
-
-
-
<html:html>
-
<head>
-
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
-
-
<TITLE>ExpressPlus</TITLE>
-
</head>
-
-
<%
-
String userid = request.getParameter("userid");
-
String firstname = request.getParameter("firstname");
-
String lastname = request.getParameter("lastname");
-
-
%>
-
-
<script language="JavaScript">
-
<!--
-
var iCallID = 0;
-
var userid = "<%=userid%>";
-
var firstname="";
-
var lastname="";
-
-
function loadService() {
-
-
explusService.useService("http://www.mytest.com/Login_service.asmx?wsdl","pushData");
-
iCallID = explusService.pushData.callService(explusResults,"Push_Data",userid,firstname,lastname);
-
-
}
-
-
-
function explusResults(result) {
-
-
if (iCallID == result.id)
-
{
-
if (result.error)
-
{
-
var xfaultcode = result.errorDetail.code;
-
var xfaultstring = result.errorDetail.string;
-
var xfaultsoap = result.errorDetail.raw;
-
alert ("fault: " + xfaultcode + ": " + xfaultstring + ": "+ xfaultsoap)
-
}
-
else {
-
alert("result: " + result.value);
-
} }
-
}
-
-
//-->
-
-
</script>
-
<body onload="loadService()" >
-
-
<div ID="explusService" style="behavior:url(<%=request.getContextPath()%>/explus/webservice.htc)">
-
-
</div>
-
</body>
-
</html:html>
Please help. It is kind of urgent.
Thank you very much in advance.