users@jaxb.java.net

Re: Unmarshal error but XMLSPY says ok

From: Frank <fgeck_at_optonline.net>
Date: Fri, 24 Nov 2006 19:01:45 -0500

Kirill,
    Thanks. Ok I used Oxygen as you recommended and it validated the
document to the schema just fine. From what I can tell it's and issue
with the name spaces. Jaxb doe snot like "

<jbfsa:" for some reasons but the external xlm validators validate it.


Frank

Kirill Grouchnikov wrote:

>XMLSpy is very unreliable in validating XMLs against schemas (it's too permissive). Use Oxygen, Stylus Studio, XML Exchanger or any other XML tool to do the external (manual) validation.
>
>----- Original Message ----
>From: Frank <fgeck_at_optonline.net>
>To: jaxb user list <users_at_jaxb.dev.java.net>
>Sent: Friday, November 24, 2006 3:04:47 PM
>Subject: Unmarshal error but XMLSPY says ok
>
>I have a document that validates just fine in XMLSPY but when I try to
>unmarshal it using JAXB it fails with the following error:
>
>javax.xml.bind.UnmarshalException: unexpected element
>(uri:"urn:us:gov:dod:army:cerdec:jbfsa:csds:r1", local:"getDocRequest").
>Expected elements are
><{http://www.w3.org/2000/09/xmldsig#}CanonicalizationMethod>,<{http://www.w3.org/2000/09/xmldsig#}DSAKeyValue>,<{http://www.w3.org/2000/09/xmldsig#}DigestMethod>,<{http://www.w3.org/2000/09/xmldsig#}DigestValue>,<{http://www.w3.org/2000/09/xmldsig#}KeyInfo>,<{http://www.w3.org/2000/09/xmldsig#}KeyName>,<{http://www.w3.org/2000/09/xmldsig#}KeyValue>,<{http://www.w3.org/2000/09/xmldsig#}Manifest>,<{http://www.w3.org/2000/09/xmldsig#}MgmtData>,<{http://www.w3.org/2000/09/xmldsig#}Object>,<{http://www.w3.org/2000/09/xmldsig#}PGPData>,<{http://www.w3.org/2000/09/xmldsig#}RSAKeyValue>,<{http://www.w3.org/2000/09/xmldsig#}Reference>,<{http://www.w3.org/2000/09/xmldsig#}RetrievalMethod>,<{http://www.w3.org/2000/09/xmldsig#}SPKIData>,<{http://www.w3.org/2000/09/xmldsig#}Signature>,<{http://www.w3.org/2000/09/xmldsig#}SignatureMethod>,<{http://www.w3.org/2000/09/xmldsig#}SignatureProperties>,<{http://www.w3.org/2000/09/xmldsig#}SignatureProperty>,<{http://www.w3.org/2000/09/xmldsig#}SignatureValue>,<{http://www.w3.org/2000/09/xmldsig#}SignedInfo>,<{http://www.w3.org/2000/09/xmldsig#}Transform>,<{http://www.w3.org/2000/09/xmldsig#}Transforms>,<{http://www.w3.org/2000/09/xmldsig#}X509Data>,<{}exportRegradeFault>,<{}exportRegradeRequest>,<{}exportRegradeResponse>,<{}forwardFault>,<{}forwardRequest>,<{}forwardResponse>,<{}getDocFault>,<{}getDocRequest>,<{}getDocResponse>,<{}getLabelsFault>,<{}getLabelsRequest>,<{}getLabelsResponse>,<{}notifyFault>,<{}notifyRequest>,<{}notifyResponse>,<{}releaseFault>,<{}releaseRequest>,<{}releaseResponse>
> at
>com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(UnmarshallingContext.java:523)
>
>
>
>The document is as follows:
>
><?xml version="1.0" encoding="UTF-8"?>
><jbfsa:getDocRequest xmlns:ds="http://www.w3.org/2000/09/xmldsig#";
>xmlns:ism="urn:us:gov:ic:ism:v2"
>xmlns:jbfsa="urn:us:gov:dod:army:cerdec:jbfsa:csds:r1"
>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>xsi:schemaLocation="urn:us:gov:dod:army:cerdec:jbfsa:csds:r1
>C:\data\JBFSA\r1\csds_src\config\csds_msgs.xsd">
> <jbfsa:Time >2006-12-17T09:30:47.0Z</jbfsa:Time>
> <jbfsa:Item >
> <jbfsa:ReleaseAuth
>nonce="UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi" >
> <jbfsa:AuthorityID >dbs</jbfsa:AuthorityID>
> <jbfsa:RecipientID >mesh_high</jbfsa:RecipientID>
> <jbfsa:DocRef alg="SHA-256"
> >UjBsR09EbGhjZ0dTQUxNQUFBUUNBRU1tQ1p0dU1GUXhEUzhi</jbfsa:DocRef>
> <jbfsa:Time >2006-10-25T09:30:47.0Z</jbfsa:Time>
> <ds:Signature ><ds:SignedInfo ><ds:CanonicalizationMethod
>Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#WithComments";
>/><ds:SignatureMethod
>Algorithm="http://www.w3.org/2000/09/xmldsig#dsa-sha1"; /><ds:Reference
> ><ds:Transforms ><ds:Transform
>Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature";
>/><ds:Transform Algorithm="http://www.w3.org/2002/06/xmldsig-filter2";
> ><ds:XPath Filter="intersect"
>xmlns:ds="http://www.w3.org/2002/06/xmldsig-filter2">jbfsa:ReleaseAuth</ds:XPath></ds:Transform></ds:Transforms><ds:DigestMethod
>Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"; /><ds:DigestValue
> >2jmj7l5rSw0yVb/vlWAYkK/YBwk=</ds:DigestValue></ds:Reference></ds:SignedInfo><ds:SignatureValue >fHZkk1yEkHj1d+PKlgDtvx6QLexSaiY6u+UPisHyR3/w5xnfrI2H8Q==</ds:SignatureValue><ds:KeyInfo ><ds:KeyName >dbs</ds:KeyName></ds:KeyInfo></ds:Signature></jbfsa:ReleaseAuth>
> </jbfsa:Item>
></jbfsa:getDocRequest>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>
>
>
>
>
>
>____________________________________________________________________________________
>Do you Yahoo!?
>Everyone is raving about the all-new Yahoo! Mail beta.
>http://new.mail.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>
>
>
>