Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 83142

Get SOAP Respons using C#

$
0
0
 Hello, I'm currently building a page in C# which makes contact with my Mendix webservice. I have done this before, but now I constantly get an error and I don't know why. Is there somebody who could help me? My webservice documentation is here: https://mhchbs.mxapps.io/ws-doc/Published_web_service/VoorkeurCreate Here is my C# code: public void CreateNew() { int LidNr = (int)(Session["vrijwilliger"]); HttpWebRequest request = CreateWebRequest(); XmlDocument soapEnvelopeXml = new XmlDocument(); soapEnvelopeXml.LoadXml(String.Format(@"{0}{1}{2}{3}{4}{5}", DropDownList1.SelectedValue.ToString(), LidNr, DropDownList5.SelectedValue.ToString(), DropDownList2.SelectedValue.ToString(), DropDownList4.SelectedValue.ToString(), DropDownList3.SelectedValue.ToString())); using (Stream stream = request.GetRequestStream()) { soapEnvelopeXml.Save(stream); } using (WebResponse response = request.GetResponse()) { using (StreamReader rd = new StreamReader(response.GetResponseStream())) { string soapResult = rd.ReadToEnd(); } } } And this is the error I constantly get:  com.mendix.integration.WebserviceException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'LidNr'. One of '{Derde}' is expected. PS. I am also wandering why Mendix changes the order of the parameters of the SOAP call

Viewing all articles
Browse latest Browse all 83142

Trending Articles



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