for days I testing a little Application, which shall be read a SPList by webservice and show the content. Unfortunately it don´t work. I get always the same failure:
System.Web.Services.Protocols.SoapException: Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
bei System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
bei System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
bei NeuerTestWebservice_4_2.webserviceSCC.Lists.GetListItems(String listName, String viewName, XmlNode query, XmlNode viewFields, String rowLimit, XmlNode queryOptions, String webID) in d:\VisualStudio2012\WebserviceTests\NeuerTestWebservice_4_2\NeuerTestWebservice_4_2\Web References\webserviceSCC\Reference.cs:Zeile 455.
bei NeuerTestWebservice_4_2.Form1.btnFill_Click(Object sender, EventArgs e) in d:\VisualStudio2012\WebserviceTests\NeuerTestWebservice_4_2\NeuerTestWebservice_4_2\Form1.cs:Zeile 30.
My webreference looks like this: http://rootwebsite.de/_vti_bin/Lists.asmx?wsdl/soap (ok - at the moment this is one site, but i want choose the website and Lists later) This is my code:
...
private void btnFill_Click(object sender, EventArgs e)
{
try
{
webserviceSCC.Lists service = new webserviceSCC.Lists();
service.UseDefaultCredentials = true;
XmlNode nodes = service.GetList("Inhalts- und Strukturberichte"); //don´t get a failure, if I add "?wsdl/soap" to the Webservice-Referenz ("/_vti_bin/Lists.asmx?wsdl/soap")
XmlNode listItems = service.GetListItems("Inhalts- und Strukturberichte", "Alle Elemente", null, null, "100", null, null); //here (GetListItems) I get the failure always
//XmlNode listItems = service.GetListItems("Inhalts- und Strukturberichte", null, null, viewFields, null, null, null);
...
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
}
I had test different webservice-references. Have you an idea, because I get the failure? Have you an good Example for me?
thanks.
thank you. The url I had tested before - there isn´t a change at the failure. I get this failure, too:
Exception:Thrown: "Die Datei oder Assembly "NeuerTestWebservice_4_2.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden." (System.IO.FileNotFoundException) A System.IO.FileNotFoundException was thrown: "Die Datei oder Assembly "NeuerTestWebservice_4_2.XmlSerializers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden."
directly after initializing of webservice: webserviceSCC_Sys.Lists service = new webserviceSCC_Sys.Lists(); Helps this information?