<commit_before>package org.codehaus.xfire.client;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;

import org.codehaus.xfire.aegis.AbstractXFireAegisTest;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.invoker.BeanInvoker;
import org.codehaus.xfire.transport.local.LocalTransport;
import org.codehaus.xfire.util.LoggingHandler;
import org.codehaus.xfire.util.dom.DOMOutHandler;

public class ConcatClientTest
    extends AbstractXFireAegisTest
{
    public void testDynamicClient() throws Exception
    {
        Service s = getServiceFactory().create(ConcatService.class);
        s.setInvoker(new BeanInvoker(new ConcatService()
        {
            public String concat(String s1, String s2)
            {
                return s1 + s2;
            }
        }));

        getServiceRegistry().register(s);

        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        s.getWSDLWriter().write(bos);
        Client client = new Client(new ByteArrayInputStream(bos.toByteArray()), null);
        client.setXFire(getXFire());
        client.setUrl("xfire.local://ConcatService");
        client.setTransport(getTransportManager().getTransport(LocalTransport.BINDING_ID));
        
        client.addOutHandler(new LoggingHandler());
        client.addOutHandler(new DOMOutHandler());
        
        Object[] res = client.invoke("concat", new Object[]{"1", "2"});
        
        assertEquals("12", res[0]);
    }

    public static interface ConcatService
    {
        String concat(String s1, String s2);
    }
}<commit_msg>extend the test case a bit more to try and reproduce errors...<commit_after>package org.codehaus.xfire.client;

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;

import org.codehaus.xfire.aegis.AbstractXFireAegisTest;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.invoker.BeanInvoker;
import org.codehaus.xfire.transport.local.LocalTransport;

public class ConcatClientTest
    extends AbstractXFireAegisTest
{
    public void testDynamicClient() throws Exception
    {
        Service s = getServiceFactory().create(ConcatService.class);
        s.setInvoker(new BeanInvoker(new ConcatService()
        {
            public String concat(String s1, String s2)
            {
                return s1 + s2;
            }

            public String concat(String s1, String s2, String s3)
            {
                return s1 + s2 + s3;
            }
            
        }));

        getServiceRegistry().register(s);

        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        s.getWSDLWriter().write(bos);
        Client client = new Client(new ByteArrayInputStream(bos.toByteArray()), null);
        client.setXFire(getXFire());
        client.setUrl("xfire.local://ConcatService");
        client.setTransport(getTransportManager().getTransport(LocalTransport.BINDING_ID));

        Object[] res = client.invoke("concat", new Object[]{"1", "2"});
        
        assertEquals("12", res[0]);
        
        res = client.invoke("concat1", new Object[]{"1", "2", "3"});
        
        assertEquals("123", res[0]);
    }

    public static interface ConcatService
    {
        String concat(String s1, String s2);
        
        String concat(String s1, String s2, String s3);
    }
}
{'fraction_non_alphanumeric': 0.11045130641330166, 'fraction_numerical': 0.01157957244655582, 'mean_word_length': 2.8067796610169493, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '17094', 'n_tokens_mistral': 979, 'n_tokens_neox': 955, 'n_words': 188}