Witam,
Próbuję pobrać menu sklepu na platformie IAI za pomocą API. Niestety przy próbie pobrania menu pojawia się błąd:
"Additional information: Error in deserializing body of reply message for operation 'getMenu'."
Szukając odpowiedzi w google natrafiłem na informacje by powiekszyć parametry maxArrayLength i maxNameTableCharCount w pliku App.config. Niestety ustawienie ich nawet na maksymalną wartość nie naprawia błędu. Poniżej zamieszczam mój kod:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.ServiceModel;
using LF_Menu_Language.ServiceReference1;
namespace LF_Menu_Language {
class Program {
static void Main(string[] args) {
var binding = new BasicHttpBinding();
var address = new EndpointAddress("http://domena.iai-shop.com/api/?gate=menu/getMenu/43/soap");
var client = new ServiceReference1.ApiMenuPortTypeClient(binding, address);
var request = new ServiceReference1.getMenuRequestType();
request.authenticate = new ServiceReference1.authenticateType();
request.authenticate.system_key = WebApiSystemKey.GenerateKey(WebApiSystemKey.HashPassword("password"));
request.authenticate.system_login = "login";
request.@params = new ServiceReference1.getMenuParamsType();
[email protected]_id = 1;
[email protected]_idSpecified = true;
[email protected]_id = 1;
[email protected]_idSpecified = true;
[email protected]_id = "pol";
[email protected]_id = 1;
[email protected]_idSpecified = true;
[email protected] = 1;
[email protected] = true;
request.settings = new settingsType();
request.settings.textid_separator = "->";
request.settings = new ServiceReference1.settingsType();
ServiceReference1.getMenuResponseType response = client.getMenu(request);
System.Console.WriteLine("Koniec");
}
}
}
Pytanie co zrobić by pozbyć się błędu?