Package org.apache.axis.client

Examples of org.apache.axis.client.Service


      QName servQN = new QName("urn:xmltoday-delayed-quotes","GetQuoteService");
      QName portQN = new QName("urn:xmltoday-delayed-quotes","GetQuote");

      /* Now use those QNames as pointers into the WSDL doc */
      /******************************************************/
      Service service = new Service( new URL("file:GetQuote.wsdl"), servQN );
      Call    call    = (Call) service.createCall( portQN, "getQuote" );

      /* Strange - but allows the user to change just certain portions of */
      /* the URL we're gonna use to invoke the service.  Useful when you  */
      /* want to run it thru tcpmon (ie. put  -p81 on the cmd line).      */
      /********************************************************************/
 
View Full Code Here


      URL url = new URL(opts.getURL());
      String user = opts.getUser();
      String passwd = opts.getPassword();

      Service  service = new Service();

      Float res = new Float(0.0F);
      for (int i=0; i<count; i++) {
          Call     call    = (Call) service.createCall();

          call.setTargetEndpointAddress( url );
          call.setOperationName( new QName("urn:xmltoday-delayed-quotes", "getQuote") );
          call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.IN );
          call.setReturnType( XMLType.XSD_FLOAT );
View Full Code Here

      QName servQN = new QName("urn:xmltoday-delayed-quotes","GetQuoteService");
      QName portQN = new QName("urn:xmltoday-delayed-quotes","GetQuoteJava");

      /* Now use those QNames as pointers into the WSDL doc */
      /******************************************************/
      Service service = new Service( new URL("file:GetQuote.wsdl"), servQN );
      Call    call    = (Call) service.createCall( portQN, "getQuote" );

      /* Strange - but allows the user to change just certain portions of */
      /* the URL we're gonna use to invoke the service.  Useful when you  */
      /* want to run it thru tcpmon (ie. put  -p81 on the cmd line).      */
      /********************************************************************/
 
View Full Code Here

        System.err.println( "Usage: GetInfo <symbol> <datatype>" );
        System.exit(1);
      }

      String  symbol = args[0] ;
      Service  service = new Service();
      Call     call    = (Call) service.createCall();

      call.setTargetEndpointAddress( new java.net.URL(opts.getURL()) );
      call.setOperationName( new QName("urn:cominfo", "getInfo") );
      call.addParameter( "symbol", XMLType.XSD_STRING, ParameterMode.IN );
      call.addParameter( "info", XMLType.XSD_STRING, ParameterMode.IN );
View Full Code Here

     *   -h localhost -p 8080 -s /soap/servlet/rpcrouter
     */
    public static void main(String args[]) throws Exception {
        // set up the call object
        Options opts = new Options(args);
        service = new Service();
        call = (Call) service.createCall();
        call.setTargetEndpointAddress( new URL(opts.getURL()) );
        call.setUseSOAPAction(true);
        call.setSOAPActionURI("http://www.soapinterop.org/Bid");

View Full Code Here

            getClientEngineConfig();
        SimpleProvider config = new SimpleProvider(defaultConfig);
        SimpleTargetedChain c = new SimpleTargetedChain(new TCPSender());
        config.deployTransport("tcp", c);

        Service service = new Service(config);
        Call call = (Call)service.createCall();
       
        call.setTransport(new TCPTransport());
       
        call.setTargetEndpointAddress( new URL(opts.getURL()) );
        call.setOperationName( new QName("urn:xmltoday-delayed-quotes", "getQuote") );
View Full Code Here


        //Create the data for the attached file.
        DataHandler dhSource = new DataHandler(new FileDataSource(filename));

        Service service = new Service();

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


        call.setTargetEndpointAddress(new URL(opts.getURL())); //Set the target service host and service location,

        call.setOperationName(new QName("urn:EchoAttachmentsService", "echo")); //This is the target services method to invoke.
View Full Code Here

        if (attachments.length == 0) {
            throw new java.lang.IllegalArgumentException(
                    "The directory \"" + filename + "\" has no files to send.");
        }

        Service service = new Service(); //A new axis Service.

        Call call = (Call) service.createCall(); //Create a call to the service.

        /*Un comment the below statement to do HTTP/1.1 protocol*/
        //call.setScopedProperty(MessageContext.HTTP_TRANSPORT_VERSION,HTTPConstants.HEADER_PROTOCOL_V11);
        Hashtable myhttp = new Hashtable();
        myhttp.put("dddd", "yyy");     //Send extra soap headers
View Full Code Here

    public boolean testit() throws Exception {
        boolean rc = true;
        String baseLoc= "http://axis.org/attachTest";
        Vector refs= new Vector()//holds a string of references to attachments.

        Service  service = new Service(); //A new axis Service.

        Call     call    = (Call) service.createCall(); //Create a call to the service.

        /*Un comment the below statement to do HTTP/1.1 protocol*/
      //call.setScopedProperty(MessageContext.HTTP_TRANSPORT_VERSION,HTTPConstants.HEADER_PROTOCOL_V11);
        Hashtable myhttp= new Hashtable();
        myhttp.put(HTTPConstants.HEADER_CONTENT_LOCATION, baseLoc);     //Send extra soap headers
View Full Code Here

    try {
      TextMessage m = (TextMessage) msg;
      Message responseMessage = new Message(m.getText());
      responseMessage.setMessageType(Message.RESPONSE);

      Service service = new Service();
      MessageContext msgContext = new MessageContext(service.getEngine());
      msgContext.setResponseMessage(responseMessage);

      TypeMappingRegistry tmr = msgContext.getTypeMappingRegistry();
      org.apache.axis.encoding.TypeMapping tm =
        (org.apache.axis.encoding.TypeMapping) tmr.getTypeMapping(
View Full Code Here

TOP

Related Classes of org.apache.axis.client.Service

Copyright © 2018 www.massapicom. 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.