axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "cleve" <cleve_gib...@hotmail.com>
Subject Re: Sending a float using Axis
Date Fri, 15 Feb 2002 21:19:25 GMT

Jon

change your invoke line to:

Float f = (Float)call.invoke( new Object[] { new Float(3f) } );

cleve

----- Original Message -----
From: "Jon Kurland" <jkurland@aicomm.net>
To: <axis-user@xml.apache.org>
Sent: Friday, February 15, 2002 8:00 PM
Subject: Sending a float using Axis


I am trying to send a float parameter to a soap server and I keep getting
the following error:

org.xml.sax.SAXParseException: Character conversion error: "Unconvertible
UTF-8 character beginning with 0x90" (line number may be too low).

Does anyone know how I can go about fixing this.  I believe that my client
code, written in java, is sending a string not a float to the server.  I am
attaching my code below.  Thanks in advance for your help, JK

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;

public class AxisTest
{
   public static void main(String [] args) {
       try {
           String endpoint ="http://localhost:8585/";

           Service  service = new Service();
           Call     call    = (Call) service.createCall();
           call.setTargetEndpointAddress( new java.net.URL(endpoint) );
           call.setOperationName( "Hello" );
           call.setProperty( Call.NAMESPACE, "urn:gethello" );
           call.setProperty(Call.TIMEOUT, "10000");
           call.addParameter( "Var1",
org.apache.axis.encoding.XMLType.XSD_FLOAT, Call.PARAM_MODE_IN );
           call.setReturnType( org.apache.axis.encoding.XMLType.XSD_FLOAT );

   Object ret = call.invoke( new Object[] {"1"} );

           System.out.println(ret);
       } catch (Exception e) {
           System.err.println(e.toString());
       }
   }
}


Mime
View raw message