2009-06-12 133 views
0

我想要使用Weblogic 10.3 clientgen ant任務(包裝wsimport)來使用第三方WSDL。在這樣做時,我得到了以下錯誤:定義消息部分(wsdl:part)時,是否可以使用消息類型屬性'type'來引用wsdl:fault?

[clientgen] [ERROR] in message "JobSubmissionErrorFault", part "exception" must specify a "element" attribute

下面是WSDL我想消費的一個子集(名字已更改爲保護無辜者)

<?xml version="1.0" encoding="UTF-8"?> 
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
       xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 
       xmlns:xsd="http://www.w3.org/2001/XMLSchema"     
       xmlns:asjx="urn:XXXXX:XML:AAA:2006/01:Types" 
       xmlns:tns="urn:XXXXX:Central:2006/01:AAAService" 
       targetNamespace="urn:XXXXX:Central:2006/01:AAAService"> 
<wsdl:types> 
<xsd:schema elementFormDefault="qualified" 
      targetNamespace="urn:XXXXX:XML:AAA:2006/01:Types"> 

    <xsd:element name="SubmitRequest"> 
    <xsd:complexType> 
     <xsd:sequence> 
     <xsd:element name="Type" type="xsd:string" form="unqualified"/> 
     <xsd:element name="Definition" type="xsd:string" form="unqualified"/> 
     </xsd:sequence> 
    </xsd:complexType> 
    </xsd:element> 
    <xsd:element name="SubmitResponse"> 
    <xsd:complexType> 
     <xsd:sequence> 
     <xsd:element name="JobResult" type="asjx:JobResultType" form="unqualified"/> 
     </xsd:sequence> 
    </xsd:complexType> 
    </xsd:element> 

    <xsd:complexType name="JobSubmissionErrorFaultType"> 
    <xsd:sequence> 
     <xsd:element name="Detail" type="xsd:string" /> 
    </xsd:sequence> 
    </xsd:complexType> 

</xsd:schema> 

這是WSDL有效嗎?當有問題的元素是wsdl:fault時,可以使用wsdl:part'type'嗎?我已經看過規格,有點困惑。

望着這link它的出現使用類型無效

以下link如果它是有效的不明確或不被窩裏

最後下面的地鐵錯誤link(Weblogic的10.3用於地鐵)不確認這是否是一個問題(它仍在辯論中)。

如果任何人都能夠一勞永逸地確認,如果使用'類型'是爲wsdl:錯誤valied它將不勝感激。

回答

1

取決於你問的問題。根據W3,沒關係,但WS-I的人們不同意。

WS-I: (BP2113) The soapbind:header, soapbind:headerfault or soapbind:fault elements refer to wsd:part element(s) that are not defined using only the "element" attribute.

相關問題