Quantcast
Channel: WCF, ASMX and other Web Services
Viewing all articles
Browse latest Browse all 555

Error trying to consume SOAP webservice

$
0
0

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=''>.


Viewing all articles
Browse latest Browse all 555

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>