Hi, The reason for this is because you have an anonymous inner type. WSDL2Java makes a seperate class for it and the name is generated using a static counter - which guarantees it to be unique . right now I cannot think of a specific way to achieve this in the current code. However if you can change the schema - you can promote the anonymous type to be a named type and then WSDL2Java will always pick the same name . (Note - if your schema has elementFormDefault='unqualified' such a type promotion will essentially change the schema!!!)
Ajith On 6/5/07, Rich Adili <[EMAIL PROTECTED]> wrote:
I would also point out that the correct type probably should be "PersonId" in this case. ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, June 05, 2007 6:10 PM To: [email protected] Subject: [Axis2 1.2] name of class generated from ADB keeps changing [SEC=UNCLASSIFIED] Hi, our team is having issue with using the services generated with adb binding. We're using Axis2 1.2 at the moment. The class name that gets generated for personId element (see below) varies when axis2-wsdl2code-maven-plugin is invoked multiple times. This becomes difficult to maintain as we are not able to rely on the consistent generated class names. For the personId element we get following class names when we invoke wsdl2code in different occasions. PersonId_type4 PersonId_type12 PersonId_type20 PersonId_type28 <xsd:element name="personId" minOccurs="0" maxOccurs="1"> <xsd:annotation> <xsd:documentation> Person ID Person ID </xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:simpleContent> <xsd:extension base="xsd:string"> <xsd:attribute name="literal" type="xsd:string" use="optional"/> </xsd:extension> </xsd:simpleContent> </xsd:complexType> </xsd:element> Is it possible to fix the name of the class that gets generated in this case? Regards, Snezana Mihajlovic Java Foundation Services Applications Infrastructure and Middleware phone:(62)115900 ********************************************************************** IMPORTANT: This e-mail is intended for the use of the addressee and may contain information that is confidential, commercially valuable or subject to legal or parliamentary privilege. If you are not the intended recipient you are notified that any review, re-transmission, disclosure, use or dissemination of this communication is strictly prohibited by several Commonwealth Acts of Parliament. If you have received this communication in error please notify the sender immediately and delete all copies of this transmission together with any attachments. **********************************************************************
-- Ajith Ranabahu --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
