已取得乙方服務的wsdl文件,但由於一些原因導致網路不通又必須一邊開發一邊測試,
是否能夠在自己的測試環境中
藉由這個WSDL
部屬一個對方的模擬服務??
這是在C#加入參考報的錯誤https://ithelp.ithome.com.tw/upload/images/20190805/20113932PJxCcENep9.jpg
WSDL文件內容
不確定是否能公開其內容
所以將部分code取代掉
<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" name="服務名稱" targetNamespace="http://tempuri.org/">
<wsdl:types>
<xsd:schema targetNamespace="http://tempuri.org/Imports">
<xsd:import schemaLocation="http://localhost/ELNCo2_ConsultanAPI/服務名稱?xsd=xsd0" namespace="http://tempuri.org/"/>
<xsd:import schemaLocation="http://localhost/ELNCo2_ConsultanAPI/服務名稱.svc?xsd=xsd1" namespace="http://schemas.microsoft.com/2003/10/Serialization/"/>
<xsd:import schemaLocation="http://localhost/ELNCo2_ConsultanAPI/服務名稱.svc?xsd=xsd2" namespace="Systemweb.Core.Entities"/>
<xsd:import schemaLocation="http://localhost/ELNCo2_ConsultanAPI/服務名稱.svc?xsd=xsd3" namespace="http://schemas.datacontract.org/2004/07/Systemweb.Core.Entities"/>
<xsd:import schemaLocation="http://localhost/ELNCo2_ConsultanAPI/服務名稱.svc?xsd=xsd4"/>
<xsd:import schemaLocation="http://localhost/ELNCo2_ConsultanAPI/服務名稱.svc?xsd=xsd5" namespace="Systemweb.TIPS.WCF.FundServices.Contract.Entity"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="服務名稱_GetUUID_InputMessage">
<wsdl:part name="parameters" element="tns:GetUUID"/>
</wsdl:message>
<wsdl:message name="服務名稱_GetUUID_OutputMessage">
<wsdl:part name="parameters" element="tns:GetUUIDResponse"/>
</wsdl:message>
<wsdl:message name="服務名稱_ForeignCurrencyTrade_InputMessage">
<wsdl:part name="parameters" element="tns:ForeignCurrencyTrade"/>
</wsdl:message>
<wsdl:message name="服務名稱_ForeignCurrencyTrade_OutputMessage">
<wsdl:part name="parameters" element="tns:ForeignCurrencyTradeResponse"/>
</wsdl:message>
<wsdl:message name="服務名稱_ForeignCurrencyTradeResult_InputMessage">
<wsdl:part name="parameters" element="tns:ForeignCurrencyTradeResult"/>
</wsdl:message>
<wsdl:message name="服務名稱_ForeignCurrencyTradeResult_OutputMessage">
<wsdl:part name="parameters" element="tns:ForeignCurrencyTradeResultResponse"/>
</wsdl:message>
<wsdl:portType name="服務名稱">
<wsdl:operation name="GetUUID">
<wsdl:input wsaw:Action="http://tempuri.org/服務名稱/GetUUID" message="tns:服務名稱_GetUUID_InputMessage"/>
<wsdl:output wsaw:Action="http://tempuri.org/服務名稱/GetUUIDResponse" message="tns:服務名稱_GetUUID_OutputMessage"/>
</wsdl:operation>
<wsdl:operation name="ForeignCurrencyTrade">
<wsdl:input wsaw:Action="http://tempuri.org/服務名稱/ForeignCurrencyTrade" message="tns:IKGIBankService_ForeignCurrencyTrade_InputMessage"/>
<wsdl:output wsaw:Action="http://tempuri.org/IKGIBankService/ForeignCurrencyTradeResponse" message="tns:服務名稱_ForeignCurrencyTrade_OutputMessage"/>
</wsdl:operation>
<wsdl:operation name="ForeignCurrencyTradeResult">
<wsdl:input wsaw:Action="http://tempuri.org/服務名稱/ForeignCurrencyTradeResult" message="tns:IKGIBankService_ForeignCurrencyTradeResult_InputMessage"/>
<wsdl:output wsaw:Action="http://tempuri.org/服務名稱/ForeignCurrencyTradeResultResponse" message="tns:IKGIBankService_ForeignCurrencyTradeResult_OutputMessage"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_服務名稱" type="tns:IKGIBankService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="GetUUID">
<soap:operation soapAction="http://tempuri.org/服務名稱/GetUUID" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ForeignCurrencyTrade">
<soap:operation soapAction="http://tempuri.org/服務名稱/ForeignCurrencyTrade" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="ForeignCurrencyTradeResult">
<soap:operation soapAction="http://tempuri.org/服務名稱/ForeignCurrencyTradeResult" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="服務名稱">
<wsdl:port name="BasicHttpBinding_服務名稱" binding="tns:BasicHttpBinding_服務名稱">
<soap:address location="http://localhost/ELNCo2_ConsultanAPI/服務名稱.svc"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>