Package javax.xml.rpc

Examples of javax.xml.rpc.Call.invoke()


      call.setOperationName(new QName(TARGET_NAMESPACE, "longWrapperArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types", "LongArray");
      call.addParameter("arrayOfLong_1", xmlType, params.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, params.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (Long[])call.invoke(new Object[] { params });
   }

   public Long[][] longWrapperMultiArrayTest(Long[][] params) throws Exception
   {
      Call call = service.createCall();
View Full Code Here


      call.setOperationName(new QName(TARGET_NAMESPACE, "longWrapperMultiArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types", "LongArrayArray");
      call.addParameter("arrayOfarrayOfLong_1", xmlType, params.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, params.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (Long[][])call.invoke(new Object[] { params });
   }

   public short shortTest(short primParam) throws Exception
   {
      Call call = service.createCall();
View Full Code Here

      call.setOperationName(new QName(TARGET_NAMESPACE, "shortTest"));
      call.addParameter("short_1", Constants.TYPE_LITERAL_SHORT, short.class, ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_SHORT, short.class);
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      Short param = new Short(primParam);
      param = (Short)call.invoke(new Object[] { param });
      primParam = param.shortValue();
      return primParam;
   }

   public short[] shortArrayTest(short[] primParams) throws Exception
View Full Code Here

      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "bigDecimalTest"));
      call.addParameter("BigDecimal_1", Constants.TYPE_LITERAL_DECIMAL, param.getClass(), ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_DECIMAL, param.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (BigDecimal)call.invoke(new Object[] { param });
   }

   public BigDecimal[] bigDecimalArrayTest(BigDecimal[] params) throws Exception
   {
      Call call = service.createCall();
View Full Code Here

      call.setTargetEndpointAddress("http://" + getServerHost() + ":8080/jaxws-jbws2565/MyWebServiceBean?wsdl");
      call.setOperationName(new QName("http://my.services.web", "doStuff"));
      final QName QNAME_TYPE_STRING = new QName("http://www.w3.org/2001/XMLSchema", "string");
      call.setReturnType(QNAME_TYPE_STRING);
      final String[] serviceArgs = {};
      final String result = (String) call.invoke(serviceArgs);
      assertEquals("i've done stuff", result);
   }
  
   public void testWrongArchiveDeployment() throws Exception
   {
View Full Code Here

        call.setProperty(Call.USERNAME_PROPERTY, opts.getUser());
        call.setProperty(Call.PASSWORD_PROPERTY, opts.getPassword());

        /* Get symbol and invoke the service */
        /*************************************/
        Object result = call.invoke(new Object[] {symbol = args[0]});

        return ((Float) result).floatValue();
    } // getQuote1

    /**
 
View Full Code Here

        call.setProperty(Call.USERNAME_PROPERTY, opts.getUser());
        call.setProperty(Call.PASSWORD_PROPERTY, opts.getPassword());

        /* Get symbol and invoke the service */
        /*************************************/
        Object result = call.invoke(new Object[] {symbol = args[0]});

        return ((Float) result).floatValue();
    } // getQuote2

    /**
 
View Full Code Here

        call.setProperty(Call.USERNAME_PROPERTY, opts.getUser());
        call.setProperty(Call.PASSWORD_PROPERTY, opts.getPassword());

        /* Get symbol and invoke the service */
        /*************************************/
        Object result = call.invoke(new Object[] {symbol = args[0]});

        /* Reuse the Call object for a different call */
        /**********************************************/
        call.setOperationName(new QName("urn:xmltoday-delayed-quotes", "test"));
        call.removeAllParameters();
View Full Code Here

        /**********************************************/
        call.setOperationName(new QName("urn:xmltoday-delayed-quotes", "test"));
        call.removeAllParameters();
        call.setReturnType(XMLType.XSD_STRING);

        System.out.println(call.invoke(new Object[]{}));
        return ((Float) result).floatValue();
    } // getQuote3

    public static void main(String args[]) throws Exception {
        String    save_args[] = new String[args.length];
View Full Code Here

        }
        System.out.println("Executing operation " + operationName + " with parameters:");
        for (int j = 0; j < inputs.size(); j++) {
            System.out.println(inNames.get(j) + "=" + inputs.get(j));
        }
        Object ret = call.invoke(inputs.toArray());
        Map outputs = call.getOutputParams();
        HashMap map = new HashMap();

        for (int pos = 0; pos < outNames.size(); ++pos) {
            String name = (String) outNames.get(pos);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.