Hi, just a question, it's you who have the code of the interface for the wsdl. Or your a client of a WS you can't modify ?
-----Mensaje original----- De: Mirco Casoni [mailto:[EMAIL PROTECTED] Enviado el: viernes, 02 de marzo de 2007 11:22 Para: [email protected] Asunto: [xfire-user] maxOccurs=unbounded and custom mapping Hi, I'm using XFire 1.2.4 for "wsdl to java" code generation. The code generated is good but I have to modify the standard mapping of a complexType with an element with maxOccurs greater than 1 or unbounded. Following I try to explain my scenario I have a wsdl with the following element: --------------------------------------------------------------- <xsd:element name="req"> <xsd:complexType> <xsd:sequence> <xsd:element name="dataString" type="xsd:string" nillable="false" minOccurs="1" maxOccurs="unbounded" /> </xsd:sequence> </xsd:complexType> </xsd:element> --------------------------------------------------------------- To generate java code I use the snippet indicated in the JavaDoc of XFire: --------------------------------------------------------------- Wsdl11Generator gen = new Wsdl11Generator(); gen.setWsdl(wsdlFileName); gen.setOutputDirectory(sourceDirName); gen.generate(); --------------------------------------------------------------- and the code generated for this element is a java class named 'Req' with a single attribute: --------------------------------------------------------------- @XmlElement(required = true) protected List<String> dataString; --------------------------------------------------------------- This transformation is good but, unfortunately, in my project I need an array instead of a List: --------------------------------------------------------------- protected String[] dataString; --------------------------------------------------------------- So I have 2 question for the list: 1) Is it possible to configure XFire to obtain a code with an array instead of a List ? 2) If it is possible, there is a documentation or a snippet code that I can study to implement my solution? I hope the mail is clear but if you need extra information don't be afraid of wrinting me :-) Thanks mirco PS: The attachment is a maven2 project that contains all the code (java and wsdl) used. --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
