endpoint address has to be the server which is hosting the service you deployed to Tomcat AxisServlet webapp

M-
 
*********************************************************************
This email message and any files transmitted with it contain confidential
information intended only for the person(s) to whom this email message is
addressed.  If you have received this email message in error, please notify
the sender immediately by telephone or email and destroy the original
message without making a copy.  Thank you.
 

 
----- Original Message -----
Sent: Wednesday, June 14, 2006 5:42 PM
Subject: problem using axis

Hi,

 

I have down loaded Axis. I have on WSDL and I successfully generated Proxy now I have no idea how o write a class to send and receive Soap envelop.

 

Could you please help me to find out how I will write a client that can send and receive soap envelop.

 

If trying to download sample I am getting error. And example is also not able to connect to your server

 

import org.apache.axis.client.Call;

import org.apache.axis.client.Service;

      import javax.xml.namespace.QName;

  

   public class axisClient {

     public static void main(String [] args) {

       try {

         String endpoint =

             "http://ws.apache.org:5049/axis/services/echo";

     

        Service  service = new Service();

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

 

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

       call.setOperationName(new QName("http://soapinterop.org/", "echoString"));

 

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

 

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

      } catch (Exception e) {

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

      }

    }

  }

 

 

Thank you

ashar

 

Reply via email to