Oracle Service Bus(11.1.1.6.0):<xsd:include> issue </xsd:include>

时间:2012-05-02 13:43:08

标签: include osb

如果我使用此架构:

<?xml version="1.0" encoding="UTF-8"?>
 <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified">
<xsd:element name="Chick">
   <xsd:complexType>
        <xsd:sequence>
            <xsd:element name="count" type="xsd:decimal" />
        </xsd:sequence>
    </xsd:complexType>
</xsd:element>
</xsd:schema>

使用此wsdl:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://www.example.org/test/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="test"
xmlns:chi="chick"
targetNamespace="http://www.example.org/test/">
<wsdl:types>
    <xsd:schema targetNamespace="http://www.example.org/test/">
        <xsd:include schemaLocation="testschema.xsd"></xsd:include>
        <xsd:include  id="ada" schemaLocation="testschema.xsd" />
        <xsd:element name="doTheRightThing">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element ref="Chick" />
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
        <xsd:element name="doTheRightThingResponse">
            <xsd:complexType>
                <xsd:sequence>
                    <xsd:element name="out" type="xsd:string" />
                </xsd:sequence>
            </xsd:complexType>
        </xsd:element>
    </xsd:schema>
</wsdl:types>
<wsdl:message name="doTheRightThingRequest">
    <wsdl:part element="tns:doTheRightThing" name="parameters" />
</wsdl:message>
<wsdl:message name="doTheRightThingResponse">
    <wsdl:part element="tns:doTheRightThingResponse" name="parameters" />
</wsdl:message>
<wsdl:portType name="test">
    <wsdl:operation name="doTheRightThing">
        <wsdl:input message="tns:doTheRightThingRequest" />
        <wsdl:output message="tns:doTheRightThingResponse" />
    </wsdl:operation>
</wsdl:portType>
<wsdl:binding name="testSOAP" type="tns:test">
    <soap:binding style="document"
        transport="http://schemas.xmlsoap.org/soap/http" />
    <wsdl:operation name="doTheRightThing">
        <soap:operation
            soapAction="http://www.example.org/test/doTheRightThing" />
        <wsdl:input>
            <soap:body use="literal" />
        </wsdl:input>
        <wsdl:output>
            <soap:body use="literal" />
        </wsdl:output>
    </wsdl:operation>
</wsdl:binding>
<wsdl:service name="test">
    <wsdl:port binding="tns:testSOAP" name="testSOAP">
        <soap:address location="http://www.example.org/" />
    </wsdl:port>
</wsdl:service>
    </wsdl:definitions>

我收到此错误消息:

为WSDL构建Schema Type系统时出错: D:\ Oracle \ Middleware_11.1.1.6.0 \ user_projects \ domains \ osb_cookbook_domain \ test:0:错误:src-resolve.a:找不到元素'Chick'。你的意思是引用名为Chick @ http://www.example.org/test/(在testschema中)的元素吗?

如果我在wsdl中更改此行:

 <xsd:element ref="Chick" />

到此:

 <xsd:element ref="tns:Chick" />

我无法部署,OEPE返回此错误消息:

WSDL在语义上没有效果:错误:src-resolve:element'Chick @ http://www.example.org/test/'not found ..

这是一个错误吗?

1 个答案:

答案 0 :(得分:0)

Patch 14003546解决了这个问题:

带有嵌入式模式的WSDL包括无名称失败的确认