Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Blog
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • DataMiner Insights
      • Security
      • System Architecture
      • DataMiner Releases & Updates
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

500 Internal Server error when tyring to run this webservice call ExecuteAutomationScriptWithOutput

Solved433 views15th January 2025C++ SOAP WebService
0
Curtis Baiden [DevOps Advocate]494 12th December 2024 1 Comment

web service error: System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Script.CallWebService(XmlDocument xmlDocSoapEnvelope, String uriSoap) (Script ‘WebAPIv1_RequestWithSoapBody’)

What are some common reasons why this happens so I know how best to debug my code. This is done with soap.

Curtis Baiden [DevOps Advocate] Selected answer as best 15th January 2025
Curtis Baiden [DevOps Advocate] commented 12th December 2024

or if anyone can give an example of how to use the soap method ExecuteAutomationScriptWithOutput in a soap envelope do share

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Wout Mahieu [SLC] [DevOps Catalyst]7.54K Posted 13th December 2024 7 Comments

Hi Curtis

It is difficult to say what exactly goes wrong for the request you are sending. Most likely there is a formatting issue in the SOAP or in the headers. What is the actual error you are receiving? There should be a faultcode & faultstring available in the response from the server.

I have an example here that executes a script with 1 parameter:

<soap:Envelope xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:soap=”http://schemas.xmlsoap.org/soap/envelope/”>
  <soap:Body>
    <ExecuteAutomationScriptWithOutput  xmlns=”http://www.skyline.be/api/v1″>
      <connection>CONNECTION_GUID</connection>
      <script>
        <Name>Echo</Name>
        <Folder></Folder>
        <Description></Description>
        <Settings>
          <RequireInteractive>false</RequireInteractive>
          <HasFindInteractiveClient>false</HasFindInteractiveClient>
        </Settings>
        <Parameters>
          <DMAAutomationScriptParameter>
            <ParameterId>1</ParameterId>
            <Values xsi:nil=”true” />
            <MemoryFile></MemoryFile>
            <Name>param1</Name>
            <Value>test</Value>
          </DMAAutomationScriptParameter>
        </Parameters>
        <Dummies>
        </Dummies>
        <MemoryFiles>
        </MemoryFiles>
      </script>
      <scriptOptions>
        <WaitForScript>true</WaitForScript>
        <CheckSets>true</CheckSets>
        <LockElements>false</LockElements>
        <ForceLockElements>false</ForceLockElements>
        <WaitWhenLocked>true</WaitWhenLocked>
        <IsInUse>false</IsInUse>
        <AskForConfirmation>false</AskForConfirmation>
      </scriptOptions>
    </ExecuteAutomationScriptWithOutput >
  </soap:Body>
</soap:Envelope>

Curtis Baiden [DevOps Advocate] Selected answer as best 15th January 2025
Curtis Baiden [DevOps Advocate] commented 16th December 2024

This is my soap body but I am still getting a 500 error. Is there anything that you think I have done wrong here.

<ExecuteAutomationScriptWithOutput xmlns="http://www.skyline.be/api/v1"&gt;
<connection>xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx</connection>
<script>
<Name>GetHistoricalAlarms</Name>
<Folder></Folder>
<Description></Description>
<Settings>
<RequireInteractive>false</RequireInteractive>
<HasFindInteractiveClient>false</HasFindInteractiveClient>
</Settings>
<Parameters>
<DMAAutomationScriptParameter>
<ParameterId>1</ParameterId>
<Values xsi:nil="true" />
<MemoryFile></MemoryFile>
<Name>lStartTime</Name>
<Value>1727195089000</Value>
</DMAAutomationScriptParameter>
<DMAAutomationScriptParameter>
<ParameterId>2</ParameterId>
<Values xsi:nil="true" />
<MemoryFile></MemoryFile>
<Name>lEndTime</Name>
<Value>1727195329000</Value>
</DMAAutomationScriptParameter>
<DMAAutomationScriptParameter>
<ParameterId>3</ParameterId>
<Values xsi:nil="true" />
<MemoryFile></MemoryFile>
<Name>sIncludeInformationEvents</Name>
<Value>false</Value>
</DMAAutomationScriptParameter>
<DMAAutomationScriptParameter>
<ParameterId>4</ParameterId>
<Values xsi:nil="true" />
<MemoryFile></MemoryFile>
<Name>sIncludeEntireAlarmTree</Name>
<Value>false</Value>
</DMAAutomationScriptParameter>
<DMAAutomationScriptParameter>
<ParameterId>5</ParameterId>
<Values xsi:nil="true" />
<MemoryFile></MemoryFile>
<Name>sJoinedSeverities</Name>
<Value></Value>
</DMAAutomationScriptParameter>
</Parameters>
<Dummies></Dummies>
<MemoryFiles></MemoryFiles>
</script>
<scriptOptions>
<WaitForScript>true</WaitForScript>
<CheckSets>true</CheckSets>
<LockElements>false</LockElements>
<ForceLockElements>false</ForceLockElements>
<WaitWhenLocked>true</WaitWhenLocked>
<IsInUse>false</IsInUse>
<AskForConfirmation>false</AskForConfirmation>
</scriptOptions>

</ExecuteAutomationScriptWithOutput>

Just to point out, my remote script has no description and is located in the default Automation Scripts folder

Wout Mahieu [SLC] [DevOps Catalyst] commented 16th December 2024

Hi Curtis, there doesn't seem to be anything wrong with the XML at first sight. Can you share what error message you receive with the error 500?

Curtis Baiden [DevOps Advocate] commented 16th December 2024

web service error: System.Net.WebException: The remote server returned an error: (500) Internal Server Error.
at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
at Script.CallWebService(XmlDocument xmlDocSoapEnvelope, String uriSoap) (Script 'XXXXXXX')

Wout Mahieu [SLC] [DevOps Catalyst] commented 17th December 2024

This looks like the error that is thrown by your code calling the SOAP endpoint. Is there anything inside the actual response that causes the error? You can check this by catching the error and looking at the InnerException/Message/Response properties of the WebException (https://learn.microsoft.com/en-us/dotnet/api/system.net.webexception?view=net-9.0#properties).

Curtis Baiden [DevOps Advocate] commented 17th December 2024

okay will try to catch the error but want to as. Is there anything I will need to set in the script being triggered remotely for it to be able to send an output

Show 2 more comments
Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs