Hi Sergey,

Re: prefix definition

I tried to view page source, and the prefix definition is there. I think this behavior is just with firefox, did not need to do this with IE.

Re: interceptor check for _wadl

Yep, did the same after I sent the email before.

Re: */*

If I set the annotation @Consumes to */* and the @Produces to ("text/xml"), the wadl is not generated properly. I guess it is because of the difference between the two? In this case, is it really still advisable to have a separate annotation? I mean, shouldn't the annotation be reduced to 1 if it is required to have them as same values?

Gabo

Sergey Beryozkin wrote:
Hi

Hi Sergey,

Sorry for the delayed response to this thread. I am currently checking the generated WADL using 2.2.5. A few things I did to make it work:

1. Update consumes from */* to text/xml as the prior ends up showing only as:

<request>
<representation mediaType="*/*"/>
</request>

2. have namespace in the XML-related annotation of each class. Have not tested yet relying on pagkage.info class yet.

One thing though, see sample below:

<representation mediaType="text/xml" element="prefix27:Route"/>

The object Route is defined above, but the 'prefix27' part is not defined anywhere else. I think the same goes for 'xs' and 'tns' prefixes, is this ok?

the corresponding namespaces must be declared at the wadl:application level, can you verify please ? Likewise "prefix27" must poin to a namespace for one of the schemas in the grammars section. If you're looking at the generated wadl from the Firefox then you need to tell it to show the actual page source...


Also, since I had to change */* to something more specifc, wouldn't this conflict with one of the major advantages of CXF, i.e. ability to automatically handle json, xml, etc without any other changes?

Sorry, not sure what you mean. If your class has say application/xml & application/json produces values then the generated WADL should have it reflected


Also, is it possible to configure somewhere to NOT apply the interceptors when viewing the wadl? I have my own implementation of http-auth digest and the password is being required whenever the wadl is being viewed. I was hoping it should be viewable without need of auth like wsdl.

Can you interceptor check that it is a _wadl query and if yes then let the processing continue ?

cheers, Sergey

Reply via email to