Layer7 API Management

  • 1.  WADL example for API Explorer

    Posted Dec 05, 2017 10:16 AM

    Does anyone have a working example of a WADL for use with API Explorer in CA API Developer Portal 4.1?  I attach the WADL I have to the API metadata, but when I open it in API Explorer it says it cannot generate content.  I find all sort of examples of WADL files with parameters in the query, but ours are in the body and I can't find anything that demonstrates using a request such as that.  The IETF spec is easy enough to understand in its general requirements but doesn't provide enough specifics for me to ascertain how encode something for this generator.



  • 2.  Re: WADL example for API Explorer

    Posted Dec 05, 2017 10:25 AM

    Hi ,

     

    You can Simply create a WADL file using SOAP UI tool.

     

    Depending on your API if you want to pass request in the body or as the parameter it can be generated using SOAP UI Tool.

     

    Just Create Rest Project and test the API.

     

    After testing the API just right click on the Project and click export WADL.

     

    This is how you can generate a WADL for your API.

     

    Please correct me if I am wrong.

     

    Regards,

    Irfan



  • 3.  Re: WADL example for API Explorer

    Posted Dec 05, 2017 11:42 AM

    That's how I got the WADL file in the first place.  It doesn't work.  Portal lets you import it to the API metadata, but API Explorer won't use it, saying:

    Unable to generate content due to potential issues with the API's modeling file.



  • 4.  Re: WADL example for API Explorer

    Broadcom Employee
    Posted Dec 05, 2017 05:47 PM

    Can you attach your WADL file?



  • 5.  Re: WADL example for API Explorer

    Posted Dec 06, 2017 04:11 PM

    Actually, our pre-sales engineer says we can use Swagger as opposed to WADL to generate XML requests.  Being new to authoring these files, I was thinking Swagger could only do JSON.  I'm waiting to get an example from him and will post the solution if it works.



  • 6.  Re: WADL example for API Explorer
    Best Answer

    Posted Dec 07, 2017 11:45 AM

    So the word on WADL, at least as far as API Explorer goes, seems to be forget about it and use Swagger.  Being new to this I was trying to use WADL because our service consumes and produces XML and I wasn't aware Swagger could accommodate that.  You just have to define it as such with "consumes" in  you Swagger method definition to set the application type.  This worked great for us.


    "post": {
       "consumes": [
         "application/xml"
        ],