FileDocCategorySizeDatePackage
PingServiceClient.javaAPI DocExample3248Tue May 29 16:58:04 BST 2007simple.client

PingServiceClient

public class PingServiceClient extends Object

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

            HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() {
                public boolean verify(String string, SSLSession sSLSession) {
                    return true;
                }
            });
            
            PingService service = new PingService();
            IPingService stub = service.getCustomBindingIPingService(); 
                    
            // use static stubs to override endpoint property of WSDL       
            String serviceURL = System.getProperty("service.url");

            System.out.println("Service URL=" + serviceURL);
      
            ((BindingProvider)stub).getRequestContext().
                put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, serviceURL); 

            stub.ping(new Holder("1"), new Holder("sun"), new Holder("Passed!"));