Forum Discussion

remikeo's avatar
remikeo
New Contributor
13 years ago

Mocking XML services which are not webservices

Hi,

I'd like to create mocks for several kinds of services. Some are SOAP services and some are just plain XML over HTTP (not SOAP nor REST).
For SOAP services I know how to do it with soapUI but for the other services I can not do it.
I really think it would be better for me to have all mock services implemented with the same tool (soapUI) but I wonder if it is even possible to do it for plain XML services which are not webservices (REST nor SOAP).

Has anyone faced a similar problem? If yes, is there any way to achieve what I want with soapUI?

7 Replies

  • nmrao's avatar
    nmrao
    Community Hero
    Would you please elaborate your use case / what you mean by

    some are just plain XML over HTTP (not SOAP nor REST)
  • remikeo's avatar
    remikeo
    New Contributor
    It is services which are not webservices, and it is not wrapped into a SOAP (nor REST) message. To call these services, we just send an XML message through HTTP, and the response is also a simple XML message through HTTP.
  • remikeo's avatar
    remikeo
    New Contributor
    Actually these services are pretty similar to webservices except they don't use SOAP or any WS standard.

    The request is a HTTP-POST which content is an XML message and the response is also an XML message.
    Both messages are described in an XSD schema but there's no WSLD and since the messages are not compliant with SOAP there couldn't be any way to describe them in a WSDL.
    Unfortunately these are legacy services that we cannot change.

    I can use SoapUI to test them (even if I have to write the request myself instead of having SoapUI generating one with '?' values) and I can specify some assertions to validate the response content.
    Now I would like to use SoapUI to create a dynamic Mock implementation for these services as I already do with the SOAP ones.
  • nmrao's avatar
    nmrao
    Community Hero
    What I can think of is have a library which can does the job of http post and get the response. Then place this library under $SOAPUI_HOME/bin/ext. Use groovy script to make a API call to the class with parameters like the URL, Request file. Once you got the response, do the assertion in groovy itself.
  • nmrao's avatar
    nmrao
    Community Hero
    Hey, I just come to see there is a step called HTTP Request. Hope you should give a try before trying my previous post.