2011-04-29 25 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。