Advertisement
Advertisement
| 04.29.2008 at 04:46PM PDT, ID: 23364010 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: |
import java.util.Vector;
import javax.xml.namespace.QName;
import org.apache.axis.types.UnsignedLong;
public class SoapCommTestClient
{
public static void main(String[] args) throws Exception
{
String endpoint = "http://www.dataaccess.com/webservicesserver/numberconversion.wso";
try {
org.apache.axis.client.Service service = new org.apache.axis.client.Service();
org.apache.axis.client.Call call = (org.apache.axis.client.Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName("http://www.dataaccess.com/webservicesserver/", "NumberToWords "));
call.addParameter("ubiNum", org.apache.axis.Constants.XSD_LONG, javax.xml.rpc.ParameterMode.IN);
call.setReturnClass( String.class );
System.out.println("Calling invoke");
Object ret = call.invoke( new Object[] { new UnsignedLong(14) } );
System.out.println("Called 'NumberToWords', got '" + ret + "'");
call.clearOperation();
call.removeAllParameters();
}
catch (Exception e)
{
e.printStackTrace();
System.out.println(e.toString());
}
}
}
|