Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7764757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T14:59:47+00:00 2026-06-01T14:59:47+00:00

I am trying to do a SOAP request but the server is returning an

  • 0

I am trying to do a SOAP request but the server is returning an 500 error.
The SOAP request returns correctly the XML message via jmeter for example, so it must be something in my code, but i fail to see what. Can you help?

private void soapRequest(string regID)
        {

            string soapReq= @"<?xml version=""1.0"" encoding=""utf-8""?>";
            soapReq= "<soapenv:Envelope xmlns:soapenv=\"http://schemas.xmlsoap.org/soap/envelope/\" xmlns:mpc=\"urn://mobility-platform.de/mpcustomerdb/\">\n";
            soapReq += "<soapenv:Header/>\n";
            soapReq += "<soapenv:Body>\n";
            soapReq += "<mpc:findRegistrationByID>\n";
            soapReq += "<registrationID>" + regID + "</registrationID>\n";
            soapReq += "</mpc:findRegistrationByID>\n";
            soapReq += "</soapenv:Body>\n";
            soapReq += "</soapenv:Envelope>";

            //Builds the connection to the WebService.
            HttpWebRequest req = (HttpWebRequest)WebRequest.Create("http://url?wsdl");
            req.Credentials = new NetworkCredential("user", "pass");            
            req.Headers.Add("SOAP:Action");
            req.ContentType = "text/xml;charset=\"utf-8\"";
            req.Accept = "text/xml";
            req.Method = "POST";

            //Passes the SoapRequest String to the WebService
            using (Stream stm = req.GetRequestStream())
            {
                using (StreamWriter stmw = new StreamWriter(stm))
                {
                    stmw.Write(soapReq.ToString());                    
                }
            }
            try
            {
                //Gets the response
                HttpWebResponse soapResponse = (HttpWebResponse)req.GetResponse();
                //Writes the Response
                Stream responseStream = soapResponse.GetResponseStream();
                //read the stream
                XmlDocument soapResponseXML = new XmlDocument();

                StreamReader responseStreamRead = new StreamReader(responseStream);
                soapResponse.ContentType = "text/xml";
                //MessageBox.Show(responseStreamRead.ReadToEnd().ToString());
                string soapURL = responseStreamRead.ReadToEnd().ToString();

                soapResponseXML.LoadXml(soapURL);
            }
            catch (Exception ex)
            {                
                MessageBox.Show("Error: " + ex.Message);
            }
        }

Here is the soap request

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mpc="urn://mobility-platform.de/mpcustomerdb/">
   <soapenv:Header/>
   <soapenv:Body>
      <mpc:findRegistrationByID>
         <registrationID>2304580</registrationID>
      </mpc:findRegistrationByID>
   </soapenv:Body>
</soapenv:Envelope>

Later edit:
If i change

req.Headers.Add("SOAP:Action"); to:

req.Headers.Add("SOAPAction", ""\"http://url\"" + "findRegistrationByID");

i get an different error:
“This property is not implemented by this class”

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T14:59:48+00:00Added an answer on June 1, 2026 at 2:59 pm

    Is not very easy to make an proper soap request with this method. I am strongly recommending to use rather the whole web service, and rather make the request like this:

    WebService aa = new WebService;
    registrationName = aa.findRegistrationByID("123");
    

    This will accomplish all the above code 😉

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to send-retrive message from server by SOAP... but soapConnection.call( soapMessage, endpoint )
All, I am trying to HTTPS POST a SOAP request via PHP's cURL wrapper
hi i'm trying to make a soap request but i don't get any response.
I'm trying to authenticate a SOAP request using WS-UsernameToken spec, but the target device
I'm trying to send a SOAP request using SOAPpy as the client. I've found
Am trying to authenticate a soap webservice, but the SHA1 hash that I produce
I am trying to send a soap message to an external system, this system
I am trying to send a soap request to an open webservice (webserviceX.NET currency
I'm trying to create a http request to our web service, my test XML
I am trying to use the Bing SOAP API for a simple search request.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.