Package org.jboss.ws.core.jaxrpc.client

Examples of org.jboss.ws.core.jaxrpc.client.CallImpl


      ServiceFactory factory = ServiceFactory.newInstance();
      QName serviceName = new QName("http://org.jboss.ws/jbws1178", "TestEndpointService");
      QName portName = new QName("http://org.jboss.ws/jbws1178", "TestEndpointPort");
      Service service = factory.createService(wsdlURL, serviceName);
      CallImpl call = (CallImpl)service.createCall(portName);
      URL epURL = new URL(call.getEndpointMetaData().getEndpointAddress());

      assertEquals(wsdlURL.getHost(), epURL.getHost());
   }
View Full Code Here


      ServiceFactory factory = ServiceFactory.newInstance();
      QName serviceName = new QName("http://org.jboss.ws/jbws1178", "TestEndpointService");
      QName portName = new QName("http://org.jboss.ws/jbws1178", "TestEndpointPort");
      Service service = factory.createService(wsdlURL, serviceName);
      CallImpl call = (CallImpl)service.createCall(portName);
      URL epURL = new URL(call.getEndpointMetaData().getEndpointAddress());

      assertEquals(wsdlURL.getHost(), epURL.getHost());
   }
View Full Code Here

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

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

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

      StringHolder holder = new StringHolder("INOUT header message");
      Object retObj = call.invoke(new Object[]{"Hello world!", holder});
      assertNull(retObj);
View Full Code Here

      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);
View Full Code Here

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

      CallImpl call = (CallImpl)service.createCall();
      call.setOperationName(new QName(NAMESPACE_URI, "testInHeader"));
      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.IN, true);

      // Add an unbound header to the call
      xmlName = new QName("http://otherns", "HeaderValue");
      call.addUnboundHeader(xmlName, Constants.TYPE_LITERAL_STRING, String.class, ParameterMode.IN);
      call.setUnboundHeaderValue(xmlName, "Unbound IN header message");
View Full Code Here

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

      CallImpl call = (CallImpl)service.createCall();
      call.setOperationName(new QName(NAMESPACE_URI, "testInOutHeader"));
      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.INOUT, true);

      // Add an unbound header to the call
      xmlName = new QName("http://otherns", "HeaderValue");
      call.addUnboundHeader(xmlName, Constants.TYPE_LITERAL_STRING, String.class, ParameterMode.INOUT);
      call.setUnboundHeaderValue(xmlName, "Unbound INOUT header message");
View Full Code Here

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

      CallImpl call = (CallImpl)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);

      // Add an unbound header to the call
      xmlName = new QName("http://otherns", "HeaderValue");
      call.addUnboundHeader(xmlName, Constants.TYPE_LITERAL_STRING, String.class, ParameterMode.OUT);
View Full Code Here

   {
      super.setUp();

      // Setup the operation description
      Service service = ServiceFactory.newInstance().createService(new QName("testService"));
      CallImpl call = (CallImpl)service.createCall();

      // Tests that involve a header value use SEI method: echoStringTwo
      String opName = (getName().endsWith("BoundHeader") ? "echoStringTwo" : "echoStringOne");
      call.setOperationName(new QName("http://org.jboss.ws/2004", opName));

      call.addParameter("String_1", Constants.TYPE_LITERAL_STRING, String.class, ParameterMode.IN);
      call.setReturnType(Constants.TYPE_LITERAL_STRING, String.class);

      opMetaData = call.getOperationMetaData();
      opMetaData.getEndpointMetaData().setServiceEndpointInterfaceName(SOAPBindingTestService.class.getName());

      // Associate a message context with the current thread
      SOAPMessageContextJAXRPC messageContext = new SOAPMessageContextJAXRPC();
      MessageContextAssociation.pushMessageContext(messageContext);
View Full Code Here

   }

   public static void testDIIBinding() throws Exception
   {
      Service service = ServiceFactory.newInstance().createService(new QName("testService"));
      CallImpl call = (CallImpl)service.createCall();
      call.setOperationName(new QName("http://org.jboss.ws/2004", "testAttachment"));

      QName xmlType = Constants.TYPE_LITERAL_STRING;
     
      call.addParameter("String_1", xmlType, String.class, ParameterMode.IN);
      call.addParameter("foo", Constants.TYPE_MIME_TEXT_PLAIN, String.class, ParameterMode.IN);
      call.setReturnType(Constants.TYPE_MIME_TEXT_PLAIN, String.class);

      OperationMetaData opMetaData = call.getOperationMetaData();

      // Associate a message context with the current thread
      SOAPMessageContextJAXRPC messageContext = new SOAPMessageContextJAXRPC();
      MessageContextAssociation.pushMessageContext(messageContext);
      messageContext.setOperationMetaData(opMetaData);
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.jaxrpc.client.CallImpl

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.