Ashar Siddiqui wrote:

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

 


No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.394 / Virus Database: 268.8.4/363 - Release Date: 13/06/2006
HI,

You can run this task ant for create a client-stub

    <target name="generate-client-stub">
        <axis-wsdl2java url="">
            <mapping namespace="http://co/com/service/"  package="co.com.www.service.client"/>
        </axis-wsdl2java>
    </target>

after that, you must do a new class for implements the class that genereted.


Nicolás G. Rico




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to