FileDocCategorySizeDatePackage
Axis2DotNet.javaAPI DocExample1451Tue Jan 15 12:15:14 GMT 2002javasoap.book.ch9.clients

Axis2DotNet

public class Axis2DotNet extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

      try {
         URL url = 
          new URL("http://mindstrm.com:8199/CorpDataService/Proxy.asmx");
         Service  service = new Service();
         Call call = (Call) service.createCall();
         call.setTargetEndpointAddress( url );
         call.setOperationName("getHeadlines");
         call.setProperty(Call.NAMESPACE, 
                  "http://mindstrm.com/CorpDataService");
         call.setProperty(HTTPConstants.MC_HTTP_SOAPACTION,
              "http://mindstrm.com/CorpDataService/getHeadlines");

         call.addParameter("symbol", XMLType.XSD_STRING, Call.PARAM_MODE_IN);
         call.setReturnType(XMLType.SOAP_ARRAY);

         ArrayList ret = (ArrayList)call.invoke(new Object[] {args[0]});
         Object[] res = ret.toArray();
         int cnt = res.length;
         for (int i = 0; i < cnt; i++) {
            System.out.println((String)res[i]);
         }
      }
      catch (Exception e) {
         System.out.println(e);
      }