EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Post request to WebApi service by TElHTTPSClient

Posted: 03/08/2016 08:43:22
by Ben Divsalar (Basic support level)
Joined: 03/08/2016
Posts: 4

I am trying to send a POST request to a restful webApi service but I am stuck where to put the resource address.
My WebApi controller has a Route and I can post request using SoapUI like below:
EndPoint(url): https://myurl.net/webApiService
Resource: /api/routeName
content: <xml> <../> </xml>

I have set OnCertificateValidate method to return true.

I dont know where to set the resource "/api/routeName" to let the post to pick up the right method. I have tried all different options like concatenating to the url (Which I get 500) and if I don't pass it I will get the webapi home page source html.

I looked at the sample codes, HTTPS Get/POST but couldn't find similar to what I need.

I am using TElHTTPSClient like below (I also looked at TElRESTClient but again couldnt figure out where to pass the resource address)

var client = new TElHTTPSClient
                HTTPVersion = TSBHTTPVersion.hvHTTP11;,
                UseSSLSessionResumption = false,
                SocketTimeout = 60000,
                RequestParameters =
                    UserAgent = "UserAgent",
                    Connection = "Keep-Alive",
                    Host = "myurl.net",
                    ContentType = "text/xml"

using (var outputStream = new MemoryStream())
                client.OutputStream = outputStream;
                var httpCode = client.Post(url, postData);  
      if (httpCode == 200)
                    outputStream.Position = 0;
                    var sr = new StreamReader(outputStream);
                    return sr.ReadToEnd();
                return string.Empty;


Posted: 03/08/2016 08:47:04
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

I’ve noticed there is no Support Access Ticket linked to your user account on EldoS site. Technical Support is provided to customers with the linked Support Access Ticket. You will find your Support Access Ticket together with all the details about how to use it in the registration e-mail that we’ve sent to you upon the purchase.

If you are evaluating the product and don't have a license yet, please let us know and then you can have support according to Basic support level. Basic support level includes answering basic technical questions that appear during product evaluation period. We also offer Premium support for a purchase from https://www.eldos.com/support/calc.php . You can use Premium Support to get higher level of assistance during your evaluation of our products.
Posted: 03/08/2016 09:24:49
by Ben Divsalar (Basic support level)
Joined: 03/08/2016
Posts: 4

I am evaluating the product to see if I can get it to work. It would be great if you provide some basic support based on my question above.


Posted: 03/08/2016 09:31:09
by Eugene Mayevski (Team)

Unfortunately we also can only guess how SoapUI handles that "Route" parameter. Do you have a description of the particular REST API to which you are trying to connect? It would be much easier to go that route and implement what's required by the receiver side, rather than guess what a third-party product does.

Sincerely yours
Eugene Mayevski
Posted: 03/08/2016 09:36:34
by Ben Divsalar (Basic support level)
Joined: 03/08/2016
Posts: 4

I found the issue, it started to work since I changed the content type to JSON and concatenating the the endpoint to url

Thanks for your help anyway



Topic viewed 2241 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!