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.
4 4121 Motoma 3,237
Recognized Expert Specialist
Since the code works properly on your development machine, I am going to rule out a coding error. This leaves open two options in my mind, configuration and networking.
What is the physical topology of your network? I'm looking for information about the dev box, the test box, and the webservice box.
Are there any differences between your development machine and your test machine? Are the application servers configured identically?
Is there a firewall in place? Are the computers (test and webservice) on the same subnet?
Hi,
Thanks for your reply.
After intensive internet searching, I think I know the problem. We are facing cross domain issue when using Web service behavior, because .Net webservice is hosted on ISS server. My web page is on oracle application server. We have different domain. I need to create proxy web service to make these two servers talk.
Do you have any sample code for this?
Thank you very much.
Motoma 3,237
Recognized Expert Specialist
Hi,
Thanks for your reply.
After intensive internet searching, I think I know the problem. We are facing cross domain issue when using Web service behavior, because .Net webservice is hosted on ISS server. My web page is on oracle application server. We have different domain. I need to create proxy web service to make these two servers talk.
Do you have any sample code for this?
Thank you very much.
You shouldn't need an application proxy. Talk to your network guys and explain the problem. They will likley have a different, easier solution for you.
Hi,
My web service is on one server and jsp page is on other server. So i cant access web service using webservice.htc file.Also i need it to call in mozilla. So i dont know about proxy cration and how to call from proxy.So can anybody tell steps how to call web service in javascript(jsp) using roxy
Thanks,
Mahendra
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Patrick |
last post by:
I am almost certain that I could use HTTP Post/Get to submit XML Web Service
call (over SSL as well, if using Version 3 of MSXML2) from an ASP
Application?
However, would I only be able to call web-service in a an asynchronous mode
(with a callback function)? If so, how?
|
by: Michael Brandt Lassen |
last post by:
Hi gurus
This problem is about calling Web services secured by Forms Authentication
from Windows Forms user controls embedded in HTML.
Using the object tag I’ve managed to include a Windows Forms user control in
my HTML page (a .NET alternative to good old ActiveX).
I’d like to use my control to call web-services instead of using behaviours
(webservices.htc).
|
by: niftyhawk |
last post by:
Hi,
Can anybody give me a simple example of how to Call Web Services from
Mozilla based Browsers ? I can call web services from IE browser using
web service behavior file, without any problems. Just wanted to know an
easy way to call them from Firefox or Netscape.
Thanks,
Nifty.
|
by: Cleo |
last post by:
Hi,
I am trying to call a WebService Method written in Weblogic from VB.NET and
I am getting the following error. I am using SOAP Caal s from VB.NET.
Please find the wsdl file and my code.
Any help would really be appreciated.
Thx
|
by: Mike |
last post by:
Timeout Calling Web Service
I am calling a .NET 1.1 web service from an aspx page. The web service can
take several minutes to complete its tasks before returning a message to the
aspx page.
If the web service is taking a long time to complete, the aspx page returns
a ‘The operation has timed-out.’ Message to the web browser after 100 seconds.
I’ve added: <httpRuntime executionTimeout="300" /> to the web.config files
| |
by: Stu |
last post by:
Hi,
I have a web service which returns a record set and works well integrated
with an asp dot net page.
However if I decided to develop a unix app
will i be able to read the dataset as it is
or do i need to write the xml as text from the web service and supply a DTD.
Also any other pitfalls
TIA
|
by: Sudha |
last post by:
Hi All,
I've a requirement to call a web service from an ASP page. As we have only
two options, using SOAP Toolkit 3.0 and XMLHttp object, which are not upto my
requirement, I thought I will create a compenent using c# which calls the web
service and I thought I can call that component very easily from ASP.
But I'm getting access denied errror while calling the .net dll/component
from my asp page. I need to let the IWAM_<machinename>...
|
by: gengyue |
last post by:
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...
|
by: brian.ackermann |
last post by:
Hello All,
I have a project where I am being asked to expose some functionality
to a customer via a web-service-like interface. This service will be
written in Classic ASP, and will take a number of parameters, process
some logic,and then return some information to the consumer. I've now
built a number of these services (Following something of a RESTful
approach), and the next one I need to build happens to require some
information...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |