Package org.apache.axis.client

Examples of org.apache.axis.client.Service


        // Call that same server, accessing a method we know returns
        // a double.  We should figure this out and deserialize it
        // correctly, even without the xsi:type attribute, because
        // we set the return type manually.
       
        Service S_service = new Service();
        Call call = (Call) S_service.createCall();
        call.setTransport(new LocalTransport(server));
        call.setReturnType(XMLType.XSD_DOUBLE);
       
        Object result = call.invoke("TestService",
                                    "serviceMethod",
View Full Code Here


        transport = new LocalTransport(server);
        transport.setRemoteService("inheritanceTest");
    }

    public void testInheritance() throws Exception {
        Call call = new Call(new Service());
        call.setTransport(transport);

        String ret = (String)call.invoke("inherited", null);
        assertEquals("Inherited method returned bad result",
                Parent.HELLO_MSG, ret);
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

                textToSend = "<nothing>";
            } else {
                textToSend = args[0];
            }
           
            Service  service = new Service();
            Call     call    = (Call) service.createCall();

            call.setTargetEndpointAddress( new java.net.URL(endpointURL) );
            call.setOperationName( "serviceMethod" );
            call.addParameter( "arg1", XMLType.XSD_STRING, ParameterMode.IN);
            call.setReturnType( org.apache.axis.encoding.XMLType.XSD_STRING );
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

      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

        args = opts.getRemainingArgs();
        if ( args == null || args.length == 0)
            printUsage();

        Service  service = new Service(new XMLStringProvider(wsdd));

        // create the transport
        JMSTransport transport = new JMSTransport(connectorMap, cfMap);

        // create a new Call object
        Call     call    = (Call) service.createCall();

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

        String  sURL = "http://" + args[0] + ":" + args[1] + "/axis/services/ElementService" ;
        QName   sqn  = new QName(sURL, "ElementServiceService" );
        QName   pqn  = new QName(sURL, "ElementService" );

        //Service service=new Service(new URL("file:ElementService.wsdl"),sqn);
        Service service = new Service(new URL(sURL+"?wsdl"),sqn);
        Call    call    = (Call) service.createCall( pqn, "echoElement" );

        Options opts = new Options(args);
        opts.setDefaultURL( call.getTargetEndpointAddress() );
        call.setTargetEndpointAddress( new URL(opts.getURL()) );
View Full Code Here

        String[] symbols = new String[numArgs];
        for (int i = 0; i < numArgs; i++) {
            symbols[i] = args[i];
        }

        Service  service = new Service(new XMLStringProvider(wsdd));

        HashMap cfProps = new HashMap();
        cfProps.put(SonicConstants.BROKER_URL, opts.isValueSet('b'));
        cfProps.put(SonicConstants.DEFAULT_USERNAME, opts.getUser());
        cfProps.put(SonicConstants.DEFAULT_PASSWORD, opts.getPassword());

        // do we have a jndi name?
        String jndiName = opts.isValueSet('n');
        if (jndiName != null) {
            // w/ a jndi name, we can get the appropriate connection factory
            cfProps.put(JMSConstants.CONNECTION_FACTORY_JNDI_NAME, jndiName);
        } else {
            // w/o a jndi name, we default to using the Sonic-specific method
            // for creating a connection factory, which is by specifying the
            // appropriate connection factory class from SonicConstants.java

            // topics or queues?
            String cf = null;
            if (opts.isFlagSet('t') > 0) {
                cf = SonicConstants.TCF_CLASS;
            } else {
                cf = SonicConstants.QCF_CLASS;
            }
            cfProps.put(JMSConstants.CONNECTION_FACTORY_CLASS, cf);
        }

        // create the transport
        JMSTransport transport = new JMSTransport(null, cfProps);

        // create a new Call object
        Call     call    = (Call) service.createCall();

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

     * is the length of the string (doubled if the doubled arg is true).
     */
    public boolean runTest(SOAPHeaderElement header,
                           boolean doubled) throws Exception
    {
        Call call = new Call(new Service());
        call.setTransport(localTransport);
       
        call.addHeader(header);
       
        String str = "a";
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.