axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tom Jordahl <t...@macromedia.com>
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 [mailto:fabien.guinet@inovatel.com] 
Sent: Monday, March 24, 2003 3:12 AM
To: Axis-User; axis-dev@ws.apache.org
Subject: WSDL2Java and SimpleType's restriction (XML Schema)
Importance: High

Hello,

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

For example, here is a simple type definition:
<types>
  <xsd:schema targetNamespace="urn:common"
              xmlns="urn:common"
              xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <xsd:simpleType name="UserIdentifier">
        <xsd:restriction type="TransactionCode"/>
        <xsd:restriction type="OpaqueIdentifier"/>
        <xsd:restriction type="xsd:string"/>
    </xsd:simpleType>
    <xsd:complexType name="TransactionCode">
        <xsd:sequence>
            <xsd:attribute name="transactionCode" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="OpaqueIdentifier">
        <xsd:sequence>
            <xsd:attribute name="opaqueIdentifier" type="xsd:string"/>
        </xsd:sequence>
    </xsd:complexType>
  </xsd:schema>
</types>
This type definition is map into:
public class UserIdentifier  implements java.io.Serializable,
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,

Fabien


Mime
View raw message