Package javax.xml.rpc

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


        if(opts.getUser()!=null)
            call.setProperty(Call.USERNAME_PROPERTY, opts.getUser());
        if(opts.getPassword()!=null)
            call.setProperty(Call.PASSWORD_PROPERTY, opts.getPassword());

        String res = (String) call.invoke(new Object[] {args[0], args[1]});

        System.out.println(symbol + ": " + res);
    } // main
}
View Full Code Here


        call.setProperty(Call.SOAPACTION_URI_PROPERTY, "http://faults.samples");
        call.setOperationName( new QName(uri, "getEmployee") );

        String[] args2 = opts.getRemainingArgs();
        System.out.println("Trying :" + args2[0]);
        Employee emp = (Employee) call.invoke(new Object[]{ args2[0] });
        System.out.println("Got :" + emp.getEmployeeID());
    }
}
View Full Code Here

      QName serviceName = new QName("http://org.jboss.test.webservice/jbws425", "HelloService");
      QName portName = new QName("http://org.jboss.test.webservice/jbws425", "HelloPort");
      Service service = factory.createService(wsdlUrl, serviceName);
      Call call = service.createCall(portName, "hello");
      call.setProperty(Call.SOAPACTION_URI_PROPERTY, "uri:property-action");
      String soapAction = (String)call.invoke(new Object[] {"Hello Server"});
      assertEquals("\"uri:property-action\"", soapAction);
   }

   public void testMessageAccess() throws Exception
   {
View Full Code Here

      call.setOperationName(new QName(TARGET_NAMESPACE, "bigIntegerMultiArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types/arrays/java/math", "BigIntegerArrayArray");
      call.addParameter("arrayOfarrayOfBigInteger_1", xmlType, params.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, params.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (BigInteger[][])call.invoke(new Object[] { params });
   }

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

      call.setOperationName(new QName(TARGET_NAMESPACE, "booleanTest"));
      call.addParameter("boolean_1", Constants.TYPE_LITERAL_BOOLEAN, boolean.class, ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_BOOLEAN, boolean.class);
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      Boolean param = new Boolean(primParam);
      param = (Boolean)call.invoke(new Object[] { param });
      primParam = param.booleanValue();
      return primParam;
   }

   public boolean[] booleanArrayTest(boolean[] primParams) throws Exception
View Full Code Here

      call.setOperationName(new QName(TARGET_NAMESPACE, "booleanArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types/arrays/", "booleanArray");
      call.addParameter("arrayOfboolean_1", xmlType, primParams.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, primParams.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      primParams = (boolean[])call.invoke(new Object[] { primParams });
      return primParams;
   }

   public boolean[][] booleanMultiArrayTest(boolean[][] primParams) throws Exception
   {
View Full Code Here

      String targetAddress = "http://" + getServerHost() + ":8080/jaxrpc-samples-exception/ExceptionBean";
      call.setTargetEndpointAddress(targetAddress);

      try
      {
         call.invoke(new Object[] {});
         fail("Should have failed with RemoteException");
      }
      catch (RemoteException ex)
      {
         String faultString = ex.getMessage();
View Full Code Here

      call.setOperationName(new QName(TARGET_NAMESPACE, "booleanMultiArrayTest"));
      QName xmlType = new QName("http://org.jboss.ws/marshall/rpclit/types/arrays/", "booleanArrayArray");
      call.addParameter("arrayOfarrayOfboolean_1", xmlType, primParams.getClass(), ParameterMode.IN);
      call.setReturnType(xmlType, primParams.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      primParams = (boolean[][])call.invoke(new Object[] { primParams });
      return primParams;
   }

   public Boolean booleanWrapperTest(Boolean param) throws Exception
   {
View Full Code Here

      // 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.IN, true);

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

   public void testBoundInOutHeader() throws Exception
   {
View Full Code Here

      Call call = service.createCall();
      call.setOperationName(new QName(TARGET_NAMESPACE, "booleanWrapperTest"));
      call.addParameter("Boolean_1", Constants.TYPE_LITERAL_BOOLEAN, param.getClass(), ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_BOOLEAN, param.getClass());
      call.setTargetEndpointAddress(TARGET_ADDRESS);
      return (Boolean)call.invoke(new Object[] { param });
   }

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