After submitting a form in my PHP application I store some values in an array like this
if(isset($_POST['submitArticle']))
{
$artikel = $_POST['article'];
$aantal = $_POST['quantity'];
$a=0;
$art = array();
$quan = array();
foreach($artikel as $key => $value)
{
$art[] = $artikel[$a];
$quan[] = $aantal[$a];
$a++;
}
$artikelArguments = array_combine($art, $quan);
Now I call a method in my C# application with my new array as an argument:
$client->getArticle($artikelArguments);
My method in C# looks something like this:
public List<string> getArticle(List<KeyValuePair<int, int>> articles)
{
//Get articles based on ID
foreach (KeyValuePair<int, int> art in articles)
{
Now articles is always null, so the values won't get passed, or C# can't handle my PHP array. Does someone have any suggestions?
Fatal error: Uncaught SoapFault exception: [a:InternalServiceFault]
List<KeyValuePair<int, int>>
, I would start by changing it toobject
and ensure that your c# method gets called. – row1WSDL
for thegetArticle
operation look? Can you post thewsdl:operation
tag contains? – gfish3000