Hi - apparently the compiler requires @XmlType too,

without it it indeed generates two schemas, which still looks valid, but with @XmlType the grammar section looks better

Cheers, Sergey
On 24/10/12 16:41, Osvaldo Pina wrote:

    Hi,


@XmlRootElement(namespace="http://com.test.wadl";)
public class Book {
private String title;

public String getTitle() {
return title;
}

public void setTitle(String title) {
this.title = title;
}

}


@Path("/")
@Consumes({MediaType.APPLICATION_XML})
@Produces({MediaType.APPLICATION_XML})
public interface BookService {

@GET
@Path("/book/{id}")
public Book getBook(String id);


}


Ats,
Osvaldo Pina.


On Wed, Oct 24, 2012 at 12:51 PM, Sergey Beryozkin <[email protected]
<mailto:[email protected]>> wrote:

    Hi

    On 24/10/12 13:56, Osvaldo Pina wrote:

            Hi,

            I'm using cxf rest 2.7.0 and when I generate wadl it comes
        with a two
        xs:schema sections. Is this correct?

            Ex:

        <grammars>
        <xs:schema attributeFormDefault="__unqualified"
        elementFormDefault="__unqualified"
        targetNamespace="http://com.__test.wadl <http://com.test.wadl>">
        <xs:complexType name="book">
        <xs:sequence>
        <xs:element minOccurs="0" name="title" type="xs:string"/>
        </xs:sequence>
        </xs:complexType>
        </xs:schema>
        <xs:schema attributeFormDefault="__unqualified"
        elementFormDefault="__unqualified"
        targetNamespace="http://com.__test.wadl <http://com.test.wadl>">
        <xs:import/>
        <xs:element name="book" type="book"/>
        </xs:schema>
        </grammars>


    This is what JAXB compiler produces. Can you please provide more
    info, how Book is annotated, how it is used by a root resource class

    Cheers, Sergey

            Ats,
            Osvaldo Pina.






--
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Blog: http://sberyozkin.blogspot.com
  • Re: wadl Sergey Beryozkin
    • Re: wadl Sergey Beryozkin

Reply via email to