Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to use Soap UI without wsdl?

Tags:

soapui

Hi I have installed Soap UI...Like C, Java we will create some sample program. likewise i wanted to use some sample request and response..how to create a request and response without wsdl?

like image 504
ChanGan Avatar asked Mar 22 '11 10:03

ChanGan


People also ask

Can SOAP work without WSDL?

Without the WSDL, it will be responsibility of the developer to know the definition of the SOAP Web Service to consume . SOAP envelope, SOAP Body and the complete XML request has to be built by the developer and pass it to the Http client.

How can create mock service in SoapUI without WSDL?

You can just trick SOAPUi with some dummy WSDL, at least with a single request/response definition! Just replace the requests it generates with the XML document you wanted. You an also add additional requests with entirely different request/responses by copy and pasting!

What is initial WSDL in SoapUI?

WSDL, or Web Service Description Language, is an XML based definition language. It's used for describing the functionality of a SOAP based web service. WSDL files are central to testing SOAP-based services. SoapUI uses WSDL files to generate test requests, assertions and mock services.


2 Answers

  • 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 :)
like image 177
Miklós Molnár Avatar answered Oct 18 '22 06:10

Miklós Molnár


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();
                    }
                }
like image 2
Francisco Goldenstein Avatar answered Oct 18 '22 07:10

Francisco Goldenstein