When you download SoapUI there is a nice example for a WSDL on currency....
this one: http://www.webservicex.com/currencyconvertor.asmx?WSDL
<wsdl:definitions 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.webserviceX.NET/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://www.webserviceX.NET/">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://www.webserviceX.NET/">
<s:element name="ConversionRate">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="FromCurrency" type="tns:Currency"/>
<s:element minOccurs="1" maxOccurs="1" name="ToCurrency" type="tns:Currency"/>
</s:sequence>
</s:complexType>
</s:element>
<s:simpleType name="Currency">
<s:restriction base="s:string">
<s:enumeration value="AFA"/>
<s:enumeration value="ALL"/>
<s:enumeration value="DZD"/>
<s:enumeration value="ARS"/>
<s:enumeration value="AWG"/>
<s:enumeration value="AUD"/>
<s:enumeration value="BSD"/>
<s:enumeration value="BHD"/>
<s:enumeration value="BDT"/>
<s:enumeration value="BBD"/>
<s:enumeration value="BZD"/>
<s:enumeration value="BMD"/>
<s:enumeration value="BTN"/>
On my PHP page I'd like to have all the in the dropdown box
like so:
<select name="eneagram" >
<option value="USD">USD</option>
<option value="JPY">JPY</option>
What i did manage to do was:
<?php
if(isset($_POST['getdata'])){
//$naam=$_POST['naam'];
//$date=$_POST['date'];
$type=$_POST['type'];
//$core=$_POST['core'];
//$management=$_POST['management'];
//$tools = json_encode($_POST['tools']);
//$tools=$_POST['tools'];
//$analytisch=$_POST['analytisch'];
$eneagram=$_POST['eneagram'];
try{
$soap_client = new
//SoapClient("http://www.webservicex.net/stockquote.asmx?WSDL");
SoapClient("http://www.webservicex.com/currencyconvertor.asmx?WSDL");
// $vec = array("symbol"=>"DOX");
$vec = array("FromCurrency"=>"$type", "ToCurrency"=>"$eneagram");
$quote = $soap_client->ConversionRate($vec);
echo $quote->ConversionRateResult;
}
catch(SoapFault $exception)
{
echo $exception->getMessage();
}
if(true == false ){
echo "<label class='err'>All fields are required</label>";
}
else{
}
?>
<script>alert('Calculated the conversion rate!');</script>
<?php }
}
?>
But now I think I need something of an foreach and then the get from wsdl and then the select option but I don't know exactly how to do it....