Package org.jboss.test.ws.interop

Examples of org.jboss.test.ws.interop.ClientScenario


      this.configRoot = configRoot;
   }

   public ClientScenario getScenario(String name)
   {
      ClientScenario cs = null;

      try
      {
         cs = null;
         Iterator it = DOMUtils.getChildElements(configRoot);
         while(it.hasNext())
         {
            Element child = (Element)it.next();
            String scenarioName = DOMUtils.getAttributeValue(child, "name");
            if(name.equals(scenarioName))
            {
               // mandatory elements
               Element targetEndpoint = DOMUtils.getFirstChildElement(child, "target-endpoint");
               URL endpointURL = new URL(targetEndpoint.getTextContent());
               cs = new ClientScenario(scenarioName, endpointURL);

               // todo: add parameter element parsing here
               Iterator parameter = DOMUtils.getChildElements(child, "param");
               while(parameter.hasNext())
               {
                  Element param = (Element)it.next();
                  String key = DOMUtils.getAttributeValue(param, "name");
                  String value = DOMUtils.getAttributeValue(param, "value");
                  cs.getParameterMap().put(key, value);
               }
               break;
            }
         }
      }
View Full Code Here


   }

   public ClientScenario createClientScenario(String scenarioName)
   {
      InteropClientConfig clientConfig = createClientConfig();
      ClientScenario sc = clientConfig.getScenario(scenarioName);
      if(null==sc)
         sc = clientConfig.getScenario("default");

      return sc;
   }
View Full Code Here

      assertEquals("http://jboss.com/interop", ret);
   }*/

   protected void configureClient(BindingProvider port) {
      InteropConfigFactory factory = InteropConfigFactory.newInstance();
      ClientScenario scenario = factory.createClientScenario(System.getProperty("client.scenario"));
      if(scenario!=null)
      {
         //System.out.println("Using scenario: " + scenario);
         port.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, scenario.getTargetEndpoint().toString());
      }
      else
      {
         throw new IllegalStateException("Failed to load client scenario");
      }
View Full Code Here

      this.configRoot = configRoot;
   }

   public ClientScenario getScenario(String name)
   {
      ClientScenario cs = null;

      try
      {
         cs = null;
         Iterator it = DOMUtils.getChildElements(configRoot);
         while(it.hasNext())
         {
            Element child = (Element)it.next();
            String scenarioName = DOMUtils.getAttributeValue(child, "name");
            if(name.equals(scenarioName))
            {
               // mandatory elements
               Element targetEndpoint = DOMUtils.getFirstChildElement(child, "target-endpoint");
               URL endpointURL = new URL(targetEndpoint.getTextContent());
               cs = new ClientScenario(scenarioName, endpointURL);

               // todo: add parameter element parsing here
               Iterator parameter = DOMUtils.getChildElements(child, "param");
               while(parameter.hasNext())
               {
                  Element param = (Element)parameter.next();
                  String key = DOMUtils.getAttributeValue(param, "name");
                  String value = DOMUtils.getAttributeValue(param, "value");
                  cs.getParameterMap().put(key, value);
               }
               break;
            }
         }
      }
View Full Code Here

   }

   public ClientScenario createClientScenario(String scenarioName)
   {
      InteropClientConfig clientConfig = createClientConfig();
      ClientScenario sc = null;
      if (scenarioName != null)
      {
         sc = clientConfig.getScenario(scenarioName);
      }
      if(null==sc)
View Full Code Here

      assertEquals("http://jboss.com/interop", ret);
   }*/

   protected void configureClient(BindingProvider port) {
      InteropConfigFactory factory = InteropConfigFactory.newInstance();
      ClientScenario scenario = factory.createClientScenario(System.getProperty("client.scenario"));
      if(scenario!=null)
      {
         //System.out.println("Using scenario: " + scenario);
         port.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, scenario.getTargetEndpoint().toString());
      }
      else
      {
         throw new IllegalStateException("Failed to load client scenario");
      }
View Full Code Here

   protected void configureClient()
   {
     
      InteropConfigFactory factory = InteropConfigFactory.newInstance();
      ClientScenario scenario = factory.createClientScenario(System.getProperty("client.scenario"));
      if (scenario != null)
      {
         log.info("Using scenario: " + scenario);
         String targetEndpoint = scenario.getTargetEndpoint().toString();
         if (targetEndpoint.contains("REPLACE_WITH_ACTUAL_HOST"))
         {
            targetEndpoint = targetEndpoint.replace("REPLACE_WITH_ACTUAL_HOST", getServerHost());
         }
         System.out.println("Using target endpoint: " + targetEndpoint);
View Full Code Here

   }
  
   private void configureClient() {

     InteropConfigFactory factory = InteropConfigFactory.newInstance();
     ClientScenario scenario = factory.createClientScenario(System.getProperty("client.scenario"));
     if(scenario!=null)
     {
        String notifyEndpoint = scenario.getTargetEndpoint().toString();
        log.info("Using scenario: " + scenario);
        log.info("Endpoint at: " + notifyEndpoint);
       
       
        if (notifyEndpoint.contains("REPLACE_WITH_ACTUAL_HOST"))
        {
           notifyEndpoint = notifyEndpoint.replace("REPLACE_WITH_ACTUAL_HOST", getServerHost());
        }
        System.out.println("Using notify target endpoint: " + notifyEndpoint);
        String echoEndpoint = scenario.getParameter("echoPort");
        if (echoEndpoint.contains("REPLACE_WITH_ACTUAL_HOST"))
        {
           echoEndpoint = echoEndpoint.replace("REPLACE_WITH_ACTUAL_HOST", getServerHost());
        }
        System.out.println("... and echo target endpoint: " + echoEndpoint);
View Full Code Here

TOP

Related Classes of org.jboss.test.ws.interop.ClientScenario

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.