You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@xml.apache.org by "Liaw, Wan-Bih" <Wa...@Galileo.com> on 2001/08/02 21:24:06 UTC
RE: SOAP 2.2. doesn't return the float and double values correctl
y
Yes, I did try to use TcpTunnel to reveal more insights but it didn't help
much.
I had also tried to log the stuff into a file but this part didn't work with
the web service, although it works in the regular Java codes.
I just think that SOAP isn't ready for anything serious. Any objections on
this, please let me know.
Thanks!
-----Original Message-----
From: Steeve Gilbert [mailto:Steeve_Gilbert@canammanac.com]
Sent: Thursday, August 02, 2001 11:55 AM
To: soap-user@xml.apache.org
Subject: RE: SOAP 2.2. doesn't return the float and double values
correctl y
I've checked your code but I never did JavaScript before so can't really
tell what's going wrong. Did you try to put a TcpTunnel between your
browser and the soap service? Maybe if you see the soap request that they
are exchanging that could give you some clue.
Good luck!
Steeve...
"Liaw, Wan-Bih" <Wa...@Galileo.com> on 02/08/2001 11:52:47 AM
Please respond to soap-user@xml.apache.org
To: soap-user@xml.apache.org
cc: (bcc: Steeve Gilbert/G_STGEORGES/CANAM_MANAC)
Subject: RE: SOAP 2.2. doesn't return the float and double values correctl
y
Steve, Hi, haven't heard back about your comments/solutions about my codes
in the following in my *previous* mail, hence I re-post it.
Also, one more question for everyone. What do we need to do, in order to
access to an Apache web service accessible from outside the firewalls?
-----Original Message-----
From: Liaw, Wan-Bih [mailto:Wan-Bih.Liaw@galileo.com]
Sent: Monday, July 30, 2001 1:34 PM
To: soap-user@xml.apache.org
Subject: RE: SOAP 2.2. doesn't return the float and double values correctl
Sure. They are basically as the followings. The method 'theMethod' of the
class 'WhateverService' was deployed. They are done in typical ways.
Please let me know if you see something missing? Thanks.
server code:
package ...
import ...
...
public class WhateverService implements iCCWhatever
...
public float theMethod(float c1, float c2, float from_amount)
{
return c3*c1/c2;
}
...
}
Client Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>test ... <TITLE>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4522.1800" name=GENERATOR>
<SCRIPT language=JScript>
<!-- Begin
//...
function WebService_SendRequest(SOAPRequest)
{
try
{
this._xmlHttp = new ActiveXObject("microsoft.xmlhttp");
this._serviceUrl = "http://localhost:80/soap/servlet/rpcrouter";
this._xmlHttp.Open("POST",this._serviceUrl , false);
this._xmlHttp.setRequestHeader("Content-Type", "text/xml; charset
=\"utf-8\" ");
this._xmlHttp.Send(SOAPRequest);
if(this._xmlHttp.status != 200 && this._xmlHttp.status != 500)
{
response = "<HttpError><name>ERROR Generated!!! Failed to send request
to web service at " + this._serviceUrl + ")</name><desc>" + this.
_xmlHttp.statusText + "</desc><number>" + this._xmlHttp.status +
"</number></HttpError>";
return response;
response = this._xmlHttp.responseXML.xml;
//response = xmlHttp.responseText;
}
catch(e)
{
this._generateError("Failed to send request to web service at " +
this._serviceUrl, e.description, e.number);
}
return response;
}
function main(form) {
var r1= form.input1.value;
var r2= form.input2.value;
var r3= form.input3.value;
var ParamNames = new Array();
var ParamValues = new Array();
//
if (r2 != 0)
{
ParamNames[0] = "input1"; ParamValues[0] = r1;
ParamNames[1] = "input2"; ParamValues[1] = r2
ParamNames[2] = "input3"; ParamValues[2] = r3;
// build and send the soap request
var soapRequest = BuildSoapRequest("WhateverService","theMethod",
ParamNames, ParamValues);
// ...
alert("To start the soapRequest ..."+soapRequest);
response = WebService_SendRequest(soapRequest) ;
alert(unescape(response));
} else {
alert("Please make sure r2 is not 0");
}
}
// End -->
</SCRIPT>
</HEAD>
<body>
<TABLE cellpading="10">
<TR>
<td>
<P><h3> Test Whatever ...</h3><BR>
<BR>
</P>
</td>
</tr>
</tr>
<tr>
<td ALIGN="center">
r1 <INPUT size="20" type="text" name="r1" value="20">
</td>
</tr>
</tr>
<tr>
<td ALIGN="center">
r2 <INPUT size="20" type="text" name="r2" value="30">
</td>
</tr>
</tr>
<tr>
<td ALIGN="center">
r3 <INPUT size="20" type="text" name="r3" value="1000">
</td>
</tr>
<tr>
<td width="100%" colspan="2" align="center">
<p align="center">
<input onclick=main(this.form) type=button value="Submit" name
="Submit">
</td>
</tr>
</table>
</form>
</body>
</html>
-----Original Message-----
From: Steeve Gilbert [mailto:Steeve_Gilbert@canammanac.com]
Sent: Monday, July 30, 2001 12:53 PM
To: soap-user@xml.apache.org
Subject: RE: SOAP 2.2. doesn't return the float and double values
correctl
Can you post the code of your service and client here.
Steeve...
"Liaw, Wan-Bih" <Wa...@Galileo.com> on 30/07/2001 02:45:07 PM
Please respond to soap-user@xml.apache.org
To: soap-user@xml.apache.org
cc: (bcc: Steeve Gilbert/G_STGEORGES/CANAM_MANAC)
Subject: RE: SOAP 2.2. doesn't return the float and double values
correctl
Well, I displayed the returned value of computation in a soap request, and
it was always 0.0, no matter what.
The same program works correctly in a Java application. Please let me know
how you think it working?
Thanks!
-----Original Message-----
From: Steeve Gilbert mailto:Steeve_Gilbert@canammanac.com]
Sent: Monday, July 30, 2001 12:37 PM
To: soap-user@xml.apache.org
Subject: Re: SOAP 2.2. doesn't return the float and double values
correctly
Hello!
It's ain't supposed to work that way and this ain't a bug. I've already
made a dump method that add 2 double value and return a double.
If you post more info we'll maybe be able to help you. ;-)
Steeve...
"Liaw, Wan-Bih" <Wa...@Galileo.com> on 30/07/2001 02:26:40 PM
Please respond to soap-user@xml.apache.org
To: soap-user@xml.apache.org
cc: (bcc: Steeve Gilbert/G_STGEORGES/CANAM_MANAC)
Subject: SOAP 2.2. doesn't return the float and double values correctly
It's always 0.0 in the response of a computation that involves float or
double types.
Is that the way SOAP 2.2 supposed to work? Or is it a bug???