I have a jaxrpc endpoint which has methods like these:
public interface TrivialService extends Remote { int purchase (String person, Product[] products) throws RemoteException; int purchaseA (String person, ProductA[] products) throws RemoteException; }
public void testPurchase() throws Exception { String person = "Karen"; ProductA bike = new ProductA(); bike.setName("cyfac"); bike.setPrice(3000); ProductA bike2 = new ProductA(); bike2.setName("look"); bike2.setPrice(5000); ProductA bike3 = new ProductA(); bike3.setName("GOSPORT"); bike3.setPrice(1000); Product[] bikes = new Product[] {bike, bike2, bike3}; int price = port.purchase(person, bikes); assertEquals(9000, price); }
ProductA[] bikes = new ProductA[] {bike, bike2, bike3}; int price = port.purchaseA(person, bikes);
<ns1:purchase xmlns:ns1='http://com.kl/test1/types'> <String_1>Karen</String_1> <arrayOfProduct_2 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='ns1:ProductA'> <name>cyfac</name> <price>3000</price> </arrayOfProduct_2> <arrayOfProduct_2 xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:type='ns1:ProductA'> <name>look</name> <price>5000</price> </arrayOfProduct_2> .....