Any idea what the delphi equivilant of this is?
public Object[] WebServiceMethodName(object context)
{
IDictionary<string, object> contextDictionary = (IDictionary<string,
object>)context;
Many thanks
Nick
> Any idea what the delphi equivilant of this is?
>
> public Object[] WebServiceMethodName(object context)
Are you consuming a web service?
--
Craig Stuntz [TeamB] · Vertex Systems Corp. · Columbus, OH
Delphi/InterBase Weblog : http://blogs.teamb.com/craigstuntz
Want to help make Delphi and InterBase better? Use QC!
http://qc.borland.com -- Vote for important issues
> Heres the C# webservice I'm trying to copy.
Do you have WSDL for that? Consume the WSDL and see what types Delphi
spits out.
> Are you consuming a web service?
No - trying to write a webservice that meets a certain format.
Heres the C# webservice I'm trying to copy.
[WebMethod]
public RadComboBoxItemData[] WebServiceMethodName(object context)
{
IDictionary<string, object> contextDictionary = (IDictionary<string,
object>)context;
List<RadComboBoxItemData> result = new List<RadComboBoxItemData>(1);
RadComboBoxItemData itemData = new RadComboBoxItemData();
itemData.Text = contextDictionary["FilterString"].ToString();
itemData.Value = contextDictionary["FilterString"].ToString();
result.Add(itemData);
}
I've created a type ComboBoxItems = array of RadComboBoxItem for my return
type.
I just need to translate
IDictionary<string, object> contextDictionary = (IDictionary<string,
object>)context;
Thanks
Nick
I've found the answer.
I was trying to translate
IDictionary<string, object> contextDictionary = (IDictionary<string,
object>)context;
as
var
contextDictionary: IDictionary<string, system.&object>;
begin
contextDictionary := Context as IDictionary<string, system.&Object>;
This gave errors at various points until I added system.collections.generics
to the uses clause.
Now works ok.
Many thanks
Nick