none
Error trying to consume Dolibarr SOAP webservice RRS feed

  • Question

  • Hello,

     I am getting the following error when trying to receive a products list from a SOAP webservice. The code and error details are as follows. It seems there is an error when deserializing the xml response. Is there a configuration that needs to be done or other solution? Thanks a lot for your help.

    private

    voidGetProducts1(stringlogin, stringpassword)

            {

                WebReference2.WebServicesDolibarrProductOrService client =

    newWebReference2.WebServicesDolibarrProductOrService();

                WebReference2.authentication authentication =

    newWebReference2.authentication();

                authentication.login = login;

                authentication.password = password;

                WebReference2.ProductsArray2 products1;

                WebReference2.filterproduct fp =

    newWebReference2.filterproduct();

                client.getListOfProductsOrServices(authentication, fp,

    outproducts1);

            }

    The error is as follows:

    System.InvalidOperationException
      HResult=0x80131509
      Message=There is an error in XML document (1, 750).
      Source=System.Xml
      StackTrace:
       at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at Consumewebservice.WebReference2.WebServicesDolibarrProductOrService.getListOfProductsOrServices(authentication authentication, filterproduct filterproduct, ProductsArray2& products) in

    Inner Exception 1:
    InvalidOperationException: The specified type was not recognized: name=':', namespace='', at <products xmlns=''>.


    Thursday, July 12, 2018 5:33 AM

All replies