Package javax.xml.rpc

Examples of javax.xml.rpc.Call


   public void testBoundOutHeader() throws Exception
   {
      Service service = ServiceFactory.newInstance().createService(new QName("testService"));

      Call call = service.createCall();
      call.setOperationName(new QName(NAMESPACE_URI, "testOutHeader"));
      call.addParameter("String_1", Constants.TYPE_LITERAL_STRING, ParameterMode.IN);

      call.setTargetEndpointAddress(TARGET_ENDPOINT_ADDRESS);

      // Add a bound header to the call
      CallImpl mycall = (CallImpl)call;
      QName xmlName = new QName(HEADER_NAMESPACE_URI, "headerMsg");
      mycall.addParameter(xmlName, Constants.TYPE_LITERAL_STRING, String.class, ParameterMode.OUT, true);

      StringHolder holder = new StringHolder();
      Object retObj = call.invoke(new Object[]{"Hello world!", holder});
      assertNull(retObj);

      Map outputParams = call.getOutputParams();
      Object headerValue = outputParams.get(xmlName.getLocalPart());
      assertEquals("OUT header message", headerValue);
      assertEquals("OUT header message", holder.value);
   }
View Full Code Here


   }

   public void testSayHelloDII() throws Exception
   {
      String helloServiceNS = "http://jbpm.org/examples/hello";
      Call call = helloService.createCall(new QName(helloServiceNS, "GreeterPort"));
      call.setOperationName(new QName(helloServiceNS, "sayHello"));

      String greeting = (String)call.invoke(new Object[] { "Olive" });
      assertEquals("Hello, Olive!", greeting);
   }
View Full Code Here

      return (QName[])call.invoke(new Object[] { params });
   }

   public QName[][] qnameMultiArrayTest(QName[][] params) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "qnameMultiArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types", "QNameArrayArray");
      call.addParameter("arrayOfarrayOfQName_1", xmlType, params.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, params.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (QName[][])call.invoke(new Object[] { params });
   }
View Full Code Here

      return (QName[][])call.invoke(new Object[] { params });
   }

   public byte[] base64BinaryTest(byte[] primParams) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "base64BinaryTest"));
      call.addParameter("arrayOfbyte_1", Constants.TYPE_LITERAL_BASE64BINARY, byte[].class, ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_BASE64BINARY, byte[].class);
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      primParams = (byte[])call.invoke(new Object[] { primParams });
      return primParams;
   }
View Full Code Here

      return primParams;
   }

   public byte[] hexBinaryTest(byte[] primParams) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "hexBinaryTest"));
      call.addParameter("arrayOfbyte_1", Constants.TYPE_LITERAL_HEXBINARY, byte[].class, ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_HEXBINARY, byte[].class);
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      primParams = (byte[])call.invoke(new Object[] { primParams });
      return primParams;
   }
View Full Code Here

      return primParams;
   }

   public Calendar calendarTest(Calendar param) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "calendarTest"));
      call.addParameter("Calendar_1", Constants.TYPE_LITERAL_DATETIME, param.getClass(), ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_DATETIME, param.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (Calendar)call.invoke(new Object[] { param });
   }
View Full Code Here

      return (Calendar)call.invoke(new Object[] { param });
   }

   public Calendar[] calendarArrayTest(Calendar[] params) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "calendarArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types", "CalendarArray");
      call.addParameter("arrayOfCalendar_1", xmlType, params.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, params.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (Calendar[])call.invoke(new Object[] { params });
   }
View Full Code Here

      return (Calendar[])call.invoke(new Object[] { params });
   }

   public Calendar[][] calendarMultiArrayTest(Calendar[][] params) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "calendarMultiArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types", "CalendarArrayArray");
      call.addParameter("arrayOfarrayOfCalendar_1", xmlType, params.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, params.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (Calendar[][])call.invoke(new Object[] { params });
   }
View Full Code Here

      return (Calendar[][])call.invoke(new Object[] { params });
   }

   public double doubleTest(double primParam) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "doubleTest"));
      call.addParameter("double_1", Constants.TYPE_LITERAL_DOUBLE, double.class, ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_DOUBLE, double.class);
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      Double param = new Double(primParam);
      param = (Double)call.invoke(new Object[] { param });
      primParam = param.doubleValue();
      return primParam;
   }
View Full Code Here

      return primParam;
   }

   public double[] doubleArrayTest(double[] primParams) throws Exception
   {
      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "doubleArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types/arrays/", "doubleArray");
      call.addParameter("arrayOfdouble_1", xmlType, primParams.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, primParams.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      primParams = (double[])call.invoke(new Object[] { primParams });
      return primParams;
   }
View Full Code Here

TOP

Related Classes of javax.xml.rpc.Call

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.