You need to reference the type in a new type definition. If I add the following group/type definitions to the jboss_5_0.xsd:
<xsd:group name="resourceGroup"> <xsd:sequence> <xsd:element name="mapped-name" type="javaee:xsdStringType" minOccurs="0"> </xsd:element> <xsd:element name="injection-target" type="jboss:injection-targetType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:group> <xsd:complexType name="injection-targetType"> <xsd:sequence> <xsd:element name="injection-target-class" type="javaee:fully-qualified-classType"/> <xsd:element name="injection-target-name" type="javaee:java-identifierType"/> </xsd:sequence> </xsd:complexType> <xsd:group name="descriptionGroup"> <xsd:sequence> <xsd:element name="description" type="javaee:descriptionType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="display-name" type="javaee:display-nameType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="icon" type="javaee:iconType" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:group>
<?xml version="1.0" encoding="UTF-8"?> <jboss xmlns="http://www.jboss.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee file:/tmp/xsd/jboss_5_0.xsd" version="3.0"> <enterprise-beans> <service> <ejb-name>ServiceSix</ejb-name> <ejb-class>org.jboss.ejb3.test.service.ServiceSix</ejb-class> <object-name>object name</object-name> <local>org.jboss.ejb3.test.service.ServiceSixLocal</local> <remote>org.jboss.ejb3.test.service.ServiceSixRemote</remote> <management>org.jboss.ejb3.test.service.ServiceSixManagement</management> <xmbean>xmbean</xmbean> <remote-binding> <client-bind-url>client bind url</client-bind-url> </remote-binding> <jndi-name>serviceSix/remote</jndi-name> <local-jndi-name>serviceSix/local</local-jndi-name> <ejb-ref> <ejb-ref-name>ejb/StatelessBean</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <remote>org.jboss.ejb3.test.service.StatelessRemote</remote> <ejb-link>StatelessBean</ejb-link> <injection-target> <injection-target-class>org.jboss.ejb3.test.service.ServiceSix</injection-target-class> <injection-target-name>stateless</injection-target-name> </injection-target> <jndi-name>StatelessBean/remote</jndi-name> </ejb-ref> <ejb-local-ref> <ejb-ref-name>ejb/StatelessLocal</ejb-ref-name> <ejb-ref-type>Session</ejb-ref-type> <local>org.jboss.ejb3.test.service.StatelessLocal</local> <ejb-link>StatelessBean</ejb-link> <injection-target> <injection-target-class>org.jboss.ejb3.test.service.ServiceSix</injection-target-class> <injection-target-name>setStatelessLocal</injection-target-name> </injection-target> <local-jndi-name>StatelessBean/local</local-jndi-name> </ejb-local-ref> <resource-ref> <res-ref-name>testDatasource</res-ref-name> <res-type>javax.sql.DataSource</res-type> <res-auth>Container</res-auth> <res-sharing-scope>Shareable</res-sharing-scope> <mapped-name>java:/DefaultDS</mapped-name> <injection-target> <injection-target-class>org.jboss.ejb3.test.service.ServiceSix</injection-target-class> <injection-target-name>testDatasource</injection-target-name> </injection-target> </resource-ref> <resource-env-ref> <description>A test of the resource-env-ref tag</description> <resource-env-ref-name>res/aQueue</resource-env-ref-name> <resource-env-ref-type>javax.jms.Queue</resource-env-ref-type> <jndi-name>queue/mdbtest</jndi-name> </resource-env-ref> <security-domain>security domain</security-domain> <method-attributes> <method> <method-name>test</method-name> <transaction-timeout>1</transaction-timeout> </method> </method-attributes> </service> </enterprise-beans> </jboss>