How to use Soap UI without wsdl?

让人想犯罪 __ 提交于 2019-12-03 09:26:50
Miklós Molnár
  • Create new SOAP Project using File > New SOAP Project
  • Set the name as required
  • Leave the initial WSDL field blank
  • On the Project Navigator Window to the left, mouse over the project folder and select New Rest Service from URI using the context menu
  • Enter the enpoint you would like to send a SOAP message to, i.e. http://www.webservicex.net/WS/WSDetails.aspx?CATID=2&WSID=10
  • Choose POST as the HTTP method
  • Add your xml SOAP payload to the window in the bottom left
  • Choose media type: text/xml from the combobox
  • Click to green arrow to POST the message to the specified endpoint
  • And voilà - you should see the SOAP response on right-hand side window :)

I wanted to send a SOAP request to a simple ASP.NET MVC Controller and the way I managed to do it using SoapUI was:

1) Create a SOAP request using any WSDL (no matter what WSDL you use, then you'll change it).

2) Open a request, change the URL and change the body of the request.

That way you can post a SOAP request with full control. Just in case it is useful, inside the controller I'm logging all the requests we receive using this in C#:

                string requestData;
                // Get raw request body
                using (Stream receiveStream = Request.InputStream)
                {
                    // Move to begining of input stream and read
                    receiveStream.Position = 0;
                    using (StreamReader readStream = new StreamReader(receiveStream, Encoding.UTF8))
                    {
                        requestData = readStream.ReadToEnd();
                    }
                }

Although you asked this question a few years back and hopefully you have been able to find an answer to your question.

Here is my answer to your question, hopefully not too late.

SoapUI is meant to test API, web service. To start testing it requires access to a WSDL. That said a project can be created without a WSDL. The only time i can think of i would not need a wsdl would be when whatever I am testing is not a web service and can be testing using either JDBC step or groovy step or a similar step except the test request step.

In one of your comments you asked if a wsdl is available, yes there are site where publicly accessible wsdls are available you can check out the below site for wsdls.

http://www.xmethods.net/ve2/index.po
http://www.webservicelist.com/
http://www.webservicex.net/WS/wscatlist.aspx

Hope you are having better luck with soapUI than you had with this question.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!