Hi All;
As recommended by one of the list members , here is a complete example of
the scenario i very explained a couple of days before.
(See attached file: test_token.xml)(See attached file: test_token.xsd)
we used the source code generator to create java obs from our final & consolidated
test_token.xsd (including the NMToken).
The problem now is we have an NMTOKEN "attribute1" which can take either of
the values (1,2,3) .
And, we created a xml instance (test_token.xml), of the xsd with a value
'4' for the NMTOKEN "attribute1".
And at the point of unmarshalling test_token.xml with a Validation(False)
option, the Unmarsheller raises a Marshalling Exception in place of a
Validation exception resulting in the termination of my program. Very
Serious problem !
Can anyone please let me know how to fix this problem ?
To execute the test , You have to take care of the following two details
1) deattaching the source files into a package called test_enum !
2) deattach the Types (Attribute1Type.java & Arrtibute1TypeDescriptor.java) into
sub-package types (test_enum.types)
3) deattach the xml & xsd files into the Root directory (in windows C:) & for unix
please make effort to change a line in the code in (Test.java)!
4) By default the .jar consists a test_enum.Test which launches the unmarshalling
process.
(See attached file: Element1.java)(See attached file: Element1Descriptor.java)(See
attached file: Root.java)(See attached file: RootDescriptor.java)
(See attached file: Attribute1Type.java)(See attached file:
Attribute1TypeDescriptor.java)
Pour : Eswar SUBRAMANYAM
cc :
ccc :
Objet : Test.java (main class)
(See attached file: Test.java)
Pour : Eswar SUBRAMANYAM
cc :
ccc :
Objet : jar
(See attached file: test_enum.jar)
Rgds,
Eswar Subramanyam.
This message and any attachments (the "message") is
intended solely for the addressees and is confidential.
If you receive this message in error, please delete it and
immediately notify the sender. Any use not in accord with
its purpose, any dissemination or disclosure, either whole
or partial, is prohibited except formal approval. The internet
can not guarantee the integrity of this message.
BNP PARIBAS (and its subsidiaries) shall (will) not
therefore be liable for the message if modified.
---------------------------------------------
Ce message et toutes les pieces jointes (ci-apres le
"message") sont etablis a l'intention exclusive de ses
destinataires et sont confidentiels. Si vous recevez ce
message par erreur, merci de le detruire et d'en avertir
immediatement l'expediteur. Toute utilisation de ce
message non conforme a sa destination, toute diffusion
ou toute publication, totale ou partielle, est interdite, sauf
autorisation expresse. L'internet ne permettant pas
d'assurer l'integrite de ce message, BNP PARIBAS (et ses
filiales) decline(nt) toute responsabilite au titre de ce
message, dans l'hypothese ou il aurait ete modifie.
test_token.xml
Description: Binary data
test_token.xsd
Description: Binary data
Element1.java
Description: Binary data
Element1Descriptor.java
Description: Binary data
Root.java
Description: Binary data
RootDescriptor.java
Description: Binary data
Attribute1Type.java
Description: Binary data
Attribute1TypeDescriptor.java
Description: Binary data
Test.java
Description: Binary data
test_enum.jar
Description: Binary data
