Hi Pat- you can construct a Complex Datatype from your array as in this example /modules/adb-codegen/test-resources/testsuite/complete.xsd where array definition is
<!-- test elements for xsd:anyType --> <element name="TestAnyType1"> <complexType> <sequence> <element name="testValue" type="xsd:anyType" minOccurs="0" maxOccurs="unbounded" nillable="true"/> </sequence> </complexType> </element> //in code you can reference the whole lot as in /modules/adb-codegen/test/org/apache/axis2/schema/testsuite/XsdAnyElementsTest.java //but first you will need a means to construct the Complex datatype and return Array of OMElement public OMElement[] testAnyTypeArray(OMElement[] innerElement, int type) throws Exception { OMElement omElement; OMElement[] returnObject = null; String omElementString; switch (type) { case 1: { TestAnyType1 testAnyType = new TestAnyType1(); testAnyType.setTestValue(innerElement); omElement = testAnyType.getOMElement(TestAnyType1.MY_QNAME, OMAbstractFactory.getSOAP12Factory()); omElementString = omElement.toStringWithConsume(); System.out.println("OMElement ==> " + omElementString); XMLStreamReader xmlReader = StAXUtils.createXMLStreamReader(new ByteArrayInputStream(omElementString.getBytes())); returnObject = TestAnyType1.Factory.parse(xmlReader).getTestValue(); break; } //later on call the testAnyTypeArray method OMElement[] returnObject; try { returnObject = testAnyTypeArray(null,1); } catch(Exception e) { System.out.println("Cannot construct complex Array DataType"); } HTH, M- --------------------------------------------------------------------------- This e-mail message (including attachments, if any) is intended for the use of the individual or entity to which it is addressed and may contain information that is privileged, proprietary , confidential and exempt from disclosure. If you are not the intended recipient, you are notified that any dissemination, distribution or copying of this communication is strictly prohibited. --------------------------------------------------------------------------- Le présent message électronique (y compris les pièces qui y sont annexées, le cas échéant) s'adresse au destinataire indiqué et peut contenir des renseignements de caractère privé ou confidentiel. Si vous n'êtes pas le destinataire de ce document, nous vous signalons qu'il est strictement interdit de le diffuser, de le distribuer ou de le reproduire. ----- Original Message ----- From: "pat" <[EMAIL PROTECTED]> To: <axis-user@ws.apache.org> Sent: Thursday, December 07, 2006 9:31 AM Subject: [SOLVER]Re: Axis2 & collection of complex objects > Use array instead of the list. > > Sorry to all. > > Pat > > On Thu, 7 Dec 2006 13:57:44 +0100, pat wrote >> Hi, >> >> I'm bit new to web services and I need to develop service with Axis2 >> which handle complex objects as lists/collections. E.g.: class A { >> List bList; } class B { String str; Integer integer; Long _long; } >> >> where the bList is a list of the B class objects. >> >> Please could someone point me to an example ??? >> >> Thnaks a lot. >> >> Pat > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >