Forum Discussion

bzzup's avatar
bzzup
Occasional Contributor
9 years ago

Can't add WADL ReadyAPI 1.4.0

 

Hi, we are trying to add the following WADL to ReadyAPI 1.4.0 project:

 

<application xmlns="http://wadl.dev.java.net/2009/02" xmlns:xs="http://www.w3.org/2001/XMLSchema"><grammars><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="unqualified">
<xs:element name="address" type="address"/>
<xs:element name="addresses" type="addresses"/>
<xs:element name="contactInformation" type="contactInformation"/>
<xs:element name="contactInformations" type="contactInformations"/>
<xs:element name="contactPerson" type="contactPerson"/>
<xs:element name="contactPersons" type="contactPersons"/>
<xs:element name="organisation" type="organisation"/>
<xs:element name="subOperation" type="subOperation"/>
<xs:element name="subOperations" type="subOperations"/>
<xs:complexType name="subOperations">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="subOperations" nillable="true" type="subOperation"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="subOperation">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="organisation">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="addresses">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="addresses" nillable="true" type="address"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="address">
<xs:sequence>
<xs:element minOccurs="0" name="districtCode" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="contactPersons">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="contactPersons" nillable="true" type="contactPerson"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="contactPerson">
<xs:sequence/>
</xs:complexType>
<xs:complexType name="contactInformations">
<xs:sequence>
<xs:element maxOccurs="unbounded" minOccurs="0" name="contactInformations" nillable="true" type="contactInformation"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="contactInformation">
<xs:sequence/>
</xs:complexType>
</xs:schema>
</grammars><resources base="http://neo.ist.local:8383/cxf/organisation-service/repository"><resource path="/v1/organisation"><method name="GET"><request><param name="_search" style="query" default="" type="xs:string"/><param name="rootId" style="query" default="" type="xs:string"/><param name="_expand" style="query" default="" type="xs:string"/><param name="_sort" style="query" default="" type="xs:string"/></request><response><representation mediaType="application/json"/><representation mediaType="application/xml"/></response></method><method name="GET"><request><param name="_search" style="query" default="" type="xs:string"/><param name="rootId" style="query" default="" type="xs:string"/><param name="_expand" style="query" default="" type="xs:string"/></request><response><representation mediaType="application/json"/><representation mediaType="application/xml"/></response></method><resource path="/addresses"><method name="GET"><request><param name="_search" style="query" default="" type="xs:string"/><param name="_sort" style="query" default="" type="xs:string"/></request><response><representation mediaType="application/json"/><representation mediaType="application/xml"/></response></method></resource><resource path="/contacts"><method name="GET"><request><param name="_search" style="query" default="" type="xs:string"/><param name="_sort" style="query" default="" type="xs:string"/></request><response><representation mediaType="application/json"/><representation mediaType="application/xml"/></response></method></resource><resource path="/persons"><method name="GET"><request><param name="_search" style="query" default="" type="xs:string"/><param name="_sort" style="query" default="" type="xs:string"/></request><response><representation mediaType="application/json"/><representation mediaType="application/xml"/></response></method></resource><resource path="/sub-operations"><method name="GET"><request><param name="_search" style="query" default="" type="xs:string"/><param name="_sort" style="query" default="" type="xs:string"/></request><response><representation mediaType="application/json"/><representation mediaType="application/xml"/></response></method></resource><resource path="/synchronization"><method name="POST"><response status="204"></response></method></resource></resource></resources></application>

It fails with multiple errors like 

Source: http://neo:9020/api/platform/organisation-repository/v1/organisation/?_wadl 
Error: Could not find type 'address@http://wadl.dev.java.net/2009/02'.
Do you mean to refer to the type named address (in _3F_5Fwadl)?

Source: http://neo:9020/api/platform/organisation-repository/v1/organisation/?_wadl
Error: Could not find type 'addresses@http://wadl.dev.java.net/2009/02'.
Do you mean to refer to the type named addresses (in _3F_5Fwadl)?

Source: http://neo:9020/api/platform/organisation-repository/v1/organisation/?_wadl
Error: Could not find type 'contactInformation@http://wadl.dev.java.net/2009/02'.
Do you mean to refer to the type named contactInformation (in _3F_5Fwadl)?

However works fine if importing the same WADL from local file OR using SOAP UI 5.1.2

 

Is it a problem with Ready API?

 

2 Replies

  • Hi bzzup,

     

    I was able to reproduce this, and it definitely looks like a problem with the WADL importer in Ready! API.

    I'll report this in our bug tracker and we'll hopefully have it fixed in future releases.

     

    Thanks for reporting this and I hope you can work around it by importing local files until this is fixed.

     

    Regards,

    Anders

    Ready! API developer

    • MattiH's avatar
      MattiH
      Staff

      There is a wourkaround:

      If you add unique targetNamespace to you scheme it will work by URL. According to W3C.org it is good behaviour to use unique namespaces. For example add these attibutes to the scheme: "xmlns="anyUniqueNameSpace" targetNamespace="anyUniqueNameSpace". I've attached working wadl file("workingFile.wadl").

       

      /Matti