axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nitin Dubey" <Nitin.Du...@sos.sungard.com>
Subject AXIS Client SSL with WebService
Date Wed, 17 Jan 2007 06:24:14 GMT
Hello,

 

I am trying to write a SSL client using AXIS 1.4.  I got a sample from
net and able to run the following program successfully.  I have to
modify the SOAP header and send a big XML content to a external
WebService.  Can anybody tell me whether I am following the right
approach? And using the following code how do I modify the SOAP headers?

 

public static void main(String [] args) {

  try {

//    String endpoint =
"https://localhost:1000/axis/protected/EchoService.jws";

    String endpoint =
"https://pc1267.ascindia.com:1000/axis/protected/EchoService.jws";

    System.setProperty("javax.net.ssl.trustStore",
"C:/temp/ssl/.keystore");

    

    Service service = new Service();

    

    

    Call    call    = (Call) service.createCall();

    

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

    call.setOperationName(new QName("echoString"));

                

//    call.setUsername("wsuser");

//    call.setPassword("wspwd");

 

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

    System.out.println("Sent 'Hello!', got '" + ret + "'");

  } catch (Exception e) {

    System.err.println(e.toString());

  }

 

Your any kind of help will be appreciated,

 

Nitin

 


Mime
View raw message