Package

Source Code of testClient1

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;
import javax.xml.rpc.ParameterMode;
//import javax.xml.namespace.QName;

public class testClient1
{
   public static void main(String [] args) {
       try {
           String endpoint =
                    "http://localhost:8070/jboss-net/services/testHelloWorld";
     String methodName = "getHelloWorldMessage";
    
           Service  service = new Service();
           Call     call    = (Call) service.createCall();

           call.setTargetEndpointAddress( new java.net.URL(endpoint) );
           call.setOperationName(methodName);

           // Call to addParameter/setReturnType as described in user-guide.html
           call.addParameter("name",
                             org.apache.axis.Constants.XSD_STRING,
                             ParameterMode.IN);
           call.setReturnType(org.apache.axis.Constants.XSD_STRING);

           String ret = (String) call.invoke( new Object[] { "AXIS!" } );

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

Related Classes of testClient1

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.