Package javax.xml.rpc

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


   public JavaBean javaBeanTest(JavaBean param) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "javaBeanTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types", "JavaBean");
      call.addParameter("JavaBean_1", xmlType, param.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, param.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (JavaBean)call.invoke(new Object[] { param });
   }


   public JavaBean[] javaBeanArrayTest(JavaBean[] params) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "javaBeanArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types", "JavaBeanArray");
      call.addParameter("arrayOfJavaBean_1", xmlType, params.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, params.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (JavaBean[])call.invoke(new Object[] { params });
   }

   public long longTest(long primParam) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "longTest"));
      call.addParameter("long_1", Constants.TYPE_LITERAL_LONG, long.class, ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_LONG, long.class);
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      Long param = new Long(primParam);
      param = (Long)call.invoke(new Object[] { param });
      primParam = param.longValue();

   public long[] longArrayTest(long[] primParams) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "longArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types", "longArray");
      call.addParameter("arrayOflong_1", xmlType, primParams.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, primParams.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      primParams = (long[])call.invoke(new Object[] { primParams });
      return primParams;
   }

   public long[][] longMultiArrayTest(long[][] primParams) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "longMultiArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types", "longArrayArray");
      call.addParameter("arrayOfarrayOflong_1", xmlType, primParams.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, primParams.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      primParams = (long[][])call.invoke(new Object[] { primParams });
      return primParams;
   }

   public Long longWrapperTest(Long param) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "longWrapperTest"));
      call.addParameter("Long_1", Constants.TYPE_LITERAL_LONG, param.getClass(), ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_LONG, param.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (Long)call.invoke(new Object[] { param });
   }

   public Long[] longWrapperArrayTest(Long[] params) throws Exception
   {
      Call call = service.createCall();
      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();
      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();
      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();

   public short[] shortArrayTest(short[] primParams) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "shortArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types", "shortArray");
      call.addParameter("arrayOfshort_1", xmlType, primParams.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, primParams.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      primParams = (short[])call.invoke(new Object[] { primParams });
      return primParams;
   }

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.