File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Certification » Web Services Certification (SCDJWS/OCEJWSD)
Bookmark "WSIT enum type question" Watch "WSIT enum type question" New topic

WSIT enum type question

Cozy Smith

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" />
// .NET auto generated code from schema
public enum usState { NH, MA }
I agree. Here's the link:
subject: WSIT enum type question
It's not a secret anymore!