axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <>
Subject RE: WSDL2Java and SimpleType's restriction (XML Schema)
Date Mon, 24 Mar 2003 15:48:47 GMT

Make sure you are using the --all switch.  WSDL2Java won't emit stuff that isn't referenced
directly unless you use this switch, then it spits out everything.

(Think about people who include large Schema's but only use 1 or 2 types from it)
Tom Jordahl
Macromedia Server Development

-----Original Message-----
From: Fabien Guinet [] 
Sent: Monday, March 24, 2003 3:12 AM
To: Axis-User;
Subject: WSDL2Java and SimpleType's restriction (XML Schema)
Importance: High


When I define a set of type restrictions the WSDL2Java does not map all of
them ?

For example, here is a simple type definition:
  <xsd:schema targetNamespace="urn:common"
    <xsd:simpleType name="UserIdentifier">
        <xsd:restriction type="TransactionCode"/>
        <xsd:restriction type="OpaqueIdentifier"/>
        <xsd:restriction type="xsd:string"/>
    <xsd:complexType name="TransactionCode">
            <xsd:attribute name="transactionCode" type="xsd:string"/>
    <xsd:complexType name="OpaqueIdentifier">
            <xsd:attribute name="opaqueIdentifier" type="xsd:string"/>
This type definition is map into:
public class UserIdentifier  implements,
org.apache.axis.encoding.SimpleType {
    private TransactionCode value;

    public UserIdentifier() {

    public UserIdentifier(TransactionCode value) {
        this.value = value;

    // Simple Types must have a String constructor
    public UserIdentifier(java.lang.String value) {
        this.value = new TransactionCode(value);
But there is nothing about OpaqueIdentifier ??? It this a well known bug ?
Why don't we have something like :
 * public UserIdentifier(TransactionCode value)
 * public UserIdentifier(OpaqueIdentifier value)
 * public UserIdentifier(String value)

Many thanks for your help,


View raw message