I'm trying to consume a php webservice from .NET. In PHP the call would be something like this:
// array with guest information
$extrainfo = array(
'voorletters' => 'T.e.s.t.',
'voornaam' => '',
'tussenvoegsels' => '',
'achternaam' => 'Baker',
'rekeningnummer' => '123456789',
'website' => 'www.bla.nl',
'geboortedatum' => '19-2-1985',
'telefoon_extra_restnummer' => '',
'straat' => '',
'huisnummer' => '',
'huisnummer_toevoeging' => '',
'postcode' => '',
'woonplaats' => '',
);
// add guest
$result = $client_cart->setGuest('MySessionID', 'test@test.nl',$extrainfo);
If I generate a proxy in Microsoft .NET using the wsdl, the 'setGuest' operation takes three parameters as expected. A string (sessionID), a string (mail address) and a parameter of type 'object' (extra info).
I've tried to create a custom class to pass the extra info from .NET, create an instance, populate it and pass the it as a serialized object but then the PHP webservice complains that it expects an array in stead of an object. I've also tried to pass the guest information as a Dictionary:
Dictionary<string, string> dict = new Dictionary<string, string>();
dict.Add("voorletters", "T.e.s.t.");
dict.Add("voornaam", "");
dict.Add("tussenvoegsels", "");
dict.Add("achternaam", "Baker");
...
object obj = _proxyService.setGuest("MySessionID", "test@test.nl", dict.ToArray());
But then the PHP web service complains that no extra information is received.
So my question is; how do I pass the guest information as a parameter using the proxy that is generated in .NET?