cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <>
Subject [jira] [Assigned] (CXF-3501) DynamicClient fails to send an array of String
Date Fri, 13 May 2011 06:54:47 GMT


Freeman Fang reassigned CXF-3501:

    Assignee: Freeman Fang

> DynamicClient fails to send an array of String
> ----------------------------------------------
>                 Key: CXF-3501
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.4
>         Environment: JaxWsDynamicClientFactory and Tomcat 6.
>            Reporter: Martin Thurau
>            Assignee: Freeman Fang
> I ran into some trouble using {{JaxWsDynamicClientFactory}} to access a SOAP service
which signature is unknown a compile time and is passed to my code, from an external part
at runtime. Following is a minimal example to reproduce the problem.
> The service defines the following operation:
> @WebMethod(operationName="init")
> 	public void initValueNotNull(
> 			   @WebParam(name="values")String[] values);
> I generate a SOAP service and a corresponding WSDL from this by using {{}}.
Then I generate a WAR file and deploy this to tomcat.
> Now I want to use {{JaxWsDynamicClientFactory}} to access this service:
>   JaxWsDynamicClientFactory dcf = JaxWsDynamicClientFactory.newInstance();
>   Client client = dcf.createClient(new URL("http://localhost:8080/dserv/ArrayService?wsdl"));
>   String[] values = new String[] { "foobar", "something" };
>   client.invoke("init", values);
> In the implementation of the service I have the following code:
>     @Override
>     public void initValueNotNull(String[] values) {
>         System.out.println("Got values: " + Arrays.asList(values));
>     }
> I would expect, that the two strings from the client get ouputted. Instead I simple see
{{Got values: []}}.
> If I look at the SOAP-message that get exchanged, I see the this:
> <soap:Envelope xmlns:soap="">
> <soap:Body>
> <ns1:init xmlns:ns1="">
> <values xmlns:xsi="" xmlns:xs=""
> </ns1:init>
> </soap:Body>
> </soap:Envelope>
> So somewhere and somehow the array of strings get transformed in a single string (which
happens to be the first element of the original array).
> --
> I have created a demo project and uploaded it to
> Included is a ant file to compile and build the service using {{ant build}} and execute
the client using {{ant client}}

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message