[REBOL] SOAP
From: gchiu:compkarori at: 12-Jun-2001 10:59
Hope this formats okay :-)
Grabs the current exchange rate for England/Japan, and taken
from http://www.xmethods.com.
Oh, and I have no idea how SOAP works !
Rebol []
do http://www.compkarori.co.nz/reb/http-tools-beta.r
soap-url: http://services.xmethods.net/soap
soap-request: {<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">
<SOAP-ENV:Body>
<ns1:getRate xmlns:ns1="urn:xmethods-CurrencyExchange"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<country1 xsi:type="xsd:string">England</country1>
<country2 xsi:type="xsd:string">Japan</country2>
</ns1:getRate>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>}
replace/all soap-request newline ""
tmp: http-tools/soap soap-url reduce [ "" soap-request ]
parse tmp/content [ thru <Result xsi:type='xsd:float'> copy
result to </Result> to end (print [ "England/Japan Exchange
rate: " result] ) ]
--
Graham Chiu