0

I'm trying to model a complex Business Object (named Prenda) that contains an attribute of the same type of the object (Prenda) using JDeveloper 11g.

This is my xsd:

<?xml version="1.0" encoding="UTF-8"?>
<?bpmo version="11.1.1" build="6.84" fullName="Mx.Org.Frd.Bo.Prenda" modifiers="0"?>
<!--########################################################################################-->
<!--####                                                                                ####-->
<!--####          THIS IS AN AUTO GENERATED FILE. PLEASE DO NOT MANUALLY MODIFY         ####-->
<!--#### CHANGES TO THIS FILE MAY PRODUCE UNEXPECTED BEHAVIOR AND WOULD BE OVERWRITTEN  ####-->
<!--####                                                                                ####-->
<!--########################################################################################-->
<xs:schema targetNamespace="http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Prenda" xmlns:xs="http://www.w3.org/2001/XMLSchema"  xmlns:ns3="http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Reloj"  xmlns:ns2="http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Metal"  xmlns:ns1="http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Diamante"  xmlns="http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Prenda"  xmlns:bpmo="http://xmlns.oracle.com/bpm/bpmobject/" >
    <xs:import namespace="http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Reloj" schemaLocation="Reloj.xsd"/>
    <xs:import namespace="http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Diamante" schemaLocation="Diamante.xsd"/>
    <xs:import namespace="http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Metal" schemaLocation="Metal.xsd"/>
    <xs:import namespace="http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Prenda" schemaLocation="Prenda.xsd"/>
    <xs:complexType name="PrendaType">
        <xs:sequence>
            <xs:element name="id" nillable="true" type="xs:long"/>
            <xs:element name="valor" nillable="true" type="xs:decimal"/>
            <xs:element name="precioVenta" nillable="true" type="xs:decimal"/>
            <xs:element name="fechaCreacion" nillable="true" type="xs:dateTime"/>
            <xs:element name="fechaModificacion" nillable="true" type="xs:dateTime"/>
            <xs:element name="tipoPrenda" nillable="true" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        <bpmo:documentable>
                            <bpmo:description>
                                prenda, grupo, elemento
                            </bpmo:description>
                        </bpmo:documentable>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="tipoElemento" nillable="true" type="xs:string">
                <xs:annotation>
                    <xs:documentation>
                        <bpmo:documentable>
                            <bpmo:description>
                                diamante, metal
                            </bpmo:description>
                        </bpmo:documentable>
                    </xs:documentation>
                </xs:annotation>
            </xs:element>
            <xs:element name="diamante" type="ns1:DiamanteType"/>
            <xs:element name="metal" type="ns2:MetalType"/>
            <xs:element name="reloj" type="ns3:RelojType"/>
            <xs:element name="padre" type="PrendaType"/>
        </xs:sequence>
    </xs:complexType>
    <xs:element name="Prenda" type="PrendaType"/>
</xs:schema>

But I'm having troubles to deploy the composite because of the attribute padre is of the same type: PrendaType as my whole object. I'm getting this error:

Caused by: oracle.fabric.common.wsdl.XSDException: oracle.xml.parser.schema.XSDException: imported namespace "http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Prenda" must different from  namespace "http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Prenda" [Cause=imported namespace "http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Prenda" must different from  namespace "http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Prenda"]
        at oracle.fabric.common.wsdl.SchemaManager.buildXDKSchema(SchemaManager.java:384)
        at oracle.fabric.common.wsdl.SchemaManager.lookupSchema(SchemaManager.java:216)
        at oracle.fabric.common.wsdl.SchemaManager.lookupXSDElementDeclaration(SchemaManager.java:399)
        at com.collaxa.cube.xml.xsd.SchemaToXML.generateXMLElement(SchemaToXML.java:367)

Any idea how to do this?, I was thinking into something like heritage but the IDE doesn't show options to extends the XSD, so I don't know if it is possible.

thanks

alfredozn
  • 314
  • 3
  • 16

1 Answers1

0

Just remove the import statement

<xs:import namespace="http://xmlns.oracle.com/bpm/bpmobject/Mx/Org/Frd/Bo/Prenda" schemaLocation="Prenda.xsd"/>

and you shoud be fine