Package org.jboss.soa.esb.helpers

Examples of org.jboss.soa.esb.helpers.ConfigTree


        assertEquals("SendSalesOrderNotification", soapClient.getEndpointOperation());
    }
   
    public void test_soapSetSOAPNameSpace() throws ConfigurationException, ActionProcessingException {
      String expectedSOAPNS = "http://www.w3.org/2003/05/soap-envelope";
        ConfigTree actionConfig = configUtil.getActionConfig("OrderNotificationService", "soapui-client-action-07");
        actionConfig.setAttribute( "SOAPNS", expectedSOAPNS );
        SOAPClient soapClient = new SOAPClient(actionConfig);
        assertEquals( expectedSOAPNS, soapClient.getSoapNS());
    }
View Full Code Here


    }
   
    @Test
    public void configNoOperationName() throws ConfigurationException, ActionProcessingException, ActionLifecycleException
    {
        final ConfigTree config = createConfig(null, soapAction);
        final SOAPClient client = new MockSOAPClient(config);
       
        assertNotNull(client.getOperationName());
        assertEquals(soapAction, client.getOperationName());
    }
View Full Code Here

    }
   
    @Test
    public void configNoOperationNameURI() throws ConfigurationException, ActionProcessingException, ActionLifecycleException
    {
        final ConfigTree config = createConfig(null, soapActionURI);
        final SOAPClient client = new MockSOAPClient(config);
       
        assertNotNull(client.getOperationName());
        assertEquals(soapAction, client.getOperationName());
    }
View Full Code Here

   
    @Test
    public void configOperationName() throws ConfigurationException, ActionProcessingException, ActionLifecycleException
    {
        final String operationName = "someOperation";
        final ConfigTree config = createConfig(operationName, soapAction);
        final SOAPClient client = new MockSOAPClient(config);
       
        assertNotNull(client.getOperationName());
        assertEquals(operationName, client.getOperationName());
    }
View Full Code Here

   
    @Test
    public void configNoSoapAction() throws ConfigurationException, ActionProcessingException, ActionLifecycleException
    {
        final String operationName = "someOperation";
        final ConfigTree config = createConfig(operationName, null);
        final SOAPClient client = new MockSOAPClient(config);
       
        assertNotNull(client.getOperationName());
        assertEquals(operationName, client.getOperationName());
    }
View Full Code Here

        return new JUnit4TestAdapter(SOAPClientUnitTest.class);
    }
   
    private ConfigTree createConfig(final String operationName, final String soapAction)
    {
        final ConfigTree configTree = new ConfigTree("wise-soap-client");
        configTree.setAttribute("wsdl", wsdl);
        configTree.setAttribute("SOAPAction", soapAction);
        configTree.setAttribute("EndPointName", endPointName);
        configTree.setAttribute("serviceName", serviceName);
        configTree.setAttribute("operationName", operationName);
        return configTree;
    }
View Full Code Here

        new String[] {"http://foo.com/services/old/MyService.wsdl", "./../test/MySchema.xsd", "http://foo.com/services/test/MySchema.xsd"},
        new String[] {"http://foo.com/services/old/MyService.wsdl", ".././test/MySchema.xsd", "http://foo.com/services/test/MySchema.xsd"},
        new String[] {"http://foo.com/services/old/MyService.wsdl", ".././../test/MySchema.xsd", "http://foo.com/test/MySchema.xsd"},
        new String[] {"http://foo.com/services/old/MyService.wsdl", ".././../test/./MySchema.xsd", "http://foo.com/test/MySchema.xsd"},
    };
    SOAPProxyWsdlLoader loader = new DefaultSOAPProxyWsdlLoader(new ConfigTree("config"), null, true);
    for (String[] r : relativeHttpResources)
    {
      String actual = loader.fixRelative(r[0], r[1]);
      String expected = r[2];
      assertEquals(expected, actual);
View Full Code Here

 
  @Test
  public void test_maxThreadsPropagation() throws Exception
  {
    final String expected = "100";
    ConfigTree parent_config = new ConfigTree("parent");
    parent_config.setAttribute(ListenerTagNames.MAX_THREADS_TAG, expected);
    ConfigTree child_config = new ConfigTree("child", parent_config);
    child_config.setAttribute("endpointUrl", "http://localhost"); // required attribute
    HttpSOAPProxyTransport transport = new HttpSOAPProxyTransport(child_config, null, null);
    Properties httpClientProps = transport.getHttpRouter().getHttpClientProps();
    final String actual_mtc = httpClientProps.getProperty(Connection.MAX_TOTAL_CONNECTIONS);
    assertEquals(expected, actual_mtc);
    final String actual_mcph = httpClientProps.getProperty(Connection.MAX_CONNECTIONS_PER_HOST);
View Full Code Here

  @Test
  public void test_maxThreadsPropertyOverrides() throws Exception
  {
    final String expected_mtc = "100";
    final String expected_mcph = "50";
    ConfigTree parent_config = new ConfigTree("parent");
    parent_config.setAttribute(ListenerTagNames.MAX_THREADS_TAG, "1");
    ConfigTree child_config = new ConfigTree("child", parent_config);
    child_config.setAttribute("endpointUrl", "http://localhost"); // required attribute
    ConfigTree mtc_config = new ConfigTree(HttpClientFactory.HTTP_CLIENT_PROPERTY, child_config);
    mtc_config.setAttribute("name", Connection.MAX_TOTAL_CONNECTIONS);
    mtc_config.setAttribute("value", expected_mtc);
    ConfigTree mcph_config = new ConfigTree(HttpClientFactory.HTTP_CLIENT_PROPERTY, child_config);
    mcph_config.setAttribute("name", Connection.MAX_CONNECTIONS_PER_HOST);
    mcph_config.setAttribute("value", expected_mcph);
    HttpSOAPProxyTransport transport = new HttpSOAPProxyTransport(child_config, null, null);
    Properties httpClientProps = transport.getHttpRouter().getHttpClientProps();
    final String actual_mtc = httpClientProps.getProperty(Connection.MAX_TOTAL_CONNECTIONS);
    assertEquals(expected_mtc, actual_mtc);
    final String actual_mcph = httpClientProps.getProperty(Connection.MAX_CONNECTIONS_PER_HOST);
View Full Code Here

  @Test
  public void test_maxThreadsFileOverrides() throws Exception
  {
    final String expected_mtc = "100";
    final String expected_mcph = "50";
    ConfigTree parent_config = new ConfigTree("parent");
    parent_config.setAttribute(ListenerTagNames.MAX_THREADS_TAG, "1");
    ConfigTree child_config = new ConfigTree("child", parent_config);
    child_config.setAttribute("endpointUrl", "http://localhost"); // required attribute
    File file = null;
    OutputStream os = null;
    try
    {
      file = File.createTempFile(HttpClientFactory.HTTP_CLIENT_PROPERTY, ".properties");
      os = new BufferedOutputStream(new FileOutputStream(file));
      Properties fileProperties = new Properties();
      fileProperties.setProperty(Connection.MAX_TOTAL_CONNECTIONS, expected_mtc);
      fileProperties.setProperty(Connection.MAX_CONNECTIONS_PER_HOST, expected_mcph);
      fileProperties.store(os, getClass().getName());
      os.flush(); os.close(); os = null;
      child_config.setAttribute("file", file.getAbsolutePath())
      HttpSOAPProxyTransport transport = new HttpSOAPProxyTransport(child_config, null, null);
      Properties httpClientProps = transport.getHttpRouter().getHttpClientProps();
      final String actual_mtc = httpClientProps.getProperty(Connection.MAX_TOTAL_CONNECTIONS);
      assertEquals(expected_mtc, actual_mtc);
      final String actual_mcph = httpClientProps.getProperty(Connection.MAX_CONNECTIONS_PER_HOST);
View Full Code Here

TOP

Related Classes of org.jboss.soa.esb.helpers.ConfigTree

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.