tag:blogger.com,1999:blog-1710464868724994296.post915114374571362771..comments2023-06-29T09:48:09.653-04:00Comments on Java XML and JSON Binding: XPath Based Mapping - Geocode ExampleBlaise Doughanhttp://www.blogger.com/profile/02016807982653343777noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-1710464868724994296.post-20111098259973040702013-03-25T15:07:56.710-04:002013-03-25T15:07:56.710-04:00Is this propertyException specific to geocoding? I...Is this propertyException specific to geocoding? I get it tooAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-10529967363434730962012-09-26T13:29:06.820-04:002012-09-26T13:29:06.820-04:00The following should help:
- http://wiki.eclipse.o...The following should help:<br />- <a href="http://wiki.eclipse.org/EclipseLink/Examples/MOXy/Spring" rel="nofollow">http://wiki.eclipse.org/EclipseLink/Examples/MOXy/Spring</a><br /><br />-BlaiseBlaise Doughanhttps://www.blogger.com/profile/02016807982653343777noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-81394052538594438032012-09-25T21:30:23.642-04:002012-09-25T21:30:23.642-04:00Excellent Post..Can you please help me configure E...Excellent Post..Can you please help me configure EclipseLink MoxY in Spring?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-7229831656122888412012-03-29T11:17:27.567-04:002012-03-29T11:17:27.567-04:00Hi Anusha,
I have another post covering the JSON ...Hi Anusha,<br /><br />I have another post covering the JSON aspect of the Geocode API that you may be interested in:<br />- <a href="http://blog.bdoughan.com/2011/08/binding-to-json-xml-geocode-example.html" rel="nofollow">Binding to JSON & XML - Geocode Example</a><br /><br />For that post I have the complete source code available on GitHub:<br />- <a href="https://github.com/bdoughan/blog20110819" rel="nofollow">https://github.com/bdoughan/blog20110819</a><br /><br />-BlaiseBlaise Doughanhttps://www.blogger.com/profile/02016807982653343777noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-6098432143879559972012-03-29T08:07:22.526-04:002012-03-29T08:07:22.526-04:00This tutorial is great, However when I try to unm...This tutorial is great, However when I try to unmarshal a json string to java beans using the code mentioned above I get the following error:<br /><br />Exception in thread "main" javax.xml.bind.PropertyException: name: eclipselink.media-type value: application/json<br /> at javax.xml.bind.helpers.AbstractMarshallerImpl.setProperty(Unknown Source)<br /> at com.sun.xml.bind.v2.runtime.MarshallerImpl.setProperty(MarshallerImpl.java:533)<br /> at sample.TestJSON.main(TestJSON.java:19)<br /><br />I have downloaded latest eclipse link jars and have created a jaxb.properties file as well.Can you please help me resolve this problem,Anushahttps://www.blogger.com/profile/12339988134031127588noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-41121229362459438952012-03-05T08:42:47.105-05:002012-03-05T08:42:47.105-05:00Which environment are you running in? It appears ...Which environment are you running in? It appears as though you may be using the EclipseLink OSGi bundles, and using a new MOXy bundle and an older core bundle.<br /><br />-BlaiseBlaise Doughanhttps://www.blogger.com/profile/02016807982653343777noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-9445240572183206992012-03-05T03:12:17.981-05:002012-03-05T03:12:17.981-05:00This is really exciting.
Unfourtnately I get excep...This is really exciting.<br />Unfourtnately I get exception:<br />javax.servlet.ServletException: java.lang.NoSuchMethodError: org.eclipse.persistence.oxm.NamespaceResolver.hasPrefixesToNamespaces()ZAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-13448180661486350692011-03-28T14:43:46.400-04:002011-03-28T14:43:46.400-04:00Hi Zdenek,
Sorry for the delay in responding. I ...Hi Zdenek,<br /><br />Sorry for the delay in responding. I haven't had a chanve to post an example yet, but if you want to try somethings out yourself just include your XPath in the @XmlPath annotation and make the following magic call after you create your JAXBContext:<br /> JAXBHelper.getJAXBContext(jc).getXMLContext().getSession(0).getDatasourceLogin().setDatasourcePlatform(new DOMPlatform());<br /><br />-BlaiseBlaise Doughanhttps://www.blogger.com/profile/02016807982653343777noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-26156226975970370472011-03-16T06:38:54.930-04:002011-03-16T06:38:54.930-04:00Hi,
I'd be definitely interested in unmarsha...Hi, <br /><br />I'd be definitely interested in unmarshal-only use-cases.<br /><br />ZdenekZdenekhttps://www.blogger.com/profile/09906118156871291650noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-16934454320991764952011-02-10T11:59:55.119-05:002011-02-10T11:59:55.119-05:00Hi JT,
The reason we don't allow the "an...Hi JT,<br /><br />The reason we don't allow the "any-level" concept frpm XPath is that we require that information when marshalling to XML. <br /><br />Are you interested in this type of functionality for unmarshal only use cases?<br /><br />-BlaiseBlaise Doughanhttps://www.blogger.com/profile/02016807982653343777noreply@blogger.comtag:blogger.com,1999:blog-1710464868724994296.post-76295780706382754662011-02-07T22:40:08.311-05:002011-02-07T22:40:08.311-05:00Blaise,
Is it possible to annotate the fields (ass...Blaise,<br />Is it possible to annotate the fields (assume default namesapce)<br /><br />@XmlPath("//Point/coordinates") instead of<br />@XmlPath("Response/Placemark/Point/coordinates")<br /><br />Using the "any-level descendant" syntax doesn't work as in I get values as null. Thanks for your help and excellent tutorial on moxy impl.JT's Bloghttps://www.blogger.com/profile/12194640997007490969noreply@blogger.com