On Wednesday, November 02, 2011 12:07:46 PM dmsilva wrote:
> Hi,
> In the client code, when I trying to instantiate a list of objects I get
> this error:
> <code>Exception in thread "main" java.lang.InstantiationException:
> [Lcom.demo.order.server.Order;</code>
> 
> this is my client code:
> <code> // Get the input class Order
>               Class<?> orderClass = partInfo.getTypeClass();
>               System.out.println(orderClass.getName());
>               Object orderObject = orderClass.newInstance();
> </code>
> 
> webservice: <code>
> @WebService
> public interface OrderProcess {
>     String processOrder(ArrayList<Order> order);
> </code>
> 
> some help?

Internally, we map the Lists to arrays.    That said, even if we didn't, it 
would just get mapped to a "List" which is an interface and thus also couldn't 
call orderClass.newInstance() on it.   

In anycase, you'll need to special case the arrays.

-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog
Talend - http://www.talend.com

Reply via email to