Deploying SOAP Web Services as Mock Service By SoapUI WAR in Tomcate Tutorial



In our earlier tutorial, we discussed about how to create mock services in SoapUI environment. Web Services SOAP (WSDL) MockService by SoapUI Tutorial.

We will discuss, how our mock work by deployment in any web or application server.

Software/Hardware requirement:
OS
SoapUI
Tomcat or any App Server

Note: What is there in below image we already discussed in Web Services SOAP (WSDL) MockService by SoapUI Tutorial.

http://tutorialbyexample.blogspot.com Deploying SOAP Web Services as Mock Service By SoapUI WAR in Tomcate Tutorial project directory
Image 1.

Right click on the JAXWS-SOAP-MockingService
Deploy as WAR

Deploying SOAP Web Services as Mock Service By SoapUI WAR in Tomcate Tutorial war setting
Image 2.













Click on the Include Global Setting
Click on the WebUI
Mock Service Endpoint: soapuimock
War File: C:\Tomcate\apache-tomcat-6.0.39\webapps\soapuimock.war
War Directory: C:\Tomcate\apache-tomcat-6.0.39\webapps\soapuimock

Click on the Ok.

Deploying SOAP Web Services as Mock Service By SoapUI WAR in Tomcate Tutorial  war structure in tomcat
Image 3.










Start the Tomcat by C:\Tomcate\apache-tomcat-6.0.39\bin\startup.bat


Verify the soapuimock.war

Open the any web browser
Enter the URL: http://localhost:8080/soapuimock/

Deploying SOAP Web Services as Mock Service By SoapUI WAR in Tomcate Tutorial SoapUI URL
Image 4














Click on the WSDLs: [GreetingWebServiceImplPortBinding MockService] as mention in above image.

Copy the URL (http://localhost:8080/soapuimock/mockGreetingWebServiceImplPortBinding), after clicking the above.

Use it http://localhost:8080/soapuimock/mockGreetingWebServiceImplPortBinding as mockservice by deployed in Tomcat.

Verify the mock services deployed in Tomcat

Open the SoapUI

Project directory will look like below:

- Projects
   - JAXWS-SOAP-MockingService
     - GreetingWebServiceImplPortBinding
       - sayWelcome
          Request 1

Dabble click on the Request 1

Deploying SOAP Web Services as Mock Service By SoapUI WAR in Tomcate request & response
Image 5










Change the URL : http://localhost:8080/soapuimock/mockGreetingWebServiceImplPortBinding

Click on the green arrow button

Request 1
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservicejaxws.vinod.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:sayWelcome>
         <!--Optional:-->
         <sName>Vinod</sName>
      </web:sayWelcome>
   </soapenv:Body>
</soapenv:Envelope>

Mock Services Response 1

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:web="http://webservicejaxws.vinod.com/">
   <soapenv:Header/>
   <soapenv:Body>
      <web:sayWelcomeResponse>
         <!--Optional:-->
         <return>Hello</return>
      </web:sayWelcomeResponse>
   </soapenv:Body>
</soapenv:Envelope>


More details you can refer from http://www.soapui.org/

Don't care about dog, barking behind you. He is making to you famous.

9 comments:

  1. Thanks for posting .. on SOAP Web Services as Mock Service By SoapUI WAR..you save my day...work..

    ReplyDelete
    Replies
    1. Appreciated for your feedback however, for more go through http://www.tutorialbyexample.com/search/label/SoapUI..youb will get more details.

      Delete
  2. hi,we provide online training & video tutorial for soapui
    for free videos refer
    http://soapui-tutorial.com/soapui-tutorial/introduction-to-webservices/

    ReplyDelete
  3. Great tutorial! Thanks

    ReplyDelete
    Replies
    1. Thanks for your feedback. SOAP Web Services as Mock Service By SoapUI WAR

      Delete
  4. This is genuinely an awesome read for me. I have bookmarked it and I am anticipating perusing new articles. Keep doing awesome!
    Web Development

    ReplyDelete

Please provide your input, it will honer for me...