Za preuzimanje ASCII fajla sa NBS znam. To radi i nije problem. Mene zanima kako to uraditi upotrebom SOAP-a i WSDL fajla na osnovu kojeg u delfiju možeš napraviti unit sa opisom metoda kojim možeš pristupiti web servisu.
Mene zanimaju baš web servisi, a ovaj WSDL fajl koji su oni dali, ima čini mi se samo metode za autentifikaciju i jednu za preuzimanje trenutno aktuelne kursne liste. Ne bi trebalo da bude nikakav problem nekom ko je radio sa SOAP-om.
WSDL izgleda ovako:
-----------------------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:soap="
http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="
http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="
http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="
http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="
http://www.nbs.rs/TempExchangeRatesService" xmlns:s="
http://www.w3.org/2001/XMLSchema" xmlns:soap12="
http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="
http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="
http://www.nbs.rs/TempExchangeRatesService" xmlns:wsdl="
http://schemas.xmlsoap.org/wsdl/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="
http://www.nbs.rs/TempExchangeRatesService">
<s:element name="GetCurrentExchangeRates">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="nExchangeRatesListTypeID" type="s:decimal" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetCurrentExchangeRatesResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetCurrentExchangeRatesResult">
<s:complexType>
<s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
<s:element name="AuthenticationHeader" type="tns:AuthenticationHeader" />
<s:complexType name="AuthenticationHeader">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="UserName" type="s:string" />
<s:element minOccurs="0" maxOccurs="1" name="Password" type="s:string" />
<s:element minOccurs="1" maxOccurs="1" name="LicenceID" type="s:long" />
</s:sequence>
<s:anyAttribute />
</s:complexType>
<s:element name="GetCurrentExchangeRatesXML">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="nExchangeRatesListTypeID" type="s:decimal" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="GetCurrentExchangeRatesXMLResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="GetCurrentExchangeRatesXMLResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="GetCurrentExchangeRatesSoapIn">
<wsdl:part name="parameters" element="tns:GetCurrentExchangeRates" />
</wsdl:message>
<wsdl:message name="GetCurrentExchangeRatesSoapOut">
<wsdl:part name="parameters" element="tns:GetCurrentExchangeRatesResponse" />
</wsdl:message>
<wsdl:message name="GetCurrentExchangeRatesAuthenticationHeader">
<wsdl:part name="AuthenticationHeader" element="tns:AuthenticationHeader" />
</wsdl:message>
<wsdl:message name="GetCurrentExchangeRatesXMLSoapIn">
<wsdl:part name="parameters" element="tns:GetCurrentExchangeRatesXML" />
</wsdl:message>
<wsdl:message name="GetCurrentExchangeRatesXMLSoapOut">
<wsdl:part name="parameters" element="tns:GetCurrentExchangeRatesXMLResponse" />
</wsdl:message>
<wsdl:message name="GetCurrentExchangeRatesXMLAuthenticationHeader">
<wsdl:part name="AuthenticationHeader" element="tns:AuthenticationHeader" />
</wsdl:message>
<wsdl:portType name="TempExchangeRatesServiceSoap">
<wsdl:operation name="GetCurrentExchangeRates">
<wsdl:input message="tns:GetCurrentExchangeRatesSoapIn" />
<wsdl:output message="tns:GetCurrentExchangeRatesSoapOut" />
</wsdl:operation>
<wsdl:operation name="GetCurrentExchangeRatesXML">
<wsdl:input message="tns:GetCurrentExchangeRatesXMLSoapIn" />
<wsdl:output message="tns:GetCurrentExchangeRatesXMLSoapOut" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="TempExchangeRatesServiceSoap" type="tns:TempExchangeRatesServiceSoap">
<soap:binding transport="
http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetCurrentExchangeRates">
<soap:operation soapAction="
http://www.nbs.rs/TempExchange...ervice/GetCurrentExchangeRates" style="document" />
<wsdl:input>
<soap:body use="literal" />
<soap:header message="tns:GetCurrentExchangeRatesAuthenticationHeader" part="AuthenticationHeader" use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetCurrentExchangeRatesXML">
<soap:operation soapAction="
http://www.nbs.rs/TempExchange...ice/GetCurrentExchangeRatesXML" style="document" />
<wsdl:input>
<soap:body use="literal" />
<soap:header message="tns:GetCurrentExchangeRatesXMLAuthenticationHeader" part="AuthenticationHeader" use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="TempExchangeRatesServiceSoap12" type="tns:TempExchangeRatesServiceSoap">
<soap12:binding transport="
http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="GetCurrentExchangeRates">
<soap12:operation soapAction="
http://www.nbs.rs/TempExchange...ervice/GetCurrentExchangeRates" style="document" />
<wsdl:input>
<soap12:body use="literal" />
<soap12:header message="tns:GetCurrentExchangeRatesAuthenticationHeader" part="AuthenticationHeader" use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="GetCurrentExchangeRatesXML">
<soap12:operation soapAction="
http://www.nbs.rs/TempExchange...ice/GetCurrentExchangeRatesXML" style="document" />
<wsdl:input>
<soap12:body use="literal" />
<soap12:header message="tns:GetCurrentExchangeRatesXMLAuthenticationHeader" part="AuthenticationHeader" use="literal" />
</wsdl:input>
<wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="TempExchangeRatesService">
<wsdl:port name="TempExchangeRatesServiceSoap" binding="tns:TempExchangeRatesServiceSoap">
<soap:address location="
http://webservices.nbs.yu/Comm.../TempExchangeRatesService.asmx" />
</wsdl:port>
<wsdl:port name="TempExchangeRatesServiceSoap12" binding="tns:TempExchangeRatesServiceSoap12">
<soap12:address location="
http://webservices.nbs.yu/Comm.../TempExchangeRatesService.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
-----------------------------------------------------------------
Pozdrav