Solved

Testing of the web services

Posted on 2017-03-08
1
92 Views
Last Modified: 2017-03-12
I have  a method which insert record into the database using entity framework.
 We are build a Soap based web services. I would like to know how we are going to test
this web service as  project object  as a parameter. Any tool or any way to do that.


public IHttpActionResult PostProject(ProjectDTO project)
        {
            if (!ModelState.IsValid)
            {
                return BadRequest(ModelState);
            }

            Project entity = new Project()
            {
                ProjectNumber = project.ProjectNumber,
                ProjectDescription = project.ProjectDescription,
                CreateDate = DateTime.Now,
                CreateUser = project.CreateUser,
                Latitude = project.Latitude,
                Longitude = project.Longitude,
                ProjectStatus = project.ProjectStatus,
                HoursPerShift = project.HoursPerShift,
                TimeZone = project.TimeZone,
                StandByWBSElementNumber = project.StandByWBSElementNumber,
            };

            db.Projects.Add(entity);

            try
            {
                db.SaveChanges();
            }
            catch (DbUpdateException)
            {
                if (ProjectExists(project.ProjectNumber))
                {
                    return Conflict();
                }
                else
                {
                    throw;
                }
            }

Open in new window

0
Comment
Question by:roy_sanu
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 19

Accepted Solution

by:
Rikin Shah earned 500 total points
ID: 42039009
Hi,

Try SoapUI.

It gives you the option to call your method from the custom UI and gives you the result.
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

To properly understand GitHub, let’s divide it into two words ‘Git’ and ‘Hub’. Git is basically a ‘Distribution Version Control’ (DVC) and ‘Source Code Management’ (SCM) system widely used by software programmers while Hub means the efficient centre…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…

695 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question