Thanks for following up with the resolution, Vance! Radu
-----Original Message----- From: Vance Vagell [mailto:[EMAIL PROTECTED] Sent: Tuesday, May 22, 2007 10:57 AM To: [email protected] Subject: RE: SOAP-encoding arrays Found the answer, will describe it here to help others. I couldn't find mention of these classes in the main XmlBeans Javadocs (http://xmlbeans.apache.org/docs/2.2.0/reference/index.html), but the two classes you need to use are: SchemaWSDLArrayType SOAPArrayType The trick is to get a SchemaLocalAttribute reference to the SOAP-encoding array you're interested in; how you get this reference will depend on how you're managing your schema information, but I was able to get it from the attribute model of the container type of my SchemaProperty. Then, cast that object to SchemaWSDLArrayType, and call getWSDLArrayType() on it to get a SOAPArrayType reference. From this reference you can find out all the information you want about the array. I can't claim full credit for this solution, I found it on the docjar website, which has Javadocs for SchemaWSDLArrayType (http://www.docjar.org/docs/api/org/apache/xmlbeans/soap/SchemaWSDLArray Type.html). Hope that helps someone. - Vance > -------- Original Message -------- > Subject: SOAP-encoding arrays > From: Vance Vagell <[EMAIL PROTECTED]> > Date: Tue, May 22, 2007 12:19 pm > To: [email protected] > > Hi folks, > > Similar to Aleksander Slominski's question in 2004 > (http://mail-archives.apache.org/mod_mbox/xml-xmlbeans-dev/200403.mbox > /[EMAIL PROTECTED]), > I'm trying to use XmlBeans to parse web service schemas, some of which > include a special construct for arrays. I've worked out how to > implement this in my project, but there is one piece of data I can't > seem to retrieve. Here is an example from the Google search web > service schema: > > <xsd:complexType name="ResultElementArray"> > <xsd:complexContent> > <xsd:restriction base="soapenc:Array"> > <xsd:attribute ref="soapenc:arrayType" > wsdl:arrayType="typens:ResultElement[]"/> > </xsd:restriction> > </xsd:complexContent> > </xsd:complexType> > > How can I access the value of the wsdl:arrayType attribute of this > <xsd:attribute> definition? I have both the SchemaProperty and the > SchemaType defining this attribute, but can't find an accessor on > either that can get me this information. With the value of that > wsdl:arrayType attribute, I can take care of the rest. > > The response from Radu to Aleksander was interesting, but I'm > performing all of this work dynamically at runtime, and not using > XmlBeans to generate classes from schemas. So rather than using a > SchemaCodePrinter to get at this, I need to be able to get this info > from the SchemaProperty or SchemaType object. > > Any ideas? > > Thanks, > Vance > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Notice: This email message, together with any attachments, may contain information of BEA Systems, Inc., its subsidiaries and affiliated entities, that may be confidential, proprietary, copyrighted and/or legally privileged, and is intended solely for the use of the individual or entity named in this message. If you are not the intended recipient, and have received this message in error, please immediately return this by email and then delete it. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

