Forum Discussion

nathang's avatar
nathang
New Contributor
7 years ago

Web Service Example Tutorials

 

Hi, 

 

I am new to the SOAP UI tool and I am currently trying to learn SOAP UI via the web service example tutorials on your page i.e. YouTube, Flickr etc. However when I import the .wsdl file into the project and try to run the individual test suites they all fail!

 

Do you you know why these are failing?

 

Kind regards

 

Nathan 

3 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Would you mind elaborating about the failure?
  • nathang's avatar
    nathang
    New Contributor

     

    Well I downloaded all of the sample projects from here;

    https://www.soapui.org/tutorials/web-service-example-projects.html

     

    Once uploaded into SoapUI I try to run some of the test steps that have already been created i.e (Google Maps) Directions API Test Suite.

     

    When I run one of the tests they seem to fail with;

     

    "XPathContains assertion failed for path" or "XPathContains comparison failed for path"

     

    Surely these should be all correct if i'm using the pre-made .wsdl files?

     

    Thanks

  • JHunt's avatar
    JHunt
    Community Hero

    The Google Maps one is working - in this case "Assertion Failed" just means that the data you received back wasn't exactly what was given as the expected result. But this failure was expected, if you are following the tutorial at https://www.soapui.org/tutorials/google-maps.html

     

    As you can see the validation is up to 7 decimals, unfortunately though the last decimals of returned coordinates change rather frequently in which case you will have to either update the “Expected Result” value of the assertion to be in line with the current value, or change the assertion alltogether to either ignore coordinates or handle changes (for example by selecting specific values and truncating them).

     

    You may be more interested to just look at the result yourself rather than rely on assertions - open up the Test Step and click on the JSON or Raw tabs for the response. You should see that you got a proper response.

     

    {
       "geocoded_waypoints":    [
                {
             "geocoder_status": "OK",
             "place_id": "ChIJpTvG15DL1IkRd8S0KlBVNTI",
    
    ...and so on...

    However, It looks like the Youtube API is giving HTTP 410 Gone. So the folks over at Youtube have stopped access through this channel.

     

    The requested resource is no longer available at the server and no forwarding address is known. This condition is expected to be considered permanent. Clients with link editing capabilities SHOULD delete references to the Request-URI after user approval. If the server does not know, or has no facility to determine, whether or not the condition is permanent, the status code 404 (Not Found) SHOULD be used instead. This response is cacheable unless indicated otherwise.

    The 410 response is primarily intended to assist the task of web maintenance by notifying the recipient that the resource is intentionally unavailable and that the server owners desire that remote links to that resource be removed. Such an event is common for limited-time, promotional services and for resources belonging to individuals no longer working at the server's site. It is not necessary to mark all permanently unavailable resources as "gone" or to keep the mark for any length of time -- that is left to the discretion of the server owner.