Mark,
Have you tried making the phone number a String as you did in the version 2.2
sample?
Steven Gollery
[EMAIL PROTECTED]
"Walsh, Mark" wrote:
> Hi,
>
> I have a java xml client that uses Apache SOAP version 2.2 (eg
> org.apache.soap...) that can send a phone number (with a leading zero) to
> our server.
>
> Having trouble seeing how to do the same from a client using axis (alpha 3).
>
> The code fragment from Apache SOAP version 2.2 client that works is
>
> String number = "0412345678";
>
> call.setTargetObjectURI("urn:DBASE/Sms");
> call.setMethodName("sms_send");
> call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
> Vector params = new Vector ( );
> params.addElement (new Parameter("number", Integer.class, number, null));
> call.setParams (params);
> Response resp = call.invoke(url, "");
>
> which produces the following xml that is sent over the wire
> <number xsi:type="xsd:int">0412345678</number>
>
> I tried the following using axis code but the leading zero of the phone
> number gets killed when I created the Integer object.
>
> import org.apache.axis.client.Call;
> import org.apache.axis.client.Service;
> ..
> ..
> Service service = new Service();
> Call call = (Call) service.createCall();
> ..
> ..
> Integer num = new Integer("0412345678");
> call.addParameter("number", XMLType.XSD_INT, Call.PARAM_MODE_IN );
> String ret = (String) call.invoke( new Object[] { num } );
>
> which produces the following xml that is sent over the wire
> <number xsi:type="xsd:int">412345678</number>
>
> Any help or suggestions on how can i get the axis client to include the
> leading zero would be greatly appreciated.
>
> Regards,
> Mark Walsh,
>
> WWW Applications Programmer
> Division of Information Technology
> Charles Sturt University
> PO Box 789
> Albury NSW 2640
> Australia,
>
> Phone: +61 2 60 519 600
> Fax: +61 2 60 519 919
> Email: [EMAIL PROTECTED]