Hi Arul, Benson

yes, that would be a rather simple thing to do, and in fact you'd likely get 
this JS code (or indeed code in your language of choice) generated for live 
services, as we've introduced SystemQueryHandlers (not sure it's a good name 
though) which are supposed to handle different types of query extensions and 
possibly let the invocation to proceed to the actual object afterwards. For 
example, at the moment, one can debug a live service and check on what format 
it can produce, for example, if it's an Atom-enbaled service then you can try 
?_contentType=json. In this case the only thing the handler does is to update 
the Accept headers on the message.

Likewise, one should be able to do ?_js or ?_lang=js.

That said, supporting extensions like _js has not been prioritized. That would 
be a cool thing to do so if someone in the community is interested then the 
input would be welcomed.

Cheers, Sergey


> There is no existing code to do this, if I follow your definition of a
> 'resource object'. It would be only a few days of work to add to the
> existing Javascript generator to add this, I bet. If you post an example of
> what you'd like to see generated that might clarify. I for one wouldn't be
> in a position to tackle the job if I've understood it correctly.
> 
> 
>>
>> Here is my scenario. I have a JAX-RS CXF service. I have a web
>> application which consumes this service. Is it possible to generate the
>> REST resources as JavaScript so that the web app can use it directly
>> when doing a POST (ex: construct the resource object)?
>>
>>
>>
>

----------------------------
IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

Reply via email to