【问题标题】:Modeling recursive Business Object in Oracle SOA Suite 11g在 Oracle SOA Suite 11g 中建模递归业务对象
【发布时间】:2011-05-07 11:14:42
【问题描述】:

我正在尝试使用 JDeveloper 11g 对包含与对象 (Prenda) 相同类型的属性的复杂业务对象(名为 Prenda)进行建模。

这是我的 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>

但是我在部署复合时遇到了麻烦,因为属性 padre 属于同一类型:PrendaType 作为我的整个对象。我收到此错误:

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)

知道如何做到这一点吗?我正在考虑类似遗产的东西,但 IDE 没有显示扩展 XSD 的选项,所以我不知道这是否可能。

谢谢

【问题讨论】:

    标签: xml soa oracle11g business-objects


    【解决方案1】:

    只需删除导入语句

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

    你应该没事

    【讨论】:

      猜你喜欢
      • 2016-07-07
      • 1970-01-01
      • 2014-09-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-17
      • 2012-02-12
      相关资源
      最近更新 更多