Forum Discussion

j_sorin's avatar
j_sorin
New Contributor
15 years ago

WADL imported from CXF has an error loading schema types

Hi,

I've imported a WADL generated using CXF, in SOAPUI 3.6.1. All the REST methods (resources) are correctly generated, but my WADL Content is empty. Looking into the log I have errors, when SOAPUI is trying to resolve my complex types from the WADL:

Mon Nov 08 14:38:54 EST 2010:WARN:Error: ...wadl.xml:0: error: src-resolve.a: Could not find type 'myType@http://research.sun.com/wadl/2006/10'. Do you mean to refer to the type named myType (in ...wadl.xml)?
Mon Nov 08 14:38:54 EST 2010:ERROR:An error occured [com.eviware.soapui.impl.wsdl.support.xsd.SchemaException], see error log for details
Mon Nov 08 14:38:54 EST 2010:ERROR:Loading of definition failed for [file:....]; com.eviware.soapui.impl.wsdl.support.xsd.SchemaException: Error loading schema types
Mon Nov 08 14:38:54 EST 2010:ERROR:An error occured [Error loading schema types], see error log for details
Mon Nov 08 14:38:54 EST 2010:ERROR:Error loading schema types from file:/...wadl.xml, see log for details




My WAD (without resources) is:

<application xmlns="http://research.sun.com/wadl/2006/10" 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="objectId" type="myType"/>
<xs:complexType name="myType">
<xs:sequence>
<xs:element name="value" type="xs:long"/>
</xs:sequence>
</xs:complexType>
</grammars>
<resources/></application>


Any help is very appreciated.

Thanks,
Sorin

2 Replies

  • Hi!

    this looks like a namespace issue in the WADL but it's hard to know unless you could attach the complete WADL + XSDs. Would that be possible?

    regards!

    /Ole
    eviware.com
  • j_sorin's avatar
    j_sorin
    New Contributor
    Thanks, it was indeed a name-space problem !

    I was able to fix it by using the workaround: Rest support, method body is not created from the schema
    (http://soapuiwww.eviware.com/forum/view ... 528b2ffaaf )

    Now, I'm able to see my WADL Content correctly. I need those information in order to be able to have the Schema Compliance assertion available.

    Unfortunately it seems that the Schema Compliance assertion is not working for WADL. I've changed the server output, and I've double check that in my WADL Content I have the correct XSD information. Still the Schema Compliance assertion is saying that the output compared with my schema is correct, when it is not the case. More details: I've changed a mandatory attribute name in the output sent from the server, or I've added in the client XSD a new mandatory attribute that the server is not sending etc.

    Could you please let me know if there is any bugs open for the Schema Compliance with REST, or what could be the problem ?

    Thanks,
    Sorin