Josh,
I think this is because <xsd:complexType> is not named. If you were to name it MyServiceGetPolicyRequestType then I would think you would get what you describe.
-Dave
________________________________________
From: Josh [mailto:gemini929_at_gmail.com]
Sent: Friday, December 28, 2007 9:53 AM
To: users_at_jaxb.dev.java.net
Subject: Re: No element type generated
In the above example, I would expect a class called MyServiceGetPolicyRequestType to get generated that extends BaseRequestType. MyServiceGetPolicyRequest would then represent the element.
Any suggestions?
On 12/28/07, Josh <gemini929_at_gmail.com> wrote:
All,
I am fairly new with JAXB2. When generating java code for the following:
<xsd:element name="MyService_GetPolicyRequest">
<xsd:complexType>
<xsd:complexContent>
<xsd:extension base="tns:BaseRequestType">
<xsd:sequence>
<xsd:element name="policy" type="commonTypes:PolicyType"/>
</xsd:sequence>
</xsd:extension>
</xsd:complexContent>
</xsd:complexType>
</xsd:element>
I get a class called MyServiceGetPolicyRequest that extends BaseRequestType. The problem is that this class represents an annonymous complex type and not an element. Why does this not get generated as a JAXBElement? Does this not work if elements contain annonymous complex types?
Regards,
Joshua