RAML to WADL tooling?


#1

I’ve been lurking around on GitHub and such for a tool to translate RAML into WADL for use in legacy systems that depend on it. It appears as though there isn’t like this available yet, but I just wanted to hear it directly from someone who knows.
Is that correct?

-Ryan


#2

Hi Ryan,

I think there is something I came across. I’ll try to find it again mate :wink:

Cheers,
Christian


#3

If you use smartbear ReadyAPI! I believe they can turn RAML into WADL.


#4

Do you know if that is a free service?


#5

I don’t believe it is as it is part of the ReadyAPI! Product.


#6

I don’t know why I didn’t think of this earlier.
There is a plugin available from the SoapUI plugin manager that allows importing of RAML. It will generate a SoapUI project based on the RAML. Once that is done, SoapUI can natively generate WADL based on an opened project.
Bam. Ladies and gentlemen…RAML2WADL.


#7

Just had a discussion about it. You are absolutely right -> Thanks for pointing that out!


#8

@ryanallen is there any code/project that will help us generate RAML to WADL in a programmatic way.Like provide the RAML file as input and get WADL file as output.


#9

@Paul, are you using WADL in any services and therefore have to transform it?


#10

@christian_vogel yes your right our services are in WADL right now , so have to transform it to RAML.


#11

AH ok, I was a little bit confused as you talked about RAML to WADL :wink:

Try this: https://github.com/KonstantinSviridov/wadl-for-raml

Let me know how that goes!


#12

@christian_vogel thank you for the link , I was able to successfuly build “raml-java-parser” project , when i was building “wadl-raml-codegen-core” project it gives the below error .

[ERROR] Failed to execute goal on project wadl-raml: Could not resolve dependencies for project org.raml:wadl-raml:jar:0.0.1-SNAPSHOT: 
Failed to collect dependencies at org.raml:com.mulesoft.jaxrs.raml.generator:jar:1.3.4-SNAPSHOT: 
Failed to read artifact descriptor for org.raml:com.mulesoft.jaxrs.raml.generator:jar:1.3.4-SNAPSHOT: 
Could not transfer artifact org.raml:com.mulesoft.jaxrs.raml.generator:pom:1.3.4-SNAPSHOT from/to MuleRepository (https://repository.mulesoft.org/nexus-ee/content/repositories/releases-ee/): Not authorized, ReasonPhrase:Unauthorized. -> [Help 1]

#13

After changing url in settings.xml to https://repository-master.mulesoft.org/releases/
it says

[ERROR] Failed to execute goal on project wadl-raml: Could not resolve dependencies for project org.raml:wadl-raml:jar:0.0.
.jaxrs.raml.generator:jar:1.3.4-SNAPSHOT in MuleRepository (https://repository-master.mulesoft.org/snapshots/) -> [Help 1]

Which URL should i use in the settings.xml in order to build this successful


#14

Even with a fresh installation of maven , getting the below error wile building “wadl-raml-codegen-core”

[ERROR] Failed to execute goal on project wadl-raml: Could not resolve dependencies for project org.raml:wadl-raml:jar:0.0.1-SNAPSHOT: Could not find artifact org.raml:com.mulesoft.jaxrs.raml.generator:jar:1.3.4-SNAPSHOT -> [Help 1]

#15

After changing the pom.xml entry from

<dependency>
<groupId>org.raml</groupId>
<artifactId>com.mulesoft.jaxrs.raml.generator</artifactId>
<version>1.3.4-SNAPSHOT</version>
</dependency>

TO

<dependency>
<groupId>org.raml</groupId>
<artifactId>com.mulesoft.jaxrs.raml.generator</artifactId>
<version>1.3.3-20150224.163117-1</version>
</dependency>

I was able to build the project successfully.


#16

@christian_vogel i did try out the git hub project you had specified. It does a good job of converting WADL to RAML , It is missing a common feature , the below WADL request element

<request>
<representation xmlns:cns="http://www.example.org" mediaType="application/xml" element="cns:Customer" />
</request>

is mapped in raml as below

 body: 
      application/xml: 
        schema: Customer

But the Schemas section does not have any reference to Customer , the below part is missing from generated RAML file

schemas:
  - Customer:      !include path-to-schemas/file.xsd or "the xsd itself"

#17

Can you please raise an issue on the Github repo. I know the guys who developed this and already talked to them so that they have a look on your problem.


#18

sure will raise an issue on the Github repo.