Hi 1. Go to "http://fusesource.com" then download and install " fuse Service framework based in CXF" 2. Install and go to samples 3. There is a lot of examples 4. I try a lot of it, but the best i have working fine for XML or JSON response is " .... \fuse-services-framework-2.1.3.1\samples\jax_rs\content_negotiation\"
Install it in Eclipse compile and run with ant, the you have a client and a server example, put time to do it, and see XML 500 ms JSON 40 ms. I normally use some interface to manage the json data. ( AJAX approach for WEB 2.0 ) Interface: (Response with a head and a body elements). If u Accept XML, can use xstream to convert it to java object on the fly, but is more expensive in time, than JSON. If u Accept default JSON, u have a String information, u can split with ":" . Then using StringTokenized u can have all the data in less time. Remember to use String type for all data. In the server side response head, put the name of the bean u must use to instance the data, and how many data beans u will receive. This is a convention between the server and the client. ( First part of the response are a head info, and the other the body info ). Also you can use the same approach from the client side, to send the server a parameter code. This parameter code is the type of data the server will put in the response. I'm working with the example above if u need i can send next week. My idea is to connect to java applications with this approach, and use for all the WS only one type of Message Protocol: Request: Head -> parameters that inform: (JSON fixed quantity of elements ) - the type of process the client need (client and server know the codes) - the type of data a send to be processed by the server ( Value Object - VO) - how many VO the client send - a check sum for control ( any u like ) Body -> the data itself (JSON VO as be defined in the head parameters ) ------------------------------------------------------------- Response: The same idea, more info off course ( error message, etc ) Head -> parameters that inform how is sending the body: Body -> the data as is defined in the head ------------------------------------------------------------ If u use XML use fixed name tags: Head -> H_1, H_2,.... H_n Body -> V_1, V_2....n ------------------------------------------------------------- regards On Fri, Dec 19, 2008 at 11:15 AM, Benson Margulies <[email protected]>wrote: > Java does not store parameter names in the class file for an > interface. Thus, you must either use .aegis.xml (for Simple/Aegis) or > the WSDL (for Aegis or JAXWS/JAXB). We can't do it by magic. > > On Fri, Dec 19, 2008 at 9:07 AM, Vassilis Virvilis > <[email protected]> wrote: > > On Thursday 18 December 2008, Daniel Kulp wrote: > >> > >> Try adding more information to the @WebService annotations on BOTH the > SEI > >> interface and the impl. In particular, make sure there are > targetNamespace > >> attributes on both. Also, make sure the endpointInterface attribute is > >> specified on the impl. > >> > >> Dan > > > > HiDan, > > > > Thanks for the suggestion but this is really painful for me right now > since I can't really guess correctly most of the values required. > > > > I really think annotating so hard is painfull and duplicating a lot of > info but that's my just opinion and I am not really knowledgable in web > services. > > > > Quick question: Isn't it possible for aegis to guess the parameter names? > Is that because it looks in the interface and not in the implementing class? > Couldn't java introspection help in this case? > > > > Thanks a lot anyway > > > > .bill > > > -- Saludos Julio Oliveira - Buenos Aires [email protected] http://www.linkedin.com/in/juliomoliveira
