jqueryajaxpostmansoapui

Consume webreserv API - <GetProductList>


I'm trying in every way I found to consume this API: http://www.webreserv.com/webservices/http/ServiceManager

Documentation: https://www.webreserv.com/download/webreserv-booking-system-api-xml.pdf

Keys (temporal for fixing):

Business ID: bikeatoursv

API Key: NO longer visible

XML request:

<?xml version="1.0" encoding="UTF-8"?>
<Request>
<BusinessID>MyBusinessID</BusinessID>
<APIKey>MyAPIKey</APIKey>
<Language>en</Language>
<GetProductList>
</GetProductList>
</Request>

XML Response: none or

<Response>
<Error>Error on line 1: Premature end of file.</Error>
</Response>

I have tried on SoapUI, postman and I dont know how to do this.

SoapUI error:

WSDLException (at /Response): faultCode=INVALID_WSDL: Expected element '{http:schemas.xmlsoap. org/ wsdl/}definitions'.

Please give me some help and guidance to try this API on an online tester or know how to consume it in jQuery or SoapUI by a real example using the API.


Solution

  • You can use any REST extension for Firefox or Chrome to make a post request and send the XML as a PAYLOAD to the server. You probably shouldn't post your API Key on here either.

    EX. Using Advanced Rest Client for Chrome

    1. Copy and paste the URL
    2. Select Raw for the Payload and copy and paste the XML Request
    3. Click Send

    enter image description here

    The Response

    enter image description here

    It doesn't look like the send the cross domain headers so you won't be able to make the call via javascript.