DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18401>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18401 WSDL2Java does not take into account multiple restriction for a SimpleType Summary: WSDL2Java does not take into account multiple restriction for a SimpleType Product: Axis Version: 1.1beta Platform: PC OS/Version: Windows XP Status: NEW Severity: Normal Priority: Other Component: WSDL processing AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] CC: [EMAIL PROTECTED] -----Original Message----- From: Fabien Guinet [mailto:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 11:07 AM To: [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: RE: WSDL2Java and SimpleType's restriction (XML Schema) Hi Tom, Many thanks for this answer (I didn't know this switch :-) but it's not the real problem in facts. The issue is coming from the fact that WSDL2Java does not take into account all the restrictions but only one ... The first ! This particularly means that, once generated, I'm able to create a UserIdentifier from a TransactionCode but not from an OpaqueIdentifier (if we are looking to the following sample). Is this a well known bug ? Is it possible to have multiple restriction definitions on a simpleType ? regards, Fabien. -----Message d'origine----- De : Tom Jordahl [mailto:[EMAIL PROTECTED] Envoy� : lundi 24 mars 2003 16:49 � : '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]' Objet : RE: WSDL2Java and SimpleType's restriction (XML Schema) 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:[EMAIL PROTECTED] Sent: Monday, March 24, 2003 3:12 AM To: Axis-User; [EMAIL PROTECTED] 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
