├── .gitignore ├── phpunit.xml ├── .travis.yml ├── composer.json ├── LICENSE.md ├── .github └── workflows │ └── main.yaml ├── src ├── SoapRequest.php ├── Interpreter.php └── Soap.php ├── README.md └── tests ├── InterpreterTest.php └── wsdl ├── airport.wsdl └── currency.wsdl /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | /build/ 3 | composer.lock 4 | .idea/ 5 | .DS_Store -------------------------------------------------------------------------------- /phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | tests/ 5 | 6 | 7 | 8 | 9 | src 10 | 11 | 12 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: php 2 | 3 | php: 4 | - 5.4 5 | - 5.5 6 | - 5.6 7 | - 7.0 8 | 9 | before_install: 10 | - composer self-update 11 | 12 | install: 13 | - composer install 14 | 15 | script: 16 | - php vendor/bin/phpunit --coverage-clover=coverage.xml 17 | 18 | after_success: 19 | - bash <(curl -s https://codecov.io/bash) 20 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "meng-tian/php-soap-interpreter", 3 | "description": "A PHP library for interpreting SOAP messages.", 4 | "keywords": ["SOAP"], 5 | "license": "MIT", 6 | "authors": [ 7 | { 8 | "name": "Meng Tian", 9 | "email": "tianmeng94@hotmail.com" 10 | } 11 | ], 12 | "require": { 13 | "php": ">=7.1.0" 14 | }, 15 | "require-dev": { 16 | "phpunit/phpunit": "~7.0|~9.3" 17 | }, 18 | "autoload": { 19 | "psr-4": {"Meng\\Soap\\": "src/"} 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Meng Tian 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /.github/workflows/main.yaml: -------------------------------------------------------------------------------- 1 | name: CI 2 | 3 | on: [push, pull_request] 4 | 5 | jobs: 6 | test: 7 | strategy: 8 | matrix: 9 | operating-system: [ubuntu-latest] 10 | php-versions: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] 11 | 12 | runs-on: ${{ matrix.operating-system }} 13 | 14 | steps: 15 | - name: Checkout 16 | uses: actions/checkout@v2 17 | 18 | - name: Setup PHP, with composer and extensions 19 | uses: shivammathur/setup-php@v2 20 | with: 21 | php-version: ${{ matrix.php-versions }} 22 | 23 | - name: Get composer cache directory 24 | id: composer-cache 25 | run: echo "::set-output name=dir::$(composer config cache-files-dir)" 26 | 27 | - name: Cache composer dependencies 28 | uses: actions/cache@v2 29 | with: 30 | path: ${{ steps.composer-cache.outputs.dir }} 31 | key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} 32 | restore-keys: ${{ runner.os }}-composer- 33 | 34 | - name: Install Composer dependencies 35 | run: | 36 | composer install --no-progress --prefer-dist --optimize-autoloader 37 | 38 | - name: Run Tests 39 | run: vendor/bin/phpunit --coverage-text -------------------------------------------------------------------------------- /src/SoapRequest.php: -------------------------------------------------------------------------------- 1 | endpoint = $endpoint; 21 | $this->soapAction = $soapAction; 22 | $this->soapVersion = $soapVersion; 23 | $this->soapMessage = $soapMessage; 24 | } 25 | 26 | /** 27 | * @return string 28 | */ 29 | public function getEndpoint() 30 | { 31 | return $this->endpoint; 32 | } 33 | 34 | /** 35 | * @return string 36 | */ 37 | public function getSoapAction() 38 | { 39 | return $this->soapAction; 40 | } 41 | 42 | /** 43 | * @return string 44 | */ 45 | public function getSoapVersion() 46 | { 47 | return $this->soapVersion; 48 | } 49 | 50 | /** 51 | * @return string 52 | */ 53 | public function getSoapMessage() 54 | { 55 | return $this->soapMessage; 56 | } 57 | } -------------------------------------------------------------------------------- /src/Interpreter.php: -------------------------------------------------------------------------------- 1 | soap = new Soap($wsdl, $options); 18 | } 19 | 20 | /** 21 | * Interpret the given method and arguments to a SOAP request message. 22 | * 23 | * @param string $function_name The name of the SOAP function to interpret. 24 | * @param array $arguments An array of the arguments to $function_name. 25 | * @param array $options An associative array of options. 26 | * The location option is the URL of the remote Web service. 27 | * The uri option is the target namespace of the SOAP service. 28 | * The soapaction option is the action to call. 29 | * @param mixed $input_headers An array of headers to be interpreted along with the SOAP request. 30 | * @return SoapRequest 31 | */ 32 | public function request($function_name, array $arguments = [], array $options = null, $input_headers = null): SoapRequest 33 | { 34 | return $this->soap->request($function_name, $arguments, $options, $input_headers); 35 | } 36 | 37 | /** 38 | * Interpret a SOAP response message to PHP values. 39 | * 40 | * @param string $response The SOAP response message. 41 | * @param string $function_name The name of the SOAP function to interpret. 42 | * @param array $output_headers If supplied, this array will be filled with the headers from the SOAP response. 43 | * @return mixed 44 | * @throws \SoapFault 45 | */ 46 | public function response($response, $function_name, array &$output_headers = null) 47 | { 48 | return $this->soap->response($response, $function_name, $output_headers); 49 | } 50 | } -------------------------------------------------------------------------------- /src/Soap.php: -------------------------------------------------------------------------------- 1 | soapResponse) { 40 | return $this->soapResponse; 41 | } 42 | 43 | $this->endpoint = (string)$location; 44 | $this->soapAction = (string)$action; 45 | $this->soapVersion = (string)$version; 46 | $this->soapRequest = (string)$request; 47 | return ''; 48 | } 49 | 50 | public function request($function_name, $arguments, $options, $input_headers): SoapRequest 51 | { 52 | $this->__soapCall($function_name, $arguments, $options, $input_headers); 53 | return new SoapRequest($this->endpoint, $this->soapAction, $this->soapVersion, $this->soapRequest); 54 | } 55 | 56 | public function response($response, $function_name, &$output_headers) 57 | { 58 | $this->soapResponse = $response; 59 | try { 60 | $response = $this->__soapCall($function_name, [], null, null, $output_headers); 61 | } catch (\SoapFault $fault) { 62 | $this->soapResponse = null; 63 | throw $fault; 64 | } 65 | $this->soapResponse = null; 66 | return $response; 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PHP SOAP Interpreter [![codecov.io](https://codecov.io/github/meng-tian/php-soap-interpreter/coverage.svg?branch=master)](https://codecov.io/github/meng-tian/php-soap-interpreter?branch=master) ![workflow](https://github.com/meng-tian/php-soap-interpreter/actions/workflows/main.yaml/badge.svg) 2 | 3 | 4 | A PHP library for interpreting `SOAP 1.1` and `SOAP 1.2` messages. It can be used in WSDL or non-WSDL mode. The implementation is built on the top of PHP's [SoapClient](http://php.net/manual/en/class.soapclient.php). 5 | 6 | ### Prerequisite 7 | PHP 7.1 --enablelibxml --enable-soap 8 | 9 | ### Install 10 | ``` 11 | composer require meng-tian/php-soap-interpreter 12 | ``` 13 | 14 | ### Usage 15 | An `Interpreter` is responsible for generating SOAP request messages and translating SOAP response messages. The constructor of `Interpreter` class is the same as `SoapClient`. The first parameter is `wsdl`, the second parameter is an array of `options`. 16 | 17 | It should be noted that *not* all `options` supported by `SoapClient` are supported by `Interpreter`. The supported `options` of `Interpreter` are: `location`, `uri`, `style`, `use`, `soap_version`, `encoding`, `exceptions`, `classmap`, `typemap`, `cache_wsdl` and `features`. More detailed explanations of those options can be found in [SoapClient::SoapClient](http://php.net/manual/en/soapclient.soapclient.php). The unsupported options are related to debugging or HTTP transport, which are not the intended responsibility of `Interpreter`. 18 | 19 | ### Basic Examples 20 | ###### Generate SOAP request message in WSDL mode 21 | 22 | ```php 23 | $interpreter = new Interpreter('http://www.webservicex.net/length.asmx?WSDL'); 24 | $request = $interpreter->request( 25 | 'ChangeLengthUnit', 26 | [['LengthValue'=>'1', 'fromLengthUnit'=>'Inches', 'toLengthUnit'=>'Meters']] 27 | ); 28 | 29 | print_r($request->getSoapMessage()); 30 | ``` 31 | Output: 32 | ```xml 33 | 34 | 35 | 1InchesMeters 36 | 37 | ``` 38 | 39 | ###### Translate SOAP response message 40 | 41 | ```php 42 | $interpreter = new Interpreter('http://www.webservicex.net/length.asmx?WSDL'); 43 | $response = << 45 | 46 | 47 | 48 | 0.025400000000000002 49 | 50 | 51 | 52 | EOD; 53 | $response = $interpreter->response($response, 'ChangeLengthUnit'); 54 | 55 | print_r($response); 56 | ``` 57 | Output: 58 | ```php 59 | /* 60 | Output: 61 | stdClass Object 62 | ( 63 | [ChangeLengthUnitResult] => 0.0254 64 | ) 65 | */ 66 | ``` 67 | 68 | ### Advanced Examples 69 | ###### Generate SOAP request message in non-WSDL mode 70 | 71 | ```php 72 | // In non-WSDL mode, location and uri must be provided as they are required by SoapClient. 73 | $interpreter = new Interpreter(null, ['location'=>'http://www.webservicex.net/length.asmx', 'uri'=>'http://www.webserviceX.NET/']); 74 | $request = $interpreter->request( 75 | 'ChangeLengthUnit', 76 | [ 77 | new SoapParam('1', 'ns1:LengthValue'), 78 | new SoapParam('Inches', 'ns1:fromLengthUnit'), 79 | new SoapParam('Meters', 'ns1:toLengthUnit') 80 | ], 81 | ['soapaction'=>'http://www.webserviceX.NET/ChangeLengthUnit'] 82 | ); 83 | 84 | print_r($request->getSoapMessage()); 85 | ``` 86 | Output: 87 | ```xml 88 | 89 | 90 | 1InchesMeters 91 | 92 | 93 | ``` 94 | 95 | 96 | ###### SOAP input headers 97 | 98 | ```php 99 | $interpreter = new Interpreter('http://www.webservicex.net/CurrencyConvertor.asmx?WSDL'); 100 | $request = $interpreter->request('ConversionRate', [['FromCurrency' => 'AFA', 'ToCurrency' => 'ALL']], null, [new SoapHeader('www.namespace.com', 'test_header', 'header_data')]); 101 | print_r($request->getSoapMessage()); 102 | ``` 103 | Output: 104 | ```xml 105 | 106 | 107 | header_data 108 | AFAALL 109 | 110 | ``` 111 | 112 | ###### SOAP output headers 113 | TODO 114 | 115 | ###### Class map 116 | TODO 117 | 118 | ###### Type map 119 | TODO 120 | 121 | ### Relevant 122 | - [SOAP HTTP Binding](https://github.com/meng-tian/soap-http-binding): binding SOAP messages to PSR-7 HTTP messages. 123 | - [PHP Asynchronous SOAP](https://github.com/meng-tian/php-async-soap): asynchronous SOAP clients. 124 | 125 | ### License 126 | This library is released under [MIT](https://github.com/meng-tian/php-soap-interpreter/blob/master/LICENSE.md) license. 127 | 128 | -------------------------------------------------------------------------------- /tests/InterpreterTest.php: -------------------------------------------------------------------------------- 1 | request('ConversionRate', [['FromCurrency' => 'AFA', 'ToCurrency' => 'ALL']]); 15 | $this->assertEquals('http://www.webservicex.net/CurrencyConvertor.asmx', $request->getEndpoint()); 16 | $this->assertEquals('http://www.webserviceX.NET/ConversionRate', $request->getSoapAction()); 17 | $this->assertEquals('1', $request->getSoapVersion()); 18 | $this->assertNotEmpty($request->getSoapMessage()); 19 | $this->assertRegExp('/http:\/\/schemas\.xmlsoap\.org\/soap\/envelope\//', $request->getSoapMessage()); 20 | $this->assertRegExp('/ConversionRate/', $request->getSoapMessage()); 21 | $this->assertRegExp('/FromCurrency/', $request->getSoapMessage()); 22 | $this->assertRegExp('/AFA/', $request->getSoapMessage()); 23 | $this->assertRegExp('/ToCurrency/', $request->getSoapMessage()); 24 | $this->assertRegExp('/ALL/', $request->getSoapMessage()); 25 | } 26 | 27 | /** 28 | * @test 29 | */ 30 | public function requestWsdlObjectArguments() 31 | { 32 | $interpreter = new Interpreter(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wsdl' . DIRECTORY_SEPARATOR . 'currency.wsdl'); 33 | $rate = new ConversionRate; 34 | $rate->FromCurrency = 'AFA'; 35 | $rate->ToCurrency = 'ALL'; 36 | $request = $interpreter->request('ConversionRate', [$rate]); 37 | $this->assertEquals('http://www.webservicex.net/CurrencyConvertor.asmx', $request->getEndpoint()); 38 | $this->assertEquals('http://www.webserviceX.NET/ConversionRate', $request->getSoapAction()); 39 | $this->assertEquals('1', $request->getSoapVersion()); 40 | $this->assertNotEmpty($request->getSoapMessage()); 41 | $this->assertRegExp('/http:\/\/schemas\.xmlsoap\.org\/soap\/envelope\//', $request->getSoapMessage()); 42 | $this->assertRegExp('/ConversionRate/', $request->getSoapMessage()); 43 | $this->assertRegExp('/FromCurrency/', $request->getSoapMessage()); 44 | $this->assertRegExp('/AFA/', $request->getSoapMessage()); 45 | $this->assertRegExp('/ToCurrency/', $request->getSoapMessage()); 46 | $this->assertRegExp('/ALL/', $request->getSoapMessage()); 47 | } 48 | 49 | /** 50 | * @test 51 | */ 52 | public function requestWsdlInputHeaders() 53 | { 54 | $interpreter = new Interpreter(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wsdl' . DIRECTORY_SEPARATOR . 'currency.wsdl'); 55 | $request = $interpreter->request( 56 | 'ConversionRate', 57 | [['FromCurrency' => 'AFA', 'ToCurrency' => 'ALL']], 58 | null, 59 | [new SoapHeader('www.namespace.com', 'test_header', 'header_data')] 60 | ); 61 | $this->assertEquals('http://www.webservicex.net/CurrencyConvertor.asmx', $request->getEndpoint()); 62 | $this->assertEquals('http://www.webserviceX.NET/ConversionRate', $request->getSoapAction()); 63 | $this->assertEquals('1', $request->getSoapVersion()); 64 | $this->assertNotEmpty($request->getSoapMessage()); 65 | $this->assertRegExp('/http:\/\/schemas\.xmlsoap\.org\/soap\/envelope\//', $request->getSoapMessage()); 66 | $this->assertRegExp('/www\.namespace\.com/', $request->getSoapMessage()); 67 | $this->assertRegExp('/test_header/', $request->getSoapMessage()); 68 | $this->assertRegExp('/header_data/', $request->getSoapMessage()); 69 | $this->assertRegExp('/ConversionRate/', $request->getSoapMessage()); 70 | $this->assertRegExp('/FromCurrency/', $request->getSoapMessage()); 71 | $this->assertRegExp('/AFA/', $request->getSoapMessage()); 72 | $this->assertRegExp('/ToCurrency/', $request->getSoapMessage()); 73 | $this->assertRegExp('/ALL/', $request->getSoapMessage()); 74 | } 75 | 76 | /** 77 | * @test 78 | */ 79 | public function requestTypeMapToXML() 80 | { 81 | $interpreter = new Interpreter( 82 | dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wsdl' . DIRECTORY_SEPARATOR . 'currency.wsdl', 83 | [ 84 | 'typemap' => [ 85 | [ 86 | 'type_name' => 'ConversionRate', 87 | 'type_ns' => 'http://www.webserviceX.NET/', 88 | 'to_xml' => function() { 89 | return "OLDNEW"; 90 | } 91 | ] 92 | ] 93 | ] 94 | ); 95 | 96 | $request = $interpreter->request('ConversionRate', [[]]); 97 | $this->assertEquals('http://www.webservicex.net/CurrencyConvertor.asmx', $request->getEndpoint()); 98 | $this->assertEquals('http://www.webserviceX.NET/ConversionRate', $request->getSoapAction()); 99 | $this->assertEquals('1', $request->getSoapVersion()); 100 | $this->assertNotEmpty($request->getSoapMessage()); 101 | $this->assertRegExp('/http:\/\/schemas\.xmlsoap\.org\/soap\/envelope\//', $request->getSoapMessage()); 102 | $this->assertRegExp('/ConversionRate/', $request->getSoapMessage()); 103 | $this->assertRegExp('/FromCurrency/', $request->getSoapMessage()); 104 | $this->assertRegExp('/OLD/', $request->getSoapMessage()); 105 | $this->assertRegExp('/ToCurrency/', $request->getSoapMessage()); 106 | $this->assertRegExp('/NEW/', $request->getSoapMessage()); 107 | } 108 | 109 | /** 110 | * @test 111 | */ 112 | public function responseWsdl() 113 | { 114 | $responseMessage = << 116 | 117 | 118 | 119 | -1 120 | 121 | 122 | 123 | EOD; 124 | $interpreter = new Interpreter(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wsdl' . DIRECTORY_SEPARATOR . 'currency.wsdl'); 125 | $responseMessage = $interpreter->response($responseMessage, 'ConversionRate'); 126 | $this->assertInstanceOf('\StdClass', $responseMessage); 127 | $this->assertEquals(['ConversionRateResult' => '-1'], (array)$responseMessage); 128 | } 129 | 130 | /** 131 | * @test 132 | */ 133 | public function responseWsdlOutputHeaders() 134 | { 135 | $responseMessage = << 137 | 138 | 139 | 140 | 234 141 | 142 | 143 | 144 | 145 | -1 146 | 147 | 148 | 149 | EOD; 150 | $interpreter = new Interpreter(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wsdl' . DIRECTORY_SEPARATOR . 'currency.wsdl'); 151 | $outputHeaders = []; 152 | $responseMessage = $interpreter->response($responseMessage, 'ConversionRate', $outputHeaders); 153 | $this->assertInstanceOf('\StdClass', $responseMessage); 154 | $this->assertEquals(['ConversionRateResult' => '-1'], (array)$responseMessage); 155 | $this->assertNotEmpty($outputHeaders); 156 | } 157 | 158 | /** 159 | * @test 160 | */ 161 | public function responseWsdlClassMap() 162 | { 163 | $responseMessage = << 165 | 166 | 167 | 168 | -1 169 | 170 | 171 | 172 | EOD; 173 | $interpreter = new Interpreter(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wsdl' . DIRECTORY_SEPARATOR . 'currency.wsdl', ['classmap' => ['ConversionRateResponse' => '\ConversionRateResponse']]); 174 | $responseMessage = $interpreter->response($responseMessage, 'ConversionRate'); 175 | $this->assertInstanceOf('\ConversionRateResponse', $responseMessage); 176 | $this->assertEquals(['ConversionRateResult' => '-1'], (array)$responseMessage); 177 | } 178 | 179 | /** 180 | * @test 181 | */ 182 | public function responseTypeMapFromXML() 183 | { 184 | $responseMessage = << 186 | 187 | 188 | 189 | -1 190 | 191 | 192 | 193 | EOD; 194 | $interpreter = new Interpreter( 195 | dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wsdl' . DIRECTORY_SEPARATOR . 'currency.wsdl', 196 | [ 197 | 'typemap' => [ 198 | [ 199 | 'type_name' => 'ConversionRateResponse', 200 | 'type_ns' => 'http://www.webserviceX.NET/', 201 | 'from_xml' => function() { 202 | $rateResponse = new ConversionRateResponse; 203 | $rateResponse->MockedResult = 100; 204 | return $rateResponse; 205 | } 206 | ] 207 | ] 208 | ] 209 | ); 210 | 211 | $responseMessage = $interpreter->response($responseMessage, 'ConversionRate'); 212 | $this->assertInstanceOf('\ConversionRateResponse', $responseMessage); 213 | $this->assertEquals(['MockedResult' => 100], (array)$responseMessage); 214 | } 215 | 216 | /** 217 | * @test 218 | */ 219 | public function responseWsdlDisableExceptions() 220 | { 221 | $interpreter = new Interpreter(null, ['uri'=>'www.uri.com', 'location'=>'www.location.com', 'exceptions' => false]); 222 | $responseMessage = << 225 | 226 | 227 | SOAP-ENV:Server 228 | Server Error 229 | 230 | 231 | 232 | My application didn't work 233 | 234 | 235 | 1001 236 | 237 | 238 | 239 | 240 | 241 | 242 | EOD; 243 | $result = $interpreter->response($responseMessage, 'AnyMethod'); 244 | $this->assertInstanceOf('\SoapFault', $result); 245 | } 246 | 247 | /** 248 | * @test 249 | */ 250 | public function requestWsdlSoapV12() 251 | { 252 | $interpreter = new Interpreter(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wsdl' . DIRECTORY_SEPARATOR . 'airport.wsdl', ['soap_version' => SOAP_1_2]); 253 | $request = $interpreter->request('GetAirportInformationByCountry', [['country' => 'United Kingdom']]); 254 | $this->assertEquals('http://www.webservicex.net/airport.asmx', $request->getEndpoint()); 255 | $this->assertEquals('http://www.webserviceX.NET/GetAirportInformationByCountry', $request->getSoapAction()); 256 | $this->assertEquals('2', $request->getSoapVersion()); 257 | $this->assertNotEmpty($request->getSoapMessage()); 258 | $this->assertRegExp('/http:\/\/www\.w3\.org\/2003\/05\/soap-envelope/', $request->getSoapMessage()); 259 | $this->assertRegExp('/GetAirportInformationByCountry/', $request->getSoapMessage()); 260 | $this->assertRegExp('/country/', $request->getSoapMessage()); 261 | } 262 | 263 | /** 264 | * @test 265 | */ 266 | public function responseWsdlSoapV12() 267 | { 268 | $responseMessage = << 270 | 271 | 272 | 273 | <NewDataSet /> 274 | 275 | 276 | 277 | EOD; 278 | $interpreter = new Interpreter(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'wsdl' . DIRECTORY_SEPARATOR . 'airport.wsdl', ['soap_version' => SOAP_1_2]); 279 | $responseMessage = $interpreter->response($responseMessage, 'GetAirportInformationByCountry'); 280 | $this->assertEquals(['GetAirportInformationByCountryResult' => ''], (array)$responseMessage); 281 | } 282 | 283 | /** 284 | * @test 285 | */ 286 | public function requestWithoutWsdl() 287 | { 288 | $interpreter = new Interpreter(null, ['uri'=>'www.uri.com', 'location'=>'www.location.com']); 289 | $request = $interpreter->request('anything', [['one' => 'two', 'three' => 'four']]); 290 | $this->assertEquals('www.location.com', $request->getEndpoint()); 291 | $this->assertEquals('www.uri.com#anything', $request->getSoapAction()); 292 | $this->assertEquals('1', $request->getSoapVersion()); 293 | $this->assertRegExp('/one/', $request->getSoapMessage()); 294 | $this->assertRegExp('/two/', $request->getSoapMessage()); 295 | $this->assertRegExp('/three/', $request->getSoapMessage()); 296 | $this->assertRegExp('/four/', $request->getSoapMessage()); 297 | } 298 | 299 | /** 300 | * @test 301 | */ 302 | public function responseWithoutWsdl() 303 | { 304 | $responseMessage = << 306 | 307 | 308 | 309 | <NewDataSet /> 310 | 311 | 312 | 313 | EOD; 314 | $interpreter = new Interpreter(null, ['uri'=>'www.uri.com', 'location'=>'www.location.com', 'soap_version' => SOAP_1_2]); 315 | $responseMessage = $interpreter->response($responseMessage, 'GetAirportInformationByCountry'); 316 | $this->assertEquals('', $responseMessage); 317 | 318 | $responseMessage = << 320 | 321 | 322 | 323 | 234 324 | 325 | 326 | 327 | 328 | -1 329 | 330 | 331 | 332 | EOD; 333 | $interpreter = new Interpreter(null, ['uri'=>'www.uri.com', 'location'=>'www.location.com']); 334 | $outputHeaders = []; 335 | $responseMessage = $interpreter->response($responseMessage, 'ConversionRate', $outputHeaders); 336 | $this->assertEquals('-1', $responseMessage); 337 | $this->assertNotEmpty($outputHeaders); 338 | } 339 | 340 | /** 341 | * @test 342 | */ 343 | public function faultResponseNotAffectSubsequentRequests() 344 | { 345 | $interpreter = new Interpreter(null, ['uri'=>'www.uri.com', 'location'=>'www.location.com']); 346 | $responseMessage = << 349 | 350 | 351 | SOAP-ENV:Server 352 | Server Error 353 | 354 | 355 | 356 | My application didn't work 357 | 358 | 359 | 1001 360 | 361 | 362 | 363 | 364 | 365 | 366 | EOD; 367 | try { 368 | $interpreter->response($responseMessage, 'AnyMethod'); 369 | } catch (Exception $e) { 370 | } 371 | $request = $interpreter->request('AnyMethod'); 372 | $this->assertTrue($request instanceof SoapRequest); 373 | } 374 | } 375 | 376 | /** Test support only */ 377 | class ConversionRate 378 | { 379 | 380 | } 381 | 382 | /** Test support only */ 383 | class ConversionRateResponse 384 | { 385 | 386 | } 387 | -------------------------------------------------------------------------------- /tests/wsdl/airport.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by ISO country code 139 | 140 | 141 | 142 | 143 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by city or airport name 144 | 145 | 146 | 147 | 148 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by country name 149 | 150 | 151 | 152 | 153 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by airport code 154 | 155 | 156 | 157 | 158 | 159 | 160 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by ISO country code 161 | 162 | 163 | 164 | 165 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by city or airport name 166 | 167 | 168 | 169 | 170 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by country name 171 | 172 | 173 | 174 | 175 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by airport code 176 | 177 | 178 | 179 | 180 | 181 | 182 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by ISO country code 183 | 184 | 185 | 186 | 187 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by city or airport name 188 | 189 | 190 | 191 | 192 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by country name 193 | 194 | 195 | 196 | 197 | Get Airport Code, CityOrAirport Name, Country, Country Abbrv, CountryCode,GMT Offset Runway Length in Feet, Runway Elevation in Feet,Latitude in Degree,Latitude in Minute Latitude in Second,Latitude in N/S, Longitude in Degree, Longitude in Minute, Longitude in Seconds and longitude E/W by airport code 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | 361 | 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | 370 | 371 | 372 | -------------------------------------------------------------------------------- /tests/wsdl/currency.wsdl: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> 201 | 202 | 203 | 204 | 205 | 206 | 207 | <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> 208 | 209 | 210 | 211 | 212 | 213 | 214 | <br><b>Get conversion rate from one currency to another currency <b><br><p><b><font color='#000080' size='1' face='Verdana'><u>Differenct currency Code and Names around the world</u></font></b></p><blockquote><p><font face='Verdana' size='1'>AFA-Afghanistan Afghani<br>ALL-Albanian Lek<br>DZD-Algerian Dinar<br>ARS-Argentine Peso<br>AWG-Aruba Florin<br>AUD-Australian Dollar<br>BSD-Bahamian Dollar<br>BHD-Bahraini Dinar<br>BDT-Bangladesh Taka<br>BBD-Barbados Dollar<br>BZD-Belize Dollar<br>BMD-Bermuda Dollar<br>BTN-Bhutan Ngultrum<br>BOB-Bolivian Boliviano<br>BWP-Botswana Pula<br>BRL-Brazilian Real<br>GBP-British Pound<br>BND-Brunei Dollar<br>BIF-Burundi Franc<br>XOF-CFA Franc (BCEAO)<br>XAF-CFA Franc (BEAC)<br>KHR-Cambodia Riel<br>CAD-Canadian Dollar<br>CVE-Cape Verde Escudo<br>KYD-Cayman Islands Dollar<br>CLP-Chilean Peso<br>CNY-Chinese Yuan<br>COP-Colombian Peso<br>KMF-Comoros Franc<br>CRC-Costa Rica Colon<br>HRK-Croatian Kuna<br>CUP-Cuban Peso<br>CYP-Cyprus Pound<br>CZK-Czech Koruna<br>DKK-Danish Krone<br>DJF-Dijibouti Franc<br>DOP-Dominican Peso<br>XCD-East Caribbean Dollar<br>EGP-Egyptian Pound<br>SVC-El Salvador Colon<br>EEK-Estonian Kroon<br>ETB-Ethiopian Birr<br>EUR-Euro<br>FKP-Falkland Islands Pound<br>GMD-Gambian Dalasi<br>GHC-Ghanian Cedi<br>GIP-Gibraltar Pound<br>XAU-Gold Ounces<br>GTQ-Guatemala Quetzal<br>GNF-Guinea Franc<br>GYD-Guyana Dollar<br>HTG-Haiti Gourde<br>HNL-Honduras Lempira<br>HKD-Hong Kong Dollar<br>HUF-Hungarian Forint<br>ISK-Iceland Krona<br>INR-Indian Rupee<br>IDR-Indonesian Rupiah<br>IQD-Iraqi Dinar<br>ILS-Israeli Shekel<br>JMD-Jamaican Dollar<br>JPY-Japanese Yen<br>JOD-Jordanian Dinar<br>KZT-Kazakhstan Tenge<br>KES-Kenyan Shilling<br>KRW-Korean Won<br>KWD-Kuwaiti Dinar<br>LAK-Lao Kip<br>LVL-Latvian Lat<br>LBP-Lebanese Pound<br>LSL-Lesotho Loti<br>LRD-Liberian Dollar<br>LYD-Libyan Dinar<br>LTL-Lithuanian Lita<br>MOP-Macau Pataca<br>MKD-Macedonian Denar<br>MGF-Malagasy Franc<br>MWK-Malawi Kwacha<br>MYR-Malaysian Ringgit<br>MVR-Maldives Rufiyaa<br>MTL-Maltese Lira<br>MRO-Mauritania Ougulya<br>MUR-Mauritius Rupee<br>MXN-Mexican Peso<br>MDL-Moldovan Leu<br>MNT-Mongolian Tugrik<br>MAD-Moroccan Dirham<br>MZM-Mozambique Metical<br>MMK-Myanmar Kyat<br>NAD-Namibian Dollar<br>NPR-Nepalese Rupee<br>ANG-Neth Antilles Guilder<br>NZD-New Zealand Dollar<br>NIO-Nicaragua Cordoba<br>NGN-Nigerian Naira<br>KPW-North Korean Won<br>NOK-Norwegian Krone<br>OMR-Omani Rial<br>XPF-Pacific Franc<br>PKR-Pakistani Rupee<br>XPD-Palladium Ounces<br>PAB-Panama Balboa<br>PGK-Papua New Guinea Kina<br>PYG-Paraguayan Guarani<br>PEN-Peruvian Nuevo Sol<br>PHP-Philippine Peso<br>XPT-Platinum Ounces<br>PLN-Polish Zloty<br>QAR-Qatar Rial<br>ROL-Romanian Leu<br>RUB-Russian Rouble<br>WST-Samoa Tala<br>STD-Sao Tome Dobra<br>SAR-Saudi Arabian Riyal<br>SCR-Seychelles Rupee<br>SLL-Sierra Leone Leone<br>XAG-Silver Ounces<br>SGD-Singapore Dollar<br>SKK-Slovak Koruna<br>SIT-Slovenian Tolar<br>SBD-Solomon Islands Dollar<br>SOS-Somali Shilling<br>ZAR-South African Rand<br>LKR-Sri Lanka Rupee<br>SHP-St Helena Pound<br>SDD-Sudanese Dinar<br>SRG-Surinam Guilder<br>SZL-Swaziland Lilageni<br>SEK-Swedish Krona<br>TRY-Turkey Lira<br>CHF-Swiss Franc<br>SYP-Syrian Pound<br>TWD-Taiwan Dollar<br>TZS-Tanzanian Shilling<br>THB-Thai Baht<br>TOP-Tonga Pa'anga<br>TTD-Trinidad&amp;amp;Tobago Dollar<br>TND-Tunisian Dinar<br>TRL-Turkish Lira<br>USD-U.S. Dollar<br>AED-UAE Dirham<br>UGX-Ugandan Shilling<br>UAH-Ukraine Hryvnia<br>UYU-Uruguayan New Peso<br>VUV-Vanuatu Vatu<br>VEB-Venezuelan Bolivar<br>VND-Vietnam Dong<br>YER-Yemen Riyal<br>YUM-Yugoslav Dinar<br>ZMK-Zambian Kwacha<br>ZWD-Zimbabwe Dollar</font></p></blockquote> 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | --------------------------------------------------------------------------------