2011-04-29 24 views
0

這裏是我的代碼目前,找不到一種製作這種編譯的方式,爲什麼不這樣做?錯誤:發射器故障未定義綁定WSDL文檔中的<MusicBinding>

任何幫助,將不勝感激。

感謝李威肖

<xsd:schema 
targetNamespace="urn:Music" 
xmlns="http://www.w3.org/2001/XMLSchema">    <!-- start schema --> 

    <complexType name="trackDetail">    <!-- start 'trackDetail' type --> 
    <sequence>           <!-- start fields --> 
     <element name="discNumber" type="xsd:integer"/>   <!-- 'disc' field --> 
     <element name="trackNumber" type="xsd:integer"/>  <!-- 'track' field --> 
     <element name="composerName" type="xsd:string"/>  <!-- 'composer' field --> 
     <element name="workName" type="xsd:string"/>   <!-- 'work' field --> 
     <element name="titleName" type="xsd:string"/>   <!-- 'title' field --> 
    </sequence>           <!-- end fields --> 
    </complexType>        <!-- end 'trackDetail' type --> 

</xsd:schema>           <!-- end schema --> 

<operation name="getByComposer">    <!-- start 'getByComposer' operation --> 

    <documentation>      <!-- start 'getByComposer' documentation --> 
    The approve operation takes a search with a composers name, 
    and returns the details about the track. 
    </documentation>      <!-- end 'getByComposer' documentation --> 

    <input message="getByComposerMessage"/>   <!-- input of 'getByComposer' --> 
    <output message="resultMessage"/>    <!-- output of 'result' --> 
    <fault name="notFound" message="errorMessage"/> 
            <!-- fault 'notFound' message 'error' --> 
</operation>        <!-- end 'getByComposer' operation --> 


<operation name="getByDisc">    <!-- start 'getByDisc' operation --> 

    <documentation>      <!-- start 'getByDisc' documentation --> 
    The approve operation takes a search with a disk number, 
    and returns the details about the track. 
    </documentation>      <!-- end 'getByDisc' documentation --> 

    <input message="getByDiscMessage"/>   <!-- input of 'getByDisc' --> 
    <output message="resultMessage"/>    <!-- output of 'result' --> 
    <fault name="notFound" message="errorMessage"/> 
            <!-- fault 'notFound' message 'error' --> 
</operation>        <!-- end 'getByDisc' operation --> 

<soap:binding style="rpc" 
    transport="http://schemas.xmlsoap.org/soap/http"/> <!-- rpc binding --> 

<operation name="getByComposer">    <!-- start 'getByComposer' operation --> 
    <soap:operation soapAction=""/>     <!-- empty SOAP action --> 
    <input>         <!-- start 'getByComposer' binding --> 
    <soap:body use="literal" namespace="urn:Music" 
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
                <!-- literal encoding --> 
    </input>         <!-- end 'search' binding --> 
    <output>          <!-- start 'result' binding --> 
    <soap:body use="literal" namespace="urn:Music" 
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
                <!-- literal encoding --> 
    </output>          <!-- end 'result' binding --> 
    <fault name="notFound">     <!-- start 'notFound' binding --> 
    <soap:fault use="literal" namespace="urn:Music" 
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
                <!-- literal encoding --> 
    </fault>         <!-- end 'notFound' binding --> 
</operation>        <!-- end 'getByComposer' operation --> 

<operation name="getByDisc">    <!-- start 'getByDisc' operation --> 
    <soap:operation soapAction=""/>     <!-- empty SOAP action --> 
    <input>         <!-- start 'getByDisc' binding --> 
    <soap:body use="literal" namespace="urn:Music" 
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
                <!-- literal encoding --> 
    </input>         <!-- end 'search' binding --> 
    <output>          <!-- start 'result' binding --> 
    <soap:body use="literal" namespace="urn:Music" 
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
                <!-- literal encoding --> 
    </output>          <!-- end 'result' binding --> 
    <fault name="notFound">     <!-- start 'notFound' binding --> 
    <soap:fault use="literal" namespace="urn:Music" 
    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/> 
                <!-- literal encoding --> 
    </fault>         <!-- end 'notFound' binding --> 
</operation>        <!-- end 'getByDisc' operation --> 

<documentation>      <!-- start 'music' documentation --> 
    This is a music search service that returns a tracks details based on the 
    composers name or disk number. 
</documentation>     
<!-- end 'music' documentation --> 

<port name="musicPort" binding="MusicBinding"> 
               <!-- start 'music' port --> 
    <soap:address 
    location="http://localhost:8080/active-bpel/services/MusicPort"/> 
                 <!-- SOAP address --> 
</port>           <!-- end 'music' port --> 

回答

1

你綁定元素需要有name屬性,這個名字ATTRIB需要在端口元素中引用ute。然而這個引用必須是一個QName,所以它應該是類似於「tns:MusicBinding」的地方,其中tns綁定了WSDL的targetNamespace。