Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

How to generate a API Response from respective request API in .Net?

Dear Team,

I need to pass the API request(XML, object, json etc) of the T24 wsdl and on consuming the same in .Net using c#, I want to get the response as needed for the request XML or so we passed.

I want to integrate this into our c# application and get the response XML as required from the tool for the respective request XML .

In below code need to get the Response Xml from the tool Runscope . Awaiting a response asap

Core code is as below:

strXMLRequest - Request Xml

strXMLResponse- Response Xml

CHANNEL- Channel Passed

ReqSend- Method in the WSDL file.

T24 Connecting Url

public string ReqSend(StringBuilder strXMLRequest, string CHANNEL)
{
string strXMLResponse = string.Empty;
try
{
T24ConnectorService t24connect = new T24ConnectorService();
try
{
string strURL = ConfigurationManager.AppSettings["T24Connector.T24Connector"].ToString();
t24connect.Url = strURL;
}
catch
{ }
strXMLResponse = t24connect. ReqSend(CHANNEL, strXMLRequest.ToString());
}
catch (Exception ex)
{

            throw ex;
        }
        return strXMLResponse;
    }
Tagged:

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited April 2018

    In below code need to get the Response Xml from the tool Runscope

    Instead of writing C# code to get something from Runscope, have you considered using Parasoft Virtualize exclusively? Virtualize can record and consume traffic to and from your service endpoint, and optionally consume the WSDL which describes your service endpoint, to produce highly intelligent virtual assets, all without writing a single line of code! Or are you asking about how to integrate Parasoft Virtualize with Runscope in some way? Please clarify in case this helps someone in the Parasoft forum community better answer your question.

Tagged