这是我目前的代码,找不到这种编译方式,任何想法为什么不呢?
任何帮助都将不胜感激。
感谢Lee Wishaw
<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 -->
答案 0 :(得分:1)
您的绑定元素需要具有name属性,需要在port元素中引用此name属性。但是这个引用需要是一个QName,所以它应该像“tns:MusicBinding”,其中tns绑定到WSDL的targetNamespace。