Download [#JAXB-493] schemagen does not create element entry

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
[JAXB-493] schemagen does not create element entry for Inner Class Created:
04/Mar/08 Updated: 11/Jan/11 Resolved: 23/Jul/08
Status:
Project:
Component/s:
Affects
Version/s:
Fix Version/s:
Resolved
jaxb
schemagen
2.0 EA1
Type:
Reporter:
Resolution:
Labels:
Remaining
Estimate:
Time Spent:
Original
Estimate:
Environment:
Bug
svidyarthi
Cannot Reproduce
None
Not Specified
Issuezilla Id:
493
2.1.8
Priority:
Assignee:
Votes:
Critical
jaxb-issues
0
Not Specified
Not Specified
Operating System: All
Platform: All
Description
I have an Inner Class in my base class, the schemagen operation did not generate
any element related to Inner class.
Sample code
package jaxws.sample;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.Vector;
import javax.xml.bind.annotation.XmlType;
@XmlType(name = "purchaseOrder", namespace = "http://jaxws/sample")
public class PurchaseOrder {
private Address shipTo;
private String name;
private String alias;
protected int age = 0;
public int numOfItems;
private Date orderDate;
private ArrayList list = null;
private HashMap map = null;
private Address[] contacts = null;
private HashSet testSet = null;
private float[] prices = null;
public Address getShipTo()
{ return shipTo; }
public void setShipTo(Address shipTo)
{ this.shipTo = shipTo; }
public String getName()
{ return name; }
public void setName(String name)
{ this.name = name; }
public Date getOrderDate()
{ return orderDate; }
public void setOrderDate(Date orderDate)
{ this.orderDate = orderDate; }
public ArrayList getList()
{ return list; }
public void setList(ArrayList list)
{ this.list = list; }
public HashMap getMap()
{ return map; }
public void setMap(HashMap map)
{ this.map = map; }
public Address[] getContacts()
{ return contacts; }
public void setContacts(Address[] contacts)
{ this.contacts = contacts; }
public HashSet getTestSet()
{ return testSet; }
public void setTestSet(HashSet testSet)
{ this.testSet = testSet; }
public float[] getPrices()
{ return prices; }
public void setPrices(float[] prices)
{ this.prices = prices; }
//did not get translated into the schema
public class InnerClass {
private String name;
private String type;
public String getName()
{ return name; }
public void setName(String name)
{ this.name = name; }
public String getType()
{ return type; }
public void setType(String type)
{ this.type = type; }
}
}
Generated Schema
*******************
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0" targetNamespace="http://jaxws/sample"
xmlns:tns="http://jaxws/sample" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="laptopPurchaseOrder">
<xs:complexContent>
<xs:extension base="tns:purchaseOrder">
<xs:sequence>
<xs:element name="laptopModel" type="xs:string" minOccurs="0"/>
<xs:element name="laptopType" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:complexType name="purchaseOrder">
<xs:sequence>
<xs:element name="numOfItems" type="xs:int"/>
<xs:element name="contacts" type="tns:address" nillable="true"
minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="list" type="xs:anyType" nillable="true" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="map">
<xs:complexType>
<xs:sequence>
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="key" minOccurs="0" type="xs:anyType"/>
<xs:element name="value" minOccurs="0" type="xs:anyType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="name" type="xs:string" minOccurs="0"/>
<xs:element name="orderDate" type="xs:dateTime" minOccurs="0"/>
<xs:element name="prices" type="xs:float" nillable="true" minOccurs="0"
maxOccurs="unbounded"/>
<xs:element name="shipTo" type="tns:address" minOccurs="0"/>
<xs:element name="testSet" type="xs:anyType" nillable="true" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="address">
<xs:sequence>
<xs:element name="addressLine" type="xs:string" minOccurs="0"/>
<xs:element name="city" type="xs:string" minOccurs="0"/>
<xs:element name="state" type="xs:string" minOccurs="0"/>
<xs:element name="zip" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Comments
Comment by Martin Grebac [ 23/Jul/08 ]
How do you invoke schemagen? If I remove address references from your class and
call the schemagen, I get schemas generated for both classes.
Generated at Sat May 06 22:26:17 UTC 2017 using JIRA 6.2.3#6260sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.
Related documents