Hi Folks,

I have written a very simple service to compute the square root of a
number:

  public Double getSqrt (Double num) {
      double d = num.doubleValue();
      double result = java.lang.Math.sqrt(d);
      return new Double(result);
  }

In my client I invoke this service, passing it a Double.

When I run the client I get this error message:

Fault String = Exception while handling service request:
SqrtService.getSqrt(double) -- no signature match

Apparently, SOAP is converting the Double class into a double simple
type.  Sure, enough, if I put this method in my service then it works:

  public Double getSqrt (double num) {
      double result = java.lang.Math.sqrt(num);
      return new Double(result);
  }

Note that the parameter is now of type double, rather than Double.

What is going on here?  The client passes a Double, but the server
receives a double ... why?  /Roger

Reply via email to