Re: JAXB GWT How I can use JAXB generated classes on client side
Hi man, Sorry for the later answer. You have this exception because Gwt Compiler try to find these classes in your Module.gwt.xml. Example : source path=client/ (folder client) When you have generated your classes with you file XSD, a class ObjectFactory.java was also generated, and this class use : javax.xml.namespace.QName ; javax.xml.bind.JAXBElementT If your ObjectFactory.java is in the folder client, when GWT Compiler try to build, you have this exception ! So the answer is to put your ObjectFactory.java in a folder who is not referenced in you Module.gwt.xml, in my example not in the folder client, more like server because I have only this folder referenced in Module.gwt.xml. The Second answer is you cant use ObjectFactory.java in the client side, because of this ! Best regards. Le mercredi 14 juillet 2010 17:29:16 UTC+2, Alberto Rugnone a écrit : Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscr...@googlegroups.com. To post to this group, send email to google-web-toolkit@googlegroups.com. Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Re: JAXB + GWT
Thanks for JIBX, it seems interesting and they have maven plugin as well. On 16 zář, 14:19, J.Ganesan j.gane...@datastoregwt.com wrote: Mike, Will there be any issue in putting the JIBX generated *.java files in shared package ? If not, JIBX has a huge advantage. I tried to put the *.java files from JAXB in shared package and I encountered a number of compilation problems. J.Ganesanwww.DataStoreGwt.com On Sep 15, 8:23 pm, Maiku mike.wid...@gmail.com wrote: Hi, If you are not totally tied to JAXB you may want to check out JIBX. I was successfully using the beans that it creates on both Server side and Client side. The way it marshals is by injecting information into the bytecode and this seems to allow GWT to still recognize the source of the beans as being the same as the compiled server object. I have since refactored to use RequestFactory so that this entire issue is moot but if you cannot then I highly recommend JIBX. - Mike -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB + GWT
No. There is no issue in putting JIBX *.java files in shared package. I use it in shared package without any issue. Make sure you r using JIBX 1.2.3 Deepak On Fri, Sep 16, 2011 at 5:49 PM, J.Ganesan j.gane...@datastoregwt.comwrote: Mike, Will there be any issue in putting the JIBX generated *.java files in shared package ? If not, JIBX has a huge advantage. I tried to put the *.java files from JAXB in shared package and I encountered a number of compilation problems. J.Ganesan www.DataStoreGwt.com On Sep 15, 8:23 pm, Maiku mike.wid...@gmail.com wrote: Hi, If you are not totally tied to JAXB you may want to check out JIBX. I was successfully using the beans that it creates on both Server side and Client side. The way it marshals is by injecting information into the bytecode and this seems to allow GWT to still recognize the source of the beans as being the same as the compiled server object. I have since refactored to use RequestFactory so that this entire issue is moot but if you cannot then I highly recommend JIBX. - Mike -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB + GWT
There shouldn't be any problems. In my case, I had my JIBX stuff in a separate project that got included into my webapp so I had to provide a *.gwt.xml file in it's base folder and do an include in my main *.gwt.xml file but other than that everything just worked. I was working with RPC methods, passing my XML domain objects back and forth and converting them to XML on the server side without any gwt related problems. Now I should note that I had a little it of trouble with JIBX itself in terms of converting enums to XML but that isn't related to GWT and a benefit of JIBX is you can modify your java beans to your heart's content (as long as your mapping files reflect what needs to be converted) and I was able to solve any problems that way. Another thing to mention is that JIBX has relatively little in terms of validation in order to keep its conversion process light. But since it produces beans you could, in theory, use a jsr 303 implementation to do the validation annotations there (a bit of duplication from the XML schema but can't be helped at the moment). -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB + GWT
Hi, I'm planning to add JAXB support http://code.google.com/p/piriti/wiki/JAXBto Piriti http://code.google.com/p/piriti/. Piriti is an XML / JSON mapper for GWT. Currently XML mapping is implemented using custom annotations. Regarding JAXB support I'm in the early design phase (see first link). So it might take some time until a first implementation is ready. But the goal is to re-use the basic JAXB annotations to (de)serialize POJOs on the cient side. This will enable you to have the same model on the server and client and use XML or JSON for the communication. - Harald -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/qrfbncN2DIoJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB + GWT
Hello Alexandre, server do the job and push/pull data through RPC calls is exactly what i do in my project.I o not use smartgwt datasource concept but only widgets. On Thu, Sep 15, 2011 at 7:10 AM, Sanjiv Jivan sanjiv.ji...@gmail.comwrote: If you're okay with using Smart GWT, it has inbuilt support for this. Have a look at this sample : http://www.smartclient.com/smartgwt/showcase/#featured_xsd_ds Sanjiv On Sat, Sep 3, 2011 at 2:21 PM, Kyle Anderson kyleanderso...@gmail.comwrote: I have an XML Schema defined in XSD format. Basically, there are a whole lot of objects with attributes associated with them. The attributes have various types (strings, enumerated types, integers). The restrictions on these attributes are all defined in the XSD format. I would like to create an editor in GWT which allows the user to edit a file in XSD format. The editor should be able to create a form using the XSD. For example, if there is an enumerated type attribute, the editor should create a drop down menu. I experimented with JAXB to generate the java bean classes from the XSD format. The problem with this is that you cannot do reflection in GWT, so there's no great way to view the attributes of the class in order to create the editor window. I imagine people have done similar things before. Thanks!! Kyle -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- *Ahmet DAKOĞLU* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB + GWT
Sanjiv it may be a noob question but i manually convert my beans to listgridrecord in pojo classes and wrote my own methods for listgrid operations now tow i want to give a try to xsd datasource.The thing i do not know is, where i should put my xsd files in project hiearchy? , do i need to create every xsd in a specific folder, or how can i make datasource to use the xsd returning from gwt to server in server package of gwt? On Thu, Sep 15, 2011 at 9:29 AM, Ahmet Dakoglu ahmetdako...@gmail.comwrote: Hello Alexandre, server do the job and push/pull data through RPC calls is exactly what i do in my project.I o not use smartgwt datasource concept but only widgets. On Thu, Sep 15, 2011 at 7:10 AM, Sanjiv Jivan sanjiv.ji...@gmail.comwrote: If you're okay with using Smart GWT, it has inbuilt support for this. Have a look at this sample : http://www.smartclient.com/smartgwt/showcase/#featured_xsd_ds Sanjiv On Sat, Sep 3, 2011 at 2:21 PM, Kyle Anderson kyleanderso...@gmail.comwrote: I have an XML Schema defined in XSD format. Basically, there are a whole lot of objects with attributes associated with them. The attributes have various types (strings, enumerated types, integers). The restrictions on these attributes are all defined in the XSD format. I would like to create an editor in GWT which allows the user to edit a file in XSD format. The editor should be able to create a form using the XSD. For example, if there is an enumerated type attribute, the editor should create a drop down menu. I experimented with JAXB to generate the java bean classes from the XSD format. The problem with this is that you cannot do reflection in GWT, so there's no great way to view the attributes of the class in order to create the editor window. I imagine people have done similar things before. Thanks!! Kyle -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com . To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- *Ahmet DAKOĞLU* -- *Ahmet DAKOĞLU* -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB + GWT
Hi, If you are not totally tied to JAXB you may want to check out JIBX. I was successfully using the beans that it creates on both Server side and Client side. The way it marshals is by injecting information into the bytecode and this seems to allow GWT to still recognize the source of the beans as being the same as the compiled server object. I have since refactored to use RequestFactory so that this entire issue is moot but if you cannot then I highly recommend JIBX. - Mike -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB + GWT
Hello Kyle, I faced a close issue before when I had to generate XML from JAXB- generated beans. If JAXB-generated beans can be used on GWT client side and converted in Javascript without concern, not are the JAXB (un)marshallers for those beans. Unfortunately, there is not, as far as I know, a possible straight translation of these (un)marshallers into Javascript. GWT does not enable reflection; some frameworks propose to work around it but I hardly think they can help to implement an efficient JAXB translation. Why not make the server do the job and push/pull data through RPC calls ? Alexandre. On 3 sep, 20:21, Kyle Anderson kyleanderso...@gmail.com wrote: I have an XML Schema defined in XSD format. Basically, there are a whole lot of objects with attributes associated with them. The attributes have various types (strings, enumerated types, integers). The restrictions on these attributes are all defined in the XSD format. I would like to create an editor in GWT which allows the user to edit a file in XSD format. The editor should be able to create a form using the XSD. For example, if there is an enumerated type attribute, the editor should create a drop down menu. I experimented with JAXB to generate the java bean classes from the XSD format. The problem with this is that you cannot do reflection in GWT, so there's no great way to view the attributes of the class in order to create the editor window. I imagine people have done similar things before. Thanks!! Kyle -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB + GWT
If you're okay with using Smart GWT, it has inbuilt support for this. Have a look at this sample : http://www.smartclient.com/smartgwt/showcase/#featured_xsd_ds Sanjiv On Sat, Sep 3, 2011 at 2:21 PM, Kyle Anderson kyleanderso...@gmail.comwrote: I have an XML Schema defined in XSD format. Basically, there are a whole lot of objects with attributes associated with them. The attributes have various types (strings, enumerated types, integers). The restrictions on these attributes are all defined in the XSD format. I would like to create an editor in GWT which allows the user to edit a file in XSD format. The editor should be able to create a form using the XSD. For example, if there is an enumerated type attribute, the editor should create a drop down menu. I experimented with JAXB to generate the java bean classes from the XSD format. The problem with this is that you cannot do reflection in GWT, so there's no great way to view the attributes of the class in order to create the editor window. I imagine people have done similar things before. Thanks!! Kyle -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB + GWT
Have a look at http://code.google.com/p/gwt-ent/. This library will enable you to build UI using reflection. I have found manually restructuring JAXB output *.java files to be very profitable. For instance, many of the classes and datatypes can be more simply represented as enums. Also, have a look at xmlbeans.apache.org. It may well give you a simpler output in the context of you application. J.Ganesan www.DataStoreGwt.com On Sep 3, 11:21 pm, Kyle Anderson kyleanderso...@gmail.com wrote: I have an XML Schema defined in XSD format. Basically, there are a whole lot of objects with attributes associated with them. The attributes have various types (strings, enumerated types, integers). The restrictions on these attributes are all defined in the XSD format. I would like to create an editor in GWT which allows the user to edit a file in XSD format. The editor should be able to create a form using the XSD. For example, if there is an enumerated type attribute, the editor should create a drop down menu. I experimented with JAXB to generate the java bean classes from the XSD format. The problem with this is that you cannot do reflection in GWT, so there's no great way to view the attributes of the class in order to create the editor window. I imagine people have done similar things before. Thanks!! Kyle -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
JAXB + GWT
I have an XML Schema defined in XSD format. Basically, there are a whole lot of objects with attributes associated with them. The attributes have various types (strings, enumerated types, integers). The restrictions on these attributes are all defined in the XSD format. I would like to create an editor in GWT which allows the user to edit a file in XSD format. The editor should be able to create a form using the XSD. For example, if there is an enumerated type attribute, the editor should create a drop down menu. I experimented with JAXB to generate the java bean classes from the XSD format. The problem with this is that you cannot do reflection in GWT, so there's no great way to view the attributes of the class in order to create the editor window. I imagine people have done similar things before. Thanks!! Kyle -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB + GWT
you need to use JAXB on the server side, not on the client side. There you can use reflection. Parse your XML and set to POJOs and get back to client. On Sat, Sep 3, 2011 at 11:51 PM, Kyle Anderson kyleanderso...@gmail.comwrote: I have an XML Schema defined in XSD format. Basically, there are a whole lot of objects with attributes associated with them. The attributes have various types (strings, enumerated types, integers). The restrictions on these attributes are all defined in the XSD format. I would like to create an editor in GWT which allows the user to edit a file in XSD format. The editor should be able to create a form using the XSD. For example, if there is an enumerated type attribute, the editor should create a drop down menu. I experimented with JAXB to generate the java bean classes from the XSD format. The problem with this is that you cannot do reflection in GWT, so there's no great way to view the attributes of the class in order to create the editor window. I imagine people have done similar things before. Thanks!! Kyle -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en. -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB GWT How I can use JAXB generated classes on client side
I would love to use gwt-rpc for this application but the server side is an embedded device with only apache and gsoap. I have done this once for another embedded system using rocket-gwt json serialization and wrote a backend cgi exec that would unmarshall using json-c to c structs. But this has a soap service with over 150 separate soap calls. I guess I am looking for a way to do xml serialization client side and that is not going to be possible without writing my own library. It would probably be possible though with some custom annotations and deferred binding simlilar to what rocket-gwt does but I have not found such a library. Maybe I will take a stab at it when I get some time. Thanks for the advice, Chris On Jul 15, 1:10 pm, David Vree david.h.v...@gmail.com wrote: I don't want to hijack your thread, but I am new to this and am wondering why you don't use GWT-RPC to do the client/server communication? On Jul 15, 12:40 pm, lineman78 linema...@gmail.com wrote: It is not possible to convert POJO to XML without using some sort of library, but Jersey does have the ability to do JSON. I use JAXB to generate my server side classes and JAX-RS to marshal to XML and JSON depending on the Accepts header. This is fairly easy to do using a services context resolver annotated with provider and consumes/ produces application/json. I then have written a generator(no I can't provide it, but it is possible) so that I can write an interface for a POJO and it will generate the overlay type for me, but if you are working on a smaller project manually writing the overlay types is the best solution. On Jul 15, 8:27 am, chris chris.hins...@gmail.com wrote: Thank you for the advice and it appears that this would work for server but not for client marshalling. I have been investigating a way to use JAXB to marshall soap requests on the client side but have not found a way as of yet. I would love to get rid of soap all together but unfortunately that will not be possible. Has anyone found a way to marshall the POJO to XML on the client? Thanks, Chris Hinshaw On Jul 15, 1:27 am, Frederic Conrotte frederic.conro...@gmail.com wrote: There is no problem in using JAXB along with GWT. See this thread for explanations:http://code.google.com/p/google-web-toolkit/issues/detail?id=4020q=J... On Jul 15, 2:57 am, Shyam Visamsetty shyamsunder...@gmail.com wrote: I think you cannot use JAXB with GWT. JAXB uses a lot of classes which GWT cant compile. So, you may not be able to use it. You can use the standard xml packages that come with GWT. Thanks, Shyam Visamsetty. On Jul 14, 8:29 am, Alberto Rugnone arugnonechemi...@gmail.com wrote: Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB GWT How I can use JAXB generated classes on client side
There is no problem in using JAXB along with GWT. See this thread for explanations: http://code.google.com/p/google-web-toolkit/issues/detail?id=4020q=JAXBcolspec=ID%20Type%20Status%20Owner%20Milestone%20Summary%20Stars#c10 On Jul 15, 2:57 am, Shyam Visamsetty shyamsunder...@gmail.com wrote: I think you cannot use JAXB with GWT. JAXB uses a lot of classes which GWT cant compile. So, you may not be able to use it. You can use the standard xml packages that come with GWT. Thanks, Shyam Visamsetty. On Jul 14, 8:29 am, Alberto Rugnone arugnonechemi...@gmail.com wrote: Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB GWT How I can use JAXB generated classes on client side
Thank you for the advice and it appears that this would work for server but not for client marshalling. I have been investigating a way to use JAXB to marshall soap requests on the client side but have not found a way as of yet. I would love to get rid of soap all together but unfortunately that will not be possible. Has anyone found a way to marshall the POJO to XML on the client? Thanks, Chris Hinshaw On Jul 15, 1:27 am, Frederic Conrotte frederic.conro...@gmail.com wrote: There is no problem in using JAXB along with GWT. See this thread for explanations:http://code.google.com/p/google-web-toolkit/issues/detail?id=4020q=J... On Jul 15, 2:57 am, Shyam Visamsetty shyamsunder...@gmail.com wrote: I think you cannot use JAXB with GWT. JAXB uses a lot of classes which GWT cant compile. So, you may not be able to use it. You can use the standard xml packages that come with GWT. Thanks, Shyam Visamsetty. On Jul 14, 8:29 am, Alberto Rugnone arugnonechemi...@gmail.com wrote: Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB GWT How I can use JAXB generated classes on client side
Thank you for the advice and it appears that this would work for server but not for client marshalling. I have been investigating a way to use JAXB to marshall soap requests on the client side but have not found a way as of yet. I would love to get rid of soap all together but unfortunately that will not be possible. Has anyone found a way to marshall the POJO to XML on the client? Thanks, Chris Hinshaw On Jul 15, 1:27 am, Frederic Conrotte frederic.conro...@gmail.com wrote: There is no problem in using JAXB along with GWT. See this thread for explanations:http://code.google.com/p/google-web-toolkit/issues/detail?id=4020q=J... On Jul 15, 2:57 am, Shyam Visamsetty shyamsunder...@gmail.com wrote: I think you cannot use JAXB with GWT. JAXB uses a lot of classes which GWT cant compile. So, you may not be able to use it. You can use the standard xml packages that come with GWT. Thanks, Shyam Visamsetty. On Jul 14, 8:29 am, Alberto Rugnone arugnonechemi...@gmail.com wrote: Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB GWT How I can use JAXB generated classes on client side
It is not possible to convert POJO to XML without using some sort of library, but Jersey does have the ability to do JSON. I use JAXB to generate my server side classes and JAX-RS to marshal to XML and JSON depending on the Accepts header. This is fairly easy to do using a services context resolver annotated with provider and consumes/ produces application/json. I then have written a generator(no I can't provide it, but it is possible) so that I can write an interface for a POJO and it will generate the overlay type for me, but if you are working on a smaller project manually writing the overlay types is the best solution. On Jul 15, 8:27 am, chris chris.hins...@gmail.com wrote: Thank you for the advice and it appears that this would work for server but not for client marshalling. I have been investigating a way to use JAXB to marshall soap requests on the client side but have not found a way as of yet. I would love to get rid of soap all together but unfortunately that will not be possible. Has anyone found a way to marshall the POJO to XML on the client? Thanks, Chris Hinshaw On Jul 15, 1:27 am, Frederic Conrotte frederic.conro...@gmail.com wrote: There is no problem in using JAXB along with GWT. See this thread for explanations:http://code.google.com/p/google-web-toolkit/issues/detail?id=4020q=J... On Jul 15, 2:57 am, Shyam Visamsetty shyamsunder...@gmail.com wrote: I think you cannot use JAXB with GWT. JAXB uses a lot of classes which GWT cant compile. So, you may not be able to use it. You can use the standard xml packages that come with GWT. Thanks, Shyam Visamsetty. On Jul 14, 8:29 am, Alberto Rugnone arugnonechemi...@gmail.com wrote: Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB GWT How I can use JAXB generated classes on client side
I don't want to hijack your thread, but I am new to this and am wondering why you don't use GWT-RPC to do the client/server communication? On Jul 15, 12:40 pm, lineman78 linema...@gmail.com wrote: It is not possible to convert POJO to XML without using some sort of library, but Jersey does have the ability to do JSON. I use JAXB to generate my server side classes and JAX-RS to marshal to XML and JSON depending on the Accepts header. This is fairly easy to do using a services context resolver annotated with provider and consumes/ produces application/json. I then have written a generator(no I can't provide it, but it is possible) so that I can write an interface for a POJO and it will generate the overlay type for me, but if you are working on a smaller project manually writing the overlay types is the best solution. On Jul 15, 8:27 am, chris chris.hins...@gmail.com wrote: Thank you for the advice and it appears that this would work for server but not for client marshalling. I have been investigating a way to use JAXB to marshall soap requests on the client side but have not found a way as of yet. I would love to get rid of soap all together but unfortunately that will not be possible. Has anyone found a way to marshall the POJO to XML on the client? Thanks, Chris Hinshaw On Jul 15, 1:27 am, Frederic Conrotte frederic.conro...@gmail.com wrote: There is no problem in using JAXB along with GWT. See this thread for explanations:http://code.google.com/p/google-web-toolkit/issues/detail?id=4020q=J... On Jul 15, 2:57 am, Shyam Visamsetty shyamsunder...@gmail.com wrote: I think you cannot use JAXB with GWT. JAXB uses a lot of classes which GWT cant compile. So, you may not be able to use it. You can use the standard xml packages that come with GWT. Thanks, Shyam Visamsetty. On Jul 14, 8:29 am, Alberto Rugnone arugnonechemi...@gmail.com wrote: Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB GWT How I can use JAXB generated classes on client side
Personally, I prefer to use Jersey vs GWT RPC because it is more flexible and exposes standard interfaces. For instance, in our group there are both Java and C# guys, so if our webservices have the ability to support multiple standards everyone can use them. I have Jersey set up so that depending on the Accept header it will serve your either XML, JSON or Java serialization. Also, with very little work I can also create SOAP services. I think GWT-RPC is a very nice protocol and is nice for people on small project or don't have to worry about flexability or external interfaces and have complete control of all design decisions in their project, but when you are working in large groups where you don't always have a say in all potential interfaces, then it is better to just use open standards. I have done a few personal GWT projects where I have used RPC, so I am not against it by any means. On Jul 15, 12:10 pm, David Vree david.h.v...@gmail.com wrote: I don't want to hijack your thread, but I am new to this and am wondering why you don't use GWT-RPC to do the client/server communication? On Jul 15, 12:40 pm, lineman78 linema...@gmail.com wrote: It is not possible to convert POJO to XML without using some sort of library, but Jersey does have the ability to do JSON. I use JAXB to generate my server side classes and JAX-RS to marshal to XML and JSON depending on the Accepts header. This is fairly easy to do using a services context resolver annotated with provider and consumes/ produces application/json. I then have written a generator(no I can't provide it, but it is possible) so that I can write an interface for a POJO and it will generate the overlay type for me, but if you are working on a smaller project manually writing the overlay types is the best solution. On Jul 15, 8:27 am, chris chris.hins...@gmail.com wrote: Thank you for the advice and it appears that this would work for server but not for client marshalling. I have been investigating a way to use JAXB to marshall soap requests on the client side but have not found a way as of yet. I would love to get rid of soap all together but unfortunately that will not be possible. Has anyone found a way to marshall the POJO to XML on the client? Thanks, Chris Hinshaw On Jul 15, 1:27 am, Frederic Conrotte frederic.conro...@gmail.com wrote: There is no problem in using JAXB along with GWT. See this thread for explanations:http://code.google.com/p/google-web-toolkit/issues/detail?id=4020q=J... On Jul 15, 2:57 am, Shyam Visamsetty shyamsunder...@gmail.com wrote: I think you cannot use JAXB with GWT. JAXB uses a lot of classes which GWT cant compile. So, you may not be able to use it. You can use the standard xml packages that come with GWT. Thanks, Shyam Visamsetty. On Jul 14, 8:29 am, Alberto Rugnone arugnonechemi...@gmail.com wrote: Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
JAXB GWT How I can use JAXB generated classes on client side
Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Re: JAXB GWT How I can use JAXB generated classes on client side
I think you cannot use JAXB with GWT. JAXB uses a lot of classes which GWT cant compile. So, you may not be able to use it. You can use the standard xml packages that come with GWT. Thanks, Shyam Visamsetty. On Jul 14, 8:29 am, Alberto Rugnone arugnonechemi...@gmail.com wrote: Hi all, I have to use classes with jaxb annotation on client side, but GWT compiler refuse to work throwing following exception No source code is available for type javax.xml.namespace.QName No source code is available for type javax.xml.bind.JAXBElementT etc... someone can help me Thank you very much in advanced -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
jaxb gwt compilation errors
Hi, I'm unable to compile the GWT project with the JAXB2.1.7 generated java classes. I've added the JAXB jars in the compile script. here is the compile script @java -Xmx256M -cp %~dp0\src;%~dp0/bin;C:/gwt-windows-1.5.0/gwt- user.jar;C:/gwt-windows-1.5.0/gwt-dev-windows.jar;Q:/project/Eclipse- RCP/jaxb217/lib/jaxb-impl.jar;Q:/project/Eclipse-RCP/jaxb217/lib/jaxb- api.jar;Q:/project/Eclipse-RCP/jaxb217/lib/jaxb1-impl.jar;Q:/project/ Eclipse-RCP/jaxb217/lib/jsr173_1.0_api.jar;Q:/project/Eclipse-RCP/ jaxb217/lib/activation.jar;Q:/project/Eclipse-RCP/jaxb217/lib/ j2ee.jar;Q:/project/Eclipse-RCP/jaxb217/lib/jaxb-xjc.jar com.google.gwt.dev.GWTCompiler -out %~dp0/www %* com.sample.Samplegwt [ERROR] Errors in 'file:/Q:/temp/Samplegwt/src/com/sample/client/xml/ ObjectFactory.java' [ERROR] Line 34: No source code is available for type javax.xml.namespace.QName; did you forget to inherit a required module? [ERROR] Line 160: No source code is available for type javax.xml.bind.JAXBElementT; did you forget to inherit arequired module? Please help me. Thanks Suresh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---
Re: jaxb gwt compilation errors
You can't use non-GWT libs in a GWT project*. GWT ships with a VERY limited JRE, and compiles Java source to JS source. The lib you are trying to use (1) uses parts of the JRE that GWT does not support, and (2) does not have the Java source code included in the jar file. You will need to use the XMLParser that ships with GWT and roll your own writer/parser. * Only applies to code run in the browser. Rob On Tue, Oct 21, 2008 at 2:11 PM, rookie [EMAIL PROTECTED] wrote: Hi, I'm unable to compile the GWT project with the JAXB2.1.7 generated java classes. I've added the JAXB jars in the compile script. here is the compile script @java -Xmx256M -cp %~dp0\src;%~dp0/bin;C:/gwt-windows-1.5.0/gwt- user.jar;C:/gwt-windows-1.5.0/gwt-dev-windows.jar;Q:/project/Eclipse- RCP/jaxb217/lib/jaxb-impl.jar;Q:/project/Eclipse-RCP/jaxb217/lib/jaxb- api.jar;Q:/project/Eclipse-RCP/jaxb217/lib/jaxb1-impl.jar;Q:/project/ Eclipse-RCP/jaxb217/lib/jsr173_1.0_api.jar;Q:/project/Eclipse-RCP/ jaxb217/lib/activation.jar;Q:/project/Eclipse-RCP/jaxb217/lib/ j2ee.jar;Q:/project/Eclipse-RCP/jaxb217/lib/jaxb-xjc.jar com.google.gwt.dev.GWTCompiler -out %~dp0/www %* com.sample.Samplegwt [ERROR] Errors in 'file:/Q:/temp/Samplegwt/src/com/sample/client/xml/ ObjectFactory.java' [ERROR] Line 34: No source code is available for type javax.xml.namespace.QName; did you forget to inherit a required module? [ERROR] Line 160: No source code is available for type javax.xml.bind.JAXBElementT; did you forget to inherit arequired module? Please help me. Thanks Suresh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to Google-Web-Toolkit@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/Google-Web-Toolkit?hl=en -~--~~~~--~~--~--~---