[jboss-dev-forums] [Design of JBossXB] - Re: problem parsing sip.xml with JBossXB

deruelle_jean do-not-reply at jboss.com
Thu Apr 30 08:18:24 EDT 2009


"alex.loubyansky at jboss.com" wrote : If that's a choice binding based on a super class then you could try:
  | ]

Not it is not. it is a substitution group. I tried anyway but I got 
Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: Requested element and is not allowed in this position in the sequence. The next element should be condition
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:203)
  | 	at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:168)
  | 	at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:199)
  | 	at org.jboss.deployers.vfs.spi.deployer.JBossXBDeployerHelper.parse(JBossXBDeployerHelper.java:170)
  | 	at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:132)
  | 	at org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer.parse(SchemaResolverDeployer.java:118)
  | 	at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parseAndInit(AbstractVFSParsingDeployer.java:256)
  | 	at org.jboss.deployers.vfs.spi.deployer.AbstractVFSParsingDeployer.parse(AbstractVFSParsingDeployer.java:188)
  | 	at org.jboss.deployers.spi.deployer.helpers.AbstractParsingDeployerWithOutput.createMetaData(AbstractParsingDeployerWithOutput.java:323)
  | 	... 22 more
  | Caused by: org.jboss.xb.binding.JBossXBRuntimeException: Requested element and is not allowed in this position in the sequence. The next element should be condition
  | 	at org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding$1.startElement(SequenceBinding.java:226)
  | 	at org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding$Cursor.startElement(ModelGroupBinding.java:185)
  | 	at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:397)
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:401)
  | 	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
  | 	at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
  | 	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
  | 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
  | 	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
  | 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  | 	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
  | 	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
  | 	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
  | 	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
  | 	at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:199)

I committed everything to SVN in case you want take a look at it.
But I think I find some tips after some time googling around :
http://java.sun.com/javaee/5/docs/api/javax/xml/bind/annotation/XmlElementRef.html Example 2
and
http://fusesource.com/docs/framework/2.1/jaxws/JAXWSElementSubstitutionJava.html

I hope this will help. If you have any similarity in JBoss metadata somewhere that would be helpful

Thanks in advance
Best regards
Jean

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4227857#4227857

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4227857



More information about the jboss-dev-forums mailing list