Meaningless Drivel is fun!*
The moose likes Web Services Certification (SCDJWS/OCEJWSD) and the fly likes WSIT enum type question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "WSIT enum type question" Watch "WSIT enum type question" New topic
Author

WSIT enum type question

Cozy Smith
Greenhorn

Joined: Aug 27, 2013
Posts: 2
from the following, for enum mapping, in java, it codes as {MA, NH}, but when it maps to schema, the sequence changes, it shows <xs:enumeration value="NH" /> before <xs:enumeration value="MA" />

my question, is this mapping from java to schema valid? thanks!

//-- Java code fragment
public enum USState {MA, NH}
//-- Schema fragment
<xs:simpleType name="usState">
<xs:restriction base="xs:string">
<xs:enumeration value="NH" />
<xs:enumeration value="MA" />
</xs:restriction>
</xs:simpleType>
// .NET auto generated code from schema
public enum usState { NH, MA }
 
 
subject: WSIT enum type question