simple-support Mailing List for Simple (Page 40)
Brought to you by:
niallg
You can subscribe to this list here.
| 2007 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
(13) |
May
(13) |
Jun
(27) |
Jul
(4) |
Aug
(14) |
Sep
(7) |
Oct
|
Nov
(6) |
Dec
(24) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
|
Feb
(21) |
Mar
(10) |
Apr
(15) |
May
(24) |
Jun
(24) |
Jul
(30) |
Aug
(5) |
Sep
(19) |
Oct
(27) |
Nov
(16) |
Dec
(24) |
| 2009 |
Jan
(34) |
Feb
(24) |
Mar
(35) |
Apr
(26) |
May
(8) |
Jun
(17) |
Jul
(28) |
Aug
(31) |
Sep
(36) |
Oct
(35) |
Nov
(20) |
Dec
(16) |
| 2010 |
Jan
(40) |
Feb
(21) |
Mar
(47) |
Apr
(45) |
May
(34) |
Jun
(68) |
Jul
(46) |
Aug
(39) |
Sep
(47) |
Oct
(20) |
Nov
(42) |
Dec
(13) |
| 2011 |
Jan
(41) |
Feb
(16) |
Mar
(32) |
Apr
(44) |
May
(28) |
Jun
(35) |
Jul
(37) |
Aug
(33) |
Sep
(60) |
Oct
(20) |
Nov
(35) |
Dec
(23) |
| 2012 |
Jan
(34) |
Feb
(23) |
Mar
(34) |
Apr
(21) |
May
(48) |
Jun
(24) |
Jul
(31) |
Aug
(39) |
Sep
(25) |
Oct
(10) |
Nov
(27) |
Dec
(28) |
| 2013 |
Jan
(32) |
Feb
(24) |
Mar
(24) |
Apr
(9) |
May
(4) |
Jun
(6) |
Jul
(2) |
Aug
(5) |
Sep
|
Oct
(5) |
Nov
(1) |
Dec
(12) |
| 2014 |
Jan
(14) |
Feb
(16) |
Mar
(5) |
Apr
(3) |
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
|
Sep
(6) |
Oct
|
Nov
(6) |
Dec
|
| 2015 |
Jan
(3) |
Feb
(15) |
Mar
(7) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
| 2016 |
Jan
|
Feb
(6) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2017 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
| 2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Grant R. <gr...@ac...> - 2010-11-25 16:44:52
|
Hi,
Working on Windows XP, Maven 2.09, JDK 1.5.0_22, TestNG 4.7, and
SimpleXML 2.3.6...
Try loading up my XML file and I get the error:
===============================================================
Running TestSuite
-- 10:39:21 DEBUG - Loading: rating-iso-import-config.xml
-- 10:39:21 ERROR - javax.xml.stream.XMLStreamException: ParseError at [row,col]
:[1,1]
Message: only whitespace content allowed before start tag and not r
at com.bea.xml.stream.MXParser.parseProlog(MXParser.java:2044)
at com.bea.xml.stream.MXParser.nextImpl(MXParser.java:1947)
===============================================================
To me that looks like I've got junk before the first character in the
file. The file is UTF-8 encoded, though nothing appears before it. Eg:
===============================================================
<propertyList>
<bindings>
<binding>
<regex>foo</regex>
<factor>bar</factor>
<mapper>baz</mapper>
...
===============================================================
Tried opening and saving the contents in Notepad as ASCII which didn't
seem to help.
This is weird because I pulled this code from another project in
which it worked just fine.
What questions aren't I asking? What am I doing wrong?
Best wishes,
Grant Rettke
--
http://www.wisdomandwonder.com/
ACM, AMA, COG, IEEE
|
|
From: Grant R. <gr...@ac...> - 2010-11-25 15:46:16
|
Hi, What is the best way to search this list? There seems to be a lot of content but I'm not figuring out how to search it; and fear posting previously answered questions. Best wishes, Grant Rettke -- http://www.wisdomandwonder.com/ ACM, AMA, COG, IEEE |
|
From: Timo R. <tim...@di...> - 2010-11-25 11:23:07
|
Hello, is it possible to avoid the xml-reference style for primitive type wrappers (like Integer, Boolean, Double...) when using the CycleStrategy? For example, this is what I get with the CycleStrategy (it uses "xid" and "xref" as it's xml-node-references): ------------------ <myClass xid="75"> <aBooleanProperty xref="198"/> <anotherBooleanProperty xref="42"/> <anIntegerProperty xref="45"/> <anotherIntegerProperty xref="125"/> <!-- Another hundred nodes follow here --> </myClass> ------------------ Since XML should be a human readable text format, and I must often open the XML in an editor to have a look at the values, the above is really hard to read, since I always have to look back to find the appropriate value behind the "xref" reference. It should better be read this way: ------------------ <myClass xid="75"> <aBooleanProperty>true</aBooleanProperty> <anotherBooleanProperty>false</anotherBooleanProperty> <anIntegerProperty>123</anIntegerProperty> <anotherIntegerProperty>456</anotherIntegerProperty> <!-- Another hundred nodes follow here --> </myClass> ------------------ Or even better: ------------------ <myClass xid="75"> <aBooleanProperty value="true"/> <anotherBooleanProperty value="false"/> <anIntegerProperty value="123"/> <anotherIntegerProperty value="456"/> <!-- Another hundred nodes follow here --> </myClass> ------------------ I can't think of a reason why primitive type wrapper must be handled with those xml-node-references, since those wrappers are a special kind of java type - for example, their hash code is equal to their internal value, or when I use an Integer for a method parameter, a copy of that object will be created instead of using by-ref. Do you think there is a way to improve the produced XML code like in my last example? Maybe there is a chance that this might be included in a future release? Or, if there are good reasons to not do that, I would like to hear them. Thanks a lot! Best regards, Timo |
|
From: Eric V. <eri...@ev...> - 2010-11-22 12:56:02
|
Hi Niall,
the reprocase is updated (see attachement ConstructorInjectionTest.java).
Regards,
Eric
On 19 November 2010 02:48, <Nia...@rb...> wrote:
> Hi,
>
> I have tried this and everything seems to work fine. I get no exceptions with other parameterized constructors. What exactly are you doing to get these errors?
>
> Regards,
> Niall
>
> -----Original Message-----
> From: Eric Vantillard [mailto:eri...@gm...]
> Sent: Tuesday, November 16, 2010 4:04 PM
> To: GALLAGHER, Niall, GBM
> Cc: <eri...@ev...>; <sim...@li...>
> Subject: Re: [Simple-support] about liveness of simple project
>
>
> Hi,
>
> Ok, but the problem is not related to default constructor.
> If you replace the default constructor buy a constructor taking ( for example a builder) you have the same problem.
>
> If you need it, i can change the sample code to show you (the stack trace will be the same).
>
>
> Envoyé de mon iPhone
> Regards,
> Eric
>
> Le 15 nov. 2010 à 22:50, <Nia...@rb...> a écrit :
>
>> Hi,
>>
>> Currently zero argument constructors can not be mixed with constructor injection. This is because the serialization process will always choose the zero argument constructor first as it has advantages in terms of cyclical dependencies.
>>
>> Niall
>>
>> -----Original Message-----
>> From: Eric Vantillard [mailto:eri...@ev...]
>> Sent: Wednesday, November 10, 2010 9:22 PM
>> To: sim...@li...
>> Subject: Re: [Simple-support] about liveness of simple project
>>
>> Hi List,
>>
>> I have some error when using constructor injection.
>>
>> Maybe the "org.simpleframework.xml.core.Scanner.validateConstructor"
>> must find one valid constructor and not validate all constructors.
>>
>> Can you double check the code ?
>>
>> Here is a repro case and the stack trace (see attachments)
>>
>>
>> Regards,
>> Eric
>>
>> stack trace :
>>
>> org.simpleframework.xml.core.ConstructorException: No match found for
>> field 'two' private final
>> thirdparty.simplexml.ConstructorInjectionTest$SimpleElementTwo
>> thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne.two in class thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne
>> at org.simpleframework.xml.core.Scanner.validateConstructor(Scanner.java:513)
>> at org.simpleframework.xml.core.Scanner.validateElements(Scanner.java:452)
>> at org.simpleframework.xml.core.Scanner.validate(Scanner.java:413)
>> at org.simpleframework.xml.core.Scanner.scan(Scanner.java:397)
>> at org.simpleframework.xml.core.Scanner.<init>(Scanner.java:120)
>> at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65)
>> at org.simpleframework.xml.core.Support.getScanner(Support.java:170)
>> at org.simpleframework.xml.core.Source.getScanner(Source.java:281)
>> at org.simpleframework.xml.core.Source.getCaller(Source.java:310)
>> at org.simpleframework.xml.core.Composite.writeReplace(Composite.java:1059)
>> at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1034)
>> at org.simpleframework.xml.core.Composite.write(Composite.java:943)
>> at org.simpleframework.xml.core.Composite.write(Composite.java:919)
>> at org.simpleframework.xml.core.Traverser.write(Traverser.java:236)
>> at org.simpleframework.xml.core.Traverser.write(Traverser.java:208)
>> at org.simpleframework.xml.core.Traverser.write(Traverser.java:186)
>> at org.simpleframework.xml.core.Persister.write(Persister.java:1187)
>> at org.simpleframework.xml.core.Persister.write(Persister.java:1169)
>> at org.simpleframework.xml.core.Persister.write(Persister.java:1147)
>> at org.simpleframework.xml.core.Persister.write(Persister.java:1266)
>> at org.simpleframework.xml.core.Persister.write(Persister.java:1248)
>> at org.simpleframework.xml.core.Persister.write(Persister.java:1229)
>> at org.simpleframework.xml.core.Persister.write(Persister.java:1208)
>> at thirdparty.simplexml.ConstructorInjectionTest.testConstructorInjection(ConstructorInjectionTest.java:78)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
>> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
>> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
>> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
>> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
>> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
>> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
>> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
>> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
>> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
>> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
>> at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
>> at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
>> at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:94)
>> at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:196)
>> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>> com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
>>
>>
>> On 9 November 2010 18:12, Eric Vantillard <eri...@ev...> wrote:
>>> Hi List,
>>>
>>> Is this project still alive ?
>>>
>>> As far as i can see, the las bug tracker closed was on 2007-12-22.
>>>
>>>
>>> Regards,
>>> Eric
>>>
>>
>> **********************************************************************
>> ************* The Royal Bank of Scotland plc. Registered in Scotland
>> No 90312.
>> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
>> Authorised and regulated by the Financial Services Authority. The
>> Royal Bank of Scotland N.V. is authorised and regulated by the De
>> Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and
>> is registered in the Commercial Register under number 33002587.
>> Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands.
>> The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are
>> authorised to act as agent for each other in certain jurisdictions.
>>
>> This e-mail message is confidential and for use by the addressee only.
>> If the message is received by anyone other than the addressee, please
>> return the message to the sender by replying to it and then delete the
>> message from your computer. Internet e-mails are not necessarily
>> secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland
>> N.V. including its affiliates ("RBS group") does not accept
>> responsibility for changes made to this message after it was sent.
>>
>> Whilst all reasonable care has been taken to avoid the transmission of
>> viruses, it is the responsibility of the recipient to ensure that the
>> onward transmission, opening or use of this message and any
>> attachments will not adversely affect its systems or data. No
>> responsibility is accepted by the RBS group in this regard and the
>> recipient should carry out such virus and other checks as it considers appropriate.
>>
>> Visit our website at www.rbs.com
>>
>> **********************************************************************
>> *************
>>
>
|
|
From: Niall G. <gal...@ya...> - 2010-11-20 04:51:55
|
Excellent. I haven not actually tried this myself but I knew it could be done to modify the input XML. Also its pretty transparent and is likely to be low in overhead, especially if your only overriding a small set of notes. Good to hear you got it working.
Niall
--- On Fri, 19/11/10, Hinkle, Cameron <Cam...@ni...> wrote:
From: Hinkle, Cameron <Cam...@ni...>
Subject: RE: [Simple-support] Dynamic node names
To: "Hinkle, Cameron" <Cam...@ni...>, "Niall Gallagher" <gal...@ya...>, "sim...@li..." <sim...@li...>
Received: Friday, 19 November, 2010, 3:21 PM
Thanks Niall. I finally got this working but I’m hoping I made it overly complicated. I created a custom XMLInputFactory, set the “javax.xml.stream.XMLInputFactory” System property to point to my Input Factory, and override the createXMLStreamReader(Reader) method to return a custom XMLEventReader. In that custom XMLEventReader, I override the nextEvent() method to return a custom XMLEvent if super.nextEvent().getEventType() equals START_ELEMENT. Then in the custom XMLEvent, I override getName() and do the node name changing there.
Have I got it figured out or am I doing more work than is necessary?
Thanks,
Cameron
Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately |
From: Niall Gallagher [mailto:gal...@ya...]
Sent: Friday, November 19, 2010 12:37 AM
To: sim...@li... ; Hinkle, Cameron
Subject: RE: [Simple-support] Dynamic node names
Hi,
I have thought about adding a set name a couple of times but never got around to it. There is a way to do this, but it might be not be what your looking for. Simple uses StAX by default if its available on the classpath. So what you can do is wrap an existing XMLInputFactory with a wrapper and do something like so.
if(XMLEvent == XMLEvent.START_ELEMENT) {
return new MyXMLEventWrapper(originalEvent, myNewName)
}
If you get the idea. Aside from that, XML element names will be immutable in Simple. I will hopefully be able to implement node renaming in the next release.
Regards,
Niall
--- On Thu, 18/11/10, Hinkle, Cameron <Cam...@ni...> wrote:
From: Hinkle, Cameron <Cam...@ni...>
Subject: RE: [Simple-support] Dynamic node names
To: "Niall Gallagher" <gal...@ya...>, " sim...@li... " < sim...@li... >
Received: Thursday, 18 November, 2010, 2:57 PM
Hi Niall. Thanks for your response but after trying out the Visitor strategy, I don’t think it or the @Commit/@Validate does what I need. To be clearer, I’d like to take an XML file that looks like this:
<contact>
<firstname>Cameron</firstname>
<lastname>Hinkle</lastname>
</contact>
…and another XML file that looks like this:
<c>
<fn>Cameron</fn>
<ln>Hinkle</ln>
</c>
…and parse them both using the same Simple objects. And I’d like those node names to be determined at run time with a Map that I provide, mapping “contact” to “c”, “firstname” to “fn”, and “lastname” to “ln”.
I tried creating a Visitor, which I thought would work if I could change the node name inside Visitor.read() but there’s no setName() method on InputNode and the documentation for the Node interface says the node name is immutable. It looks like I could maybe use a Filter if I was serializing the XML but for deserializing it didn’t look like that option was available. Does this make more sense and can you offer any suggestion?
Thanks again for your help,
Cameron
Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately |
From: Niall Gallagher [mailto:gal...@ya...]
Sent: Thursday, November 18, 2010 12:31 AM
To: sim...@li... ; Hinkle, Cameron
Subject: Re: [Simple-support] Dynamic node names
Hi,
Yes there is, take a look at @Commit and @Validate, or if you like just write a Visitor, it visits each node as its being deserialized. You can simply do OutputNode.setValue if you like. There are plenty of examples of each in the test cases.
Niall
--- On Tue, 16/11/10, Hinkle, Cameron <Cam...@ni...> wrote:
From: Hinkle, Cameron <Cam...@ni...>
Subject: [Simple-support] Dynamic node names
To: " sim...@li... " < sim...@li... >
Received: Tuesday, 16 November, 2010, 4:29 PM
Greetings,
I’m using Simple on a project but have run into a potential roadblock. Some of the XML I need to deserialize has node names that are only known at run time. I have been reading all the XML into a String and running a replacement method to standardize all the node names according to my Simple annotations, but I’d like operate on a stream instead of a String. Is there any mechanism in Simple that would allow me to change the node names defined by my annotations at run time?
Thanks,
Cameron
Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately |
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Hinkle, C. <Cam...@ni...> - 2010-11-19 23:22:52
|
Thanks Niall. I finally got this working but I'm hoping I made it overly complicated. I created a custom XMLInputFactory, set the "javax.xml.stream.XMLInputFactory" System property to point to my Input Factory, and override the createXMLStreamReader(Reader) method to return a custom XMLEventReader. In that custom XMLEventReader, I override the nextEvent() method to return a custom XMLEvent if super.nextEvent().getEventType() equals START_ELEMENT. Then in the custom XMLEvent, I override getName() and do the node name changing there.
Have I got it figured out or am I doing more work than is necessary?
Thanks,
Cameron
Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately |
________________________________
From: Niall Gallagher [mailto:gal...@ya...]
Sent: Friday, November 19, 2010 12:37 AM
To: sim...@li...; Hinkle, Cameron
Subject: RE: [Simple-support] Dynamic node names
Hi,
I have thought about adding a set name a couple of times but never got around to it. There is a way to do this, but it might be not be what your looking for. Simple uses StAX by default if its available on the classpath. So what you can do is wrap an existing XMLInputFactory with a wrapper and do something like so.
if(XMLEvent == XMLEvent.START_ELEMENT) {
return new MyXMLEventWrapper(originalEvent, myNewName)
}
If you get the idea. Aside from that, XML element names will be immutable in Simple. I will hopefully be able to implement node renaming in the next release.
Regards,
Niall
--- On Thu, 18/11/10, Hinkle, Cameron <Cam...@ni...> wrote:
From: Hinkle, Cameron <Cam...@ni...>
Subject: RE: [Simple-support] Dynamic node names
To: "Niall Gallagher" <gal...@ya...>, "sim...@li..." <sim...@li...>
Received: Thursday, 18 November, 2010, 2:57 PM
Hi Niall. Thanks for your response but after trying out the Visitor strategy, I don't think it or the @Commit/@Validate does what I need. To be clearer, I'd like to take an XML file that looks like this:
<contact>
<firstname>Cameron</firstname>
<lastname>Hinkle</lastname>
</contact>
...and another XML file that looks like this:
<c>
<fn>Cameron</fn>
<ln>Hinkle</ln>
</c>
...and parse them both using the same Simple objects. And I'd like those node names to be determined at run time with a Map that I provide, mapping "contact" to "c", "firstname" to "fn", and "lastname" to "ln".
I tried creating a Visitor, which I thought would work if I could change the node name inside Visitor.read() but there's no setName() method on InputNode and the documentation for the Node interface says the node name is immutable. It looks like I could maybe use a Filter if I was serializing the XML but for deserializing it didn't look like that option was available. Does this make more sense and can you offer any suggestion?
Thanks again for your help,
Cameron
Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately |
________________________________
From: Niall Gallagher [mailto:gal...@ya...]
Sent: Thursday, November 18, 2010 12:31 AM
To: sim...@li... ; Hinkle, Cameron
Subject: Re: [Simple-support] Dynamic node names
Hi,
Yes there is, take a look at @Commit and @Validate, or if you like just write a Visitor, it visits each node as its being deserialized. You can simply do OutputNode.setValue if you like. There are plenty of examples of each in the test cases.
Niall
--- On Tue, 16/11/10, Hinkle, Cameron <Cam...@ni...> wrote:
From: Hinkle, Cameron <Cam...@ni...>
Subject: [Simple-support] Dynamic node names
To: " sim...@li... " < sim...@li... >
Received: Tuesday, 16 November, 2010, 4:29 PM
Greetings,
I'm using Simple on a project but have run into a potential roadblock. Some of the XML I need to deserialize has node names that are only known at run time. I have been reading all the XML into a String and running a replacement method to standardize all the node names according to my Simple annotations, but I'd like operate on a stream instead of a String. Is there any mechanism in Simple that would allow me to change the node names defined by my annotations at run time?
Thanks,
Cameron
Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately |
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...<http://au.mc331.mail.yahoo.com/mc/compose?to=...@li...>
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Niall G. <gal...@ya...> - 2010-11-19 08:36:53
|
Hi,
I have thought about adding a set name a couple of times but never got around to it. There is a way to do this, but it might be not be what your looking for. Simple uses StAX by default if its available on the classpath. So what you can do is wrap an existing XMLInputFactory with a wrapper and do something like so.
if(XMLEvent == XMLEvent.START_ELEMENT) {
return new MyXMLEventWrapper(originalEvent, myNewName)
}
If you get the idea. Aside from that, XML element names will be immutable in Simple. I will hopefully be able to implement node renaming in the next release.
Regards,
Niall
--- On Thu, 18/11/10, Hinkle, Cameron <Cam...@ni...> wrote:
From: Hinkle, Cameron <Cam...@ni...>
Subject: RE: [Simple-support] Dynamic node names
To: "Niall Gallagher" <gal...@ya...>, "sim...@li..." <sim...@li...>
Received: Thursday, 18 November, 2010, 2:57 PM
Hi Niall. Thanks for your response but after trying out the Visitor strategy, I don’t think it or the @Commit/@Validate does what I need. To be clearer, I’d like to take an XML file that looks like this:
<contact>
<firstname>Cameron</firstname>
<lastname>Hinkle</lastname>
</contact>
…and another XML file that looks like this:
<c>
<fn>Cameron</fn>
<ln>Hinkle</ln>
</c>
…and parse them both using the same Simple objects. And I’d like those node names to be determined at run time with a Map that I provide, mapping “contact” to “c”, “firstname” to “fn”, and “lastname” to “ln”.
I tried creating a Visitor, which I thought would work if I could change the node name inside Visitor.read() but there’s no setName() method on InputNode and the documentation for the Node interface says the node name is immutable. It looks like I could maybe use a Filter if I was serializing the XML but for deserializing it didn’t look like that option was available. Does this make more sense and can you offer any suggestion?
Thanks again for your help,
Cameron
Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately |
From: Niall Gallagher [mailto:gal...@ya...]
Sent: Thursday, November 18, 2010 12:31 AM
To: sim...@li... ; Hinkle, Cameron
Subject: Re: [Simple-support] Dynamic node names
Hi,
Yes there is, take a look at @Commit and @Validate, or if you like just write a Visitor, it visits each node as its being deserialized. You can simply do OutputNode.setValue if you like. There are plenty of examples of each in the test cases.
Niall
--- On Tue, 16/11/10, Hinkle, Cameron <Cam...@ni...> wrote:
From: Hinkle, Cameron <Cam...@ni...>
Subject: [Simple-support] Dynamic node names
To: " sim...@li... " < sim...@li... >
Received: Tuesday, 16 November, 2010, 4:29 PM
Greetings,
I’m using Simple on a project but have run into a potential roadblock. Some of the XML I need to deserialize has node names that are only known at run time. I have been reading all the XML into a String and running a replacement method to standardize all the node names according to my Simple annotations, but I’d like operate on a stream instead of a String. Is there any mechanism in Simple that would allow me to change the node names defined by my annotations at run time?
Thanks,
Cameron
Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately |
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: <Nia...@rb...> - 2010-11-19 01:49:11
|
Hi,
I have tried this and everything seems to work fine. I get no exceptions with other parameterized constructors. What exactly are you doing to get these errors?
Regards,
Niall
-----Original Message-----
From: Eric Vantillard [mailto:eri...@gm...]
Sent: Tuesday, November 16, 2010 4:04 PM
To: GALLAGHER, Niall, GBM
Cc: <eri...@ev...>; <sim...@li...>
Subject: Re: [Simple-support] about liveness of simple project
Hi,
Ok, but the problem is not related to default constructor.
If you replace the default constructor buy a constructor taking ( for example a builder) you have the same problem.
If you need it, i can change the sample code to show you (the stack trace will be the same).
Envoyé de mon iPhone
Regards,
Eric
Le 15 nov. 2010 à 22:50, <Nia...@rb...> a écrit :
> Hi,
>
> Currently zero argument constructors can not be mixed with constructor injection. This is because the serialization process will always choose the zero argument constructor first as it has advantages in terms of cyclical dependencies.
>
> Niall
>
> -----Original Message-----
> From: Eric Vantillard [mailto:eri...@ev...]
> Sent: Wednesday, November 10, 2010 9:22 PM
> To: sim...@li...
> Subject: Re: [Simple-support] about liveness of simple project
>
> Hi List,
>
> I have some error when using constructor injection.
>
> Maybe the "org.simpleframework.xml.core.Scanner.validateConstructor"
> must find one valid constructor and not validate all constructors.
>
> Can you double check the code ?
>
> Here is a repro case and the stack trace (see attachments)
>
>
> Regards,
> Eric
>
> stack trace :
>
> org.simpleframework.xml.core.ConstructorException: No match found for
> field 'two' private final
> thirdparty.simplexml.ConstructorInjectionTest$SimpleElementTwo
> thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne.two in class thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne
> at org.simpleframework.xml.core.Scanner.validateConstructor(Scanner.java:513)
> at org.simpleframework.xml.core.Scanner.validateElements(Scanner.java:452)
> at org.simpleframework.xml.core.Scanner.validate(Scanner.java:413)
> at org.simpleframework.xml.core.Scanner.scan(Scanner.java:397)
> at org.simpleframework.xml.core.Scanner.<init>(Scanner.java:120)
> at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65)
> at org.simpleframework.xml.core.Support.getScanner(Support.java:170)
> at org.simpleframework.xml.core.Source.getScanner(Source.java:281)
> at org.simpleframework.xml.core.Source.getCaller(Source.java:310)
> at org.simpleframework.xml.core.Composite.writeReplace(Composite.java:1059)
> at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1034)
> at org.simpleframework.xml.core.Composite.write(Composite.java:943)
> at org.simpleframework.xml.core.Composite.write(Composite.java:919)
> at org.simpleframework.xml.core.Traverser.write(Traverser.java:236)
> at org.simpleframework.xml.core.Traverser.write(Traverser.java:208)
> at org.simpleframework.xml.core.Traverser.write(Traverser.java:186)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1187)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1169)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1147)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1266)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1248)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1229)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1208)
> at thirdparty.simplexml.ConstructorInjectionTest.testConstructorInjection(ConstructorInjectionTest.java:78)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:94)
> at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:196)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
>
>
> On 9 November 2010 18:12, Eric Vantillard <eri...@ev...> wrote:
>> Hi List,
>>
>> Is this project still alive ?
>>
>> As far as i can see, the las bug tracker closed was on 2007-12-22.
>>
>>
>> Regards,
>> Eric
>>
>
> **********************************************************************
> ************* The Royal Bank of Scotland plc. Registered in Scotland
> No 90312.
> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
> Authorised and regulated by the Financial Services Authority. The
> Royal Bank of Scotland N.V. is authorised and regulated by the De
> Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and
> is registered in the Commercial Register under number 33002587.
> Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands.
> The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are
> authorised to act as agent for each other in certain jurisdictions.
>
> This e-mail message is confidential and for use by the addressee only.
> If the message is received by anyone other than the addressee, please
> return the message to the sender by replying to it and then delete the
> message from your computer. Internet e-mails are not necessarily
> secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland
> N.V. including its affiliates ("RBS group") does not accept
> responsibility for changes made to this message after it was sent.
>
> Whilst all reasonable care has been taken to avoid the transmission of
> viruses, it is the responsibility of the recipient to ensure that the
> onward transmission, opening or use of this message and any
> attachments will not adversely affect its systems or data. No
> responsibility is accepted by the RBS group in this regard and the
> recipient should carry out such virus and other checks as it considers appropriate.
>
> Visit our website at www.rbs.com
>
> **********************************************************************
> *************
>
|
|
From: Hinkle, C. <Cam...@ni...> - 2010-11-18 23:32:59
|
Hi Niall. Thanks for your response but after trying out the Visitor strategy, I don't think it or the @Commit/@Validate does what I need. To be clearer, I'd like to take an XML file that looks like this:
<contact>
<firstname>Cameron</firstname>
<lastname>Hinkle</lastname>
</contact>
...and another XML file that looks like this:
<c>
<fn>Cameron</fn>
<ln>Hinkle</ln>
</c>
...and parse them both using the same Simple objects. And I'd like those node names to be determined at run time with a Map that I provide, mapping "contact" to "c", "firstname" to "fn", and "lastname" to "ln".
I tried creating a Visitor, which I thought would work if I could change the node name inside Visitor.read() but there's no setName() method on InputNode and the documentation for the Node interface says the node name is immutable. It looks like I could maybe use a Filter if I was serializing the XML but for deserializing it didn't look like that option was available. Does this make more sense and can you offer any suggestion?
Thanks again for your help,
Cameron
Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately |
________________________________
From: Niall Gallagher [mailto:gal...@ya...]
Sent: Thursday, November 18, 2010 12:31 AM
To: sim...@li...; Hinkle, Cameron
Subject: Re: [Simple-support] Dynamic node names
Hi,
Yes there is, take a look at @Commit and @Validate, or if you like just write a Visitor, it visits each node as its being deserialized. You can simply do OutputNode.setValue if you like. There are plenty of examples of each in the test cases.
Niall
--- On Tue, 16/11/10, Hinkle, Cameron <Cam...@ni...> wrote:
From: Hinkle, Cameron <Cam...@ni...>
Subject: [Simple-support] Dynamic node names
To: "sim...@li..." <sim...@li...>
Received: Tuesday, 16 November, 2010, 4:29 PM
Greetings,
I'm using Simple on a project but have run into a potential roadblock. Some of the XML I need to deserialize has node names that are only known at run time. I have been reading all the XML into a String and running a replacement method to standardize all the node names according to my Simple annotations, but I'd like operate on a stream instead of a String. Is there any mechanism in Simple that would allow me to change the node names defined by my annotations at run time?
Thanks,
Cameron
Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately |
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3.
Spend less time writing and rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...<http://au.mc331.mail.yahoo.com/mc/compose?to=...@li...>
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Niall G. <gal...@ya...> - 2010-11-18 08:30:40
|
Hi, Yes there is, take a look at @Commit and @Validate, or if you like just write a Visitor, it visits each node as its being deserialized. You can simply do OutputNode.setValue if you like. There are plenty of examples of each in the test cases. Niall --- On Tue, 16/11/10, Hinkle, Cameron <Cam...@ni...> wrote: From: Hinkle, Cameron <Cam...@ni...> Subject: [Simple-support] Dynamic node names To: "sim...@li..." <sim...@li...> Received: Tuesday, 16 November, 2010, 4:29 PM Greetings, I’m using Simple on a project but have run into a potential roadblock. Some of the XML I need to deserialize has node names that are only known at run time. I have been reading all the XML into a String and running a replacement method to standardize all the node names according to my Simple annotations, but I’d like operate on a stream instead of a String. Is there any mechanism in Simple that would allow me to change the node names defined by my annotations at run time? Thanks, Cameron Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately | -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Hinkle, C. <Cam...@ni...> - 2010-11-17 01:04:41
|
Greetings, I'm using Simple on a project but have run into a potential roadblock. Some of the XML I need to deserialize has node names that are only known at run time. I have been reading all the XML into a String and running a replacement method to standardize all the node names according to my Simple annotations, but I'd like operate on a stream instead of a String. Is there any mechanism in Simple that would allow me to change the node names defined by my annotations at run time? Thanks, Cameron Cameron Hinkle | Senior Application Engineer | Nike DCIT | 503.532.3075 | 7. Evolve Immediately | |
|
From: <Nia...@rb...> - 2010-11-16 05:15:53
|
Hi,
Well, if that's the case perhaps there is an issue? If you could alter the test that would be appreciated. Ill investigate.
Niall
-----Original Message-----
From: Eric Vantillard [mailto:eri...@gm...]
Sent: Tuesday, November 16, 2010 4:04 PM
To: GALLAGHER, Niall, GBM
Cc: <eri...@ev...>; <sim...@li...>
Subject: Re: [Simple-support] about liveness of simple project
Hi,
Ok, but the problem is not related to default constructor.
If you replace the default constructor buy a constructor taking ( for example a builder) you have the same problem.
If you need it, i can change the sample code to show you (the stack trace will be the same).
Envoyé de mon iPhone
Regards,
Eric
Le 15 nov. 2010 à 22:50, <Nia...@rb...> a écrit :
> Hi,
>
> Currently zero argument constructors can not be mixed with constructor injection. This is because the serialization process will always choose the zero argument constructor first as it has advantages in terms of cyclical dependencies.
>
> Niall
>
> -----Original Message-----
> From: Eric Vantillard [mailto:eri...@ev...]
> Sent: Wednesday, November 10, 2010 9:22 PM
> To: sim...@li...
> Subject: Re: [Simple-support] about liveness of simple project
>
> Hi List,
>
> I have some error when using constructor injection.
>
> Maybe the "org.simpleframework.xml.core.Scanner.validateConstructor"
> must find one valid constructor and not validate all constructors.
>
> Can you double check the code ?
>
> Here is a repro case and the stack trace (see attachments)
>
>
> Regards,
> Eric
>
> stack trace :
>
> org.simpleframework.xml.core.ConstructorException: No match found for
> field 'two' private final
> thirdparty.simplexml.ConstructorInjectionTest$SimpleElementTwo
> thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne.two in class thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne
> at org.simpleframework.xml.core.Scanner.validateConstructor(Scanner.java:513)
> at org.simpleframework.xml.core.Scanner.validateElements(Scanner.java:452)
> at org.simpleframework.xml.core.Scanner.validate(Scanner.java:413)
> at org.simpleframework.xml.core.Scanner.scan(Scanner.java:397)
> at org.simpleframework.xml.core.Scanner.<init>(Scanner.java:120)
> at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65)
> at org.simpleframework.xml.core.Support.getScanner(Support.java:170)
> at org.simpleframework.xml.core.Source.getScanner(Source.java:281)
> at org.simpleframework.xml.core.Source.getCaller(Source.java:310)
> at org.simpleframework.xml.core.Composite.writeReplace(Composite.java:1059)
> at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1034)
> at org.simpleframework.xml.core.Composite.write(Composite.java:943)
> at org.simpleframework.xml.core.Composite.write(Composite.java:919)
> at org.simpleframework.xml.core.Traverser.write(Traverser.java:236)
> at org.simpleframework.xml.core.Traverser.write(Traverser.java:208)
> at org.simpleframework.xml.core.Traverser.write(Traverser.java:186)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1187)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1169)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1147)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1266)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1248)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1229)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1208)
> at thirdparty.simplexml.ConstructorInjectionTest.testConstructorInjection(ConstructorInjectionTest.java:78)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:94)
> at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:196)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
>
>
> On 9 November 2010 18:12, Eric Vantillard <eri...@ev...> wrote:
>> Hi List,
>>
>> Is this project still alive ?
>>
>> As far as i can see, the las bug tracker closed was on 2007-12-22.
>>
>>
>> Regards,
>> Eric
>>
>
> **********************************************************************
> ************* The Royal Bank of Scotland plc. Registered in Scotland
> No 90312.
> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
> Authorised and regulated by the Financial Services Authority. The
> Royal Bank of Scotland N.V. is authorised and regulated by the De
> Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and
> is registered in the Commercial Register under number 33002587.
> Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands.
> The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are
> authorised to act as agent for each other in certain jurisdictions.
>
> This e-mail message is confidential and for use by the addressee only.
> If the message is received by anyone other than the addressee, please
> return the message to the sender by replying to it and then delete the
> message from your computer. Internet e-mails are not necessarily
> secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland
> N.V. including its affiliates ("RBS group") does not accept
> responsibility for changes made to this message after it was sent.
>
> Whilst all reasonable care has been taken to avoid the transmission of
> viruses, it is the responsibility of the recipient to ensure that the
> onward transmission, opening or use of this message and any
> attachments will not adversely affect its systems or data. No
> responsibility is accepted by the RBS group in this regard and the
> recipient should carry out such virus and other checks as it considers appropriate.
>
> Visit our website at www.rbs.com
>
> **********************************************************************
> *************
>
|
|
From: Eric V. <eri...@gm...> - 2010-11-16 05:04:27
|
Hi,
Ok, but the problem is not related to default constructor.
If you replace the default constructor buy a constructor taking ( for example a builder) you have the same problem.
If you need it, i can change the sample code to show you (the stack trace will be the same).
Envoyé de mon iPhone
Regards,
Eric
Le 15 nov. 2010 à 22:50, <Nia...@rb...> a écrit :
> Hi,
>
> Currently zero argument constructors can not be mixed with constructor injection. This is because the serialization process will always choose the zero argument constructor first as it has advantages in terms of cyclical dependencies.
>
> Niall
>
> -----Original Message-----
> From: Eric Vantillard [mailto:eri...@ev...]
> Sent: Wednesday, November 10, 2010 9:22 PM
> To: sim...@li...
> Subject: Re: [Simple-support] about liveness of simple project
>
> Hi List,
>
> I have some error when using constructor injection.
>
> Maybe the "org.simpleframework.xml.core.Scanner.validateConstructor"
> must find one valid constructor and not validate all constructors.
>
> Can you double check the code ?
>
> Here is a repro case and the stack trace (see attachments)
>
>
> Regards,
> Eric
>
> stack trace :
>
> org.simpleframework.xml.core.ConstructorException: No match found for field 'two' private final thirdparty.simplexml.ConstructorInjectionTest$SimpleElementTwo
> thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne.two in class thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne
> at org.simpleframework.xml.core.Scanner.validateConstructor(Scanner.java:513)
> at org.simpleframework.xml.core.Scanner.validateElements(Scanner.java:452)
> at org.simpleframework.xml.core.Scanner.validate(Scanner.java:413)
> at org.simpleframework.xml.core.Scanner.scan(Scanner.java:397)
> at org.simpleframework.xml.core.Scanner.<init>(Scanner.java:120)
> at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65)
> at org.simpleframework.xml.core.Support.getScanner(Support.java:170)
> at org.simpleframework.xml.core.Source.getScanner(Source.java:281)
> at org.simpleframework.xml.core.Source.getCaller(Source.java:310)
> at org.simpleframework.xml.core.Composite.writeReplace(Composite.java:1059)
> at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1034)
> at org.simpleframework.xml.core.Composite.write(Composite.java:943)
> at org.simpleframework.xml.core.Composite.write(Composite.java:919)
> at org.simpleframework.xml.core.Traverser.write(Traverser.java:236)
> at org.simpleframework.xml.core.Traverser.write(Traverser.java:208)
> at org.simpleframework.xml.core.Traverser.write(Traverser.java:186)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1187)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1169)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1147)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1266)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1248)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1229)
> at org.simpleframework.xml.core.Persister.write(Persister.java:1208)
> at thirdparty.simplexml.ConstructorInjectionTest.testConstructorInjection(ConstructorInjectionTest.java:78)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
> at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
> at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
> at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
> at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
> at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:94)
> at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:196)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
>
>
> On 9 November 2010 18:12, Eric Vantillard <eri...@ev...> wrote:
>> Hi List,
>>
>> Is this project still alive ?
>>
>> As far as i can see, the las bug tracker closed was on 2007-12-22.
>>
>>
>> Regards,
>> Eric
>>
>
> ***********************************************************************************
> The Royal Bank of Scotland plc. Registered in Scotland No 90312.
> Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
> Authorised and regulated by the Financial Services Authority. The
> Royal Bank of Scotland N.V. is authorised and regulated by the
> De Nederlandsche Bank and has its seat at Amsterdam, the
> Netherlands, and is registered in the Commercial Register under
> number 33002587. Registered Office: Gustav Mahlerlaan 10,
> Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and
> The Royal Bank of Scotland plc are authorised to act as agent for each
> other in certain jurisdictions.
>
> This e-mail message is confidential and for use by the addressee only.
> If the message is received by anyone other than the addressee, please
> return the message to the sender by replying to it and then delete the
> message from your computer. Internet e-mails are not necessarily
> secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland
> N.V. including its affiliates ("RBS group") does not accept responsibility
> for changes made to this message after it was sent.
>
> Whilst all reasonable care has been taken to avoid the transmission of
> viruses, it is the responsibility of the recipient to ensure that the onward
> transmission, opening or use of this message and any attachments will
> not adversely affect its systems or data. No responsibility is accepted
> by the RBS group in this regard and the recipient should carry out such
> virus and other checks as it considers appropriate.
>
> Visit our website at www.rbs.com
>
> ***********************************************************************************
>
|
|
From: <Nia...@rb...> - 2010-11-15 21:51:09
|
Hi,
Currently zero argument constructors can not be mixed with constructor injection. This is because the serialization process will always choose the zero argument constructor first as it has advantages in terms of cyclical dependencies.
Niall
-----Original Message-----
From: Eric Vantillard [mailto:eri...@ev...]
Sent: Wednesday, November 10, 2010 9:22 PM
To: sim...@li...
Subject: Re: [Simple-support] about liveness of simple project
Hi List,
I have some error when using constructor injection.
Maybe the "org.simpleframework.xml.core.Scanner.validateConstructor"
must find one valid constructor and not validate all constructors.
Can you double check the code ?
Here is a repro case and the stack trace (see attachments)
Regards,
Eric
stack trace :
org.simpleframework.xml.core.ConstructorException: No match found for field 'two' private final thirdparty.simplexml.ConstructorInjectionTest$SimpleElementTwo
thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne.two in class thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne
at org.simpleframework.xml.core.Scanner.validateConstructor(Scanner.java:513)
at org.simpleframework.xml.core.Scanner.validateElements(Scanner.java:452)
at org.simpleframework.xml.core.Scanner.validate(Scanner.java:413)
at org.simpleframework.xml.core.Scanner.scan(Scanner.java:397)
at org.simpleframework.xml.core.Scanner.<init>(Scanner.java:120)
at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65)
at org.simpleframework.xml.core.Support.getScanner(Support.java:170)
at org.simpleframework.xml.core.Source.getScanner(Source.java:281)
at org.simpleframework.xml.core.Source.getCaller(Source.java:310)
at org.simpleframework.xml.core.Composite.writeReplace(Composite.java:1059)
at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1034)
at org.simpleframework.xml.core.Composite.write(Composite.java:943)
at org.simpleframework.xml.core.Composite.write(Composite.java:919)
at org.simpleframework.xml.core.Traverser.write(Traverser.java:236)
at org.simpleframework.xml.core.Traverser.write(Traverser.java:208)
at org.simpleframework.xml.core.Traverser.write(Traverser.java:186)
at org.simpleframework.xml.core.Persister.write(Persister.java:1187)
at org.simpleframework.xml.core.Persister.write(Persister.java:1169)
at org.simpleframework.xml.core.Persister.write(Persister.java:1147)
at org.simpleframework.xml.core.Persister.write(Persister.java:1266)
at org.simpleframework.xml.core.Persister.write(Persister.java:1248)
at org.simpleframework.xml.core.Persister.write(Persister.java:1229)
at org.simpleframework.xml.core.Persister.write(Persister.java:1208)
at thirdparty.simplexml.ConstructorInjectionTest.testConstructorInjection(ConstructorInjectionTest.java:78)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:94)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:196)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115)
On 9 November 2010 18:12, Eric Vantillard <eri...@ev...> wrote:
> Hi List,
>
> Is this project still alive ?
>
> As far as i can see, the las bug tracker closed was on 2007-12-22.
>
>
> Regards,
> Eric
>
***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312.
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority. The
Royal Bank of Scotland N.V. is authorised and regulated by the
De Nederlandsche Bank and has its seat at Amsterdam, the
Netherlands, and is registered in the Commercial Register under
number 33002587. Registered Office: Gustav Mahlerlaan 10,
Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and
The Royal Bank of Scotland plc are authorised to act as agent for each
other in certain jurisdictions.
This e-mail message is confidential and for use by the addressee only.
If the message is received by anyone other than the addressee, please
return the message to the sender by replying to it and then delete the
message from your computer. Internet e-mails are not necessarily
secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland
N.V. including its affiliates ("RBS group") does not accept responsibility
for changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will
not adversely affect its systems or data. No responsibility is accepted
by the RBS group in this regard and the recipient should carry out such
virus and other checks as it considers appropriate.
Visit our website at www.rbs.com
***********************************************************************************
|
|
From: icohen <ir...@us...> - 2010-11-11 18:13:58
|
Hi Nail, My problem is that I'm using abstract class and derived classes to implement the xsd:choice , but it's a nested class inside the main "Response" class, how should I tell to the Persister which class of the "ACTIONS" choice should be deserialized ? Thanks, Irina niall.gallagher wrote: > > Hi, > > So whats the actual problem? > > Niall > > -----Original Message----- > From: icohen [mailto:ir...@us...] > Sent: Thursday, November 11, 2010 1:55 AM > To: sim...@li... > Subject: [Simple-support] Deserialize the complex object - XSD:CHOICE > > > Hello, I'm pretty new to the Simple , using it for the XML marshaling for > Android. I have a problem with deserialization of the complex object, > please see the draft or the XML schema below. > > Please advise which method should I use for the dynamic class > deserialazition ? Thanks > > <xsd:element name="RESPONSE"> > > <xsd:complexType> > <xsd:sequence> > <xsd:element ref="STATUS"/> > <xsd:choice> > <xsd:group ref="ACTIONS"/> > <xsd:element ref="ACTION"/> > </xsd:choice> > </xsd:sequence> > </xsd:complexType> > </xsd:element> > > > <xsd:group name="ACTIONS"> > > <xsd:choice> > <xsd:element ref="LOGIN"/> > <xsd:element ref="LOGOUT"/> > <xsd:element ref="INFO"/> > <xsd:element ref="DIRECTORY_CONTENT"/> > </xsd:choice> > </xsd:group> > -- > View this message in context: > http://old.nabble.com/Deserialize-the-complex-object---XSD%3ACHOICE-tp30181223p30181223.html > Sent from the Simple XML Serialization mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > > *********************************************************************************** > The Royal Bank of Scotland plc. Registered in Scotland No 90312. > Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. > Authorised and regulated by the Financial Services Authority. The > Royal Bank of Scotland N.V. is authorised and regulated by the > De Nederlandsche Bank and has its seat at Amsterdam, the > Netherlands, and is registered in the Commercial Register under > number 33002587. Registered Office: Gustav Mahlerlaan 10, > Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and > The Royal Bank of Scotland plc are authorised to act as agent for each > other in certain jurisdictions. > > This e-mail message is confidential and for use by the addressee only. > If the message is received by anyone other than the addressee, please > return the message to the sender by replying to it and then delete the > message from your computer. Internet e-mails are not necessarily > secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland > N.V. including its affiliates ("RBS group") does not accept responsibility > for changes made to this message after it was sent. > > Whilst all reasonable care has been taken to avoid the transmission of > viruses, it is the responsibility of the recipient to ensure that the > onward > transmission, opening or use of this message and any attachments will > not adversely affect its systems or data. No responsibility is accepted > by the RBS group in this regard and the recipient should carry out such > virus and other checks as it considers appropriate. > > Visit our website at www.rbs.com > > *********************************************************************************** > > > ------------------------------------------------------------------------------ > The Next 800 Companies to Lead America's Growth: New Video Whitepaper > David G. Thomson, author of the best-selling book "Blueprint to a > Billion" shares his insights and actions to help propel your > business during the next growth cycle. Listen Now! > http://p.sf.net/sfu/SAP-dev2dev > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > > -- View this message in context: http://old.nabble.com/Deserialize-the-complex-object---XSD%3ACHOICE-tp30181223p30192517.html Sent from the Simple XML Serialization mailing list archive at Nabble.com. |
|
From: <Nia...@rb...> - 2010-11-10 21:35:46
|
Hi,
So whats the actual problem?
Niall
-----Original Message-----
From: icohen [mailto:ir...@us...]
Sent: Thursday, November 11, 2010 1:55 AM
To: sim...@li...
Subject: [Simple-support] Deserialize the complex object - XSD:CHOICE
Hello, I'm pretty new to the Simple , using it for the XML marshaling for Android. I have a problem with deserialization of the complex object, please see the draft or the XML schema below.
Please advise which method should I use for the dynamic class deserialazition ? Thanks
<xsd:element name="RESPONSE">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="STATUS"/>
<xsd:choice>
<xsd:group ref="ACTIONS"/>
<xsd:element ref="ACTION"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:group name="ACTIONS">
<xsd:choice>
<xsd:element ref="LOGIN"/>
<xsd:element ref="LOGOUT"/>
<xsd:element ref="INFO"/>
<xsd:element ref="DIRECTORY_CONTENT"/>
</xsd:choice>
</xsd:group>
--
View this message in context: http://old.nabble.com/Deserialize-the-complex-object---XSD%3ACHOICE-tp30181223p30181223.html
Sent from the Simple XML Serialization mailing list archive at Nabble.com.
------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a
Billion" shares his insights and actions to help propel your
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312.
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority. The
Royal Bank of Scotland N.V. is authorised and regulated by the
De Nederlandsche Bank and has its seat at Amsterdam, the
Netherlands, and is registered in the Commercial Register under
number 33002587. Registered Office: Gustav Mahlerlaan 10,
Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and
The Royal Bank of Scotland plc are authorised to act as agent for each
other in certain jurisdictions.
This e-mail message is confidential and for use by the addressee only.
If the message is received by anyone other than the addressee, please
return the message to the sender by replying to it and then delete the
message from your computer. Internet e-mails are not necessarily
secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland
N.V. including its affiliates ("RBS group") does not accept responsibility
for changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will
not adversely affect its systems or data. No responsibility is accepted
by the RBS group in this regard and the recipient should carry out such
virus and other checks as it considers appropriate.
Visit our website at www.rbs.com
***********************************************************************************
|
|
From: icohen <ir...@us...> - 2010-11-10 14:54:50
|
Hello, I'm pretty new to the Simple , using it for the XML marshaling for
Android. I have a problem with deserialization of the complex object,
please see the draft or the XML schema below.
Please advise which method should I use for the dynamic class
deserialazition ? Thanks
<xsd:element name="RESPONSE">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="STATUS"/>
<xsd:choice>
<xsd:group ref="ACTIONS"/>
<xsd:element ref="ACTION"/>
</xsd:choice>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:group name="ACTIONS">
<xsd:choice>
<xsd:element ref="LOGIN"/>
<xsd:element ref="LOGOUT"/>
<xsd:element ref="INFO"/>
<xsd:element ref="DIRECTORY_CONTENT"/>
</xsd:choice>
</xsd:group>
--
View this message in context: http://old.nabble.com/Deserialize-the-complex-object---XSD%3ACHOICE-tp30181223p30181223.html
Sent from the Simple XML Serialization mailing list archive at Nabble.com.
|
|
From: Eric V. <eri...@ev...> - 2010-11-10 10:22:21
|
Hi List, I have some error when using constructor injection. Maybe the "org.simpleframework.xml.core.Scanner.validateConstructor" must find one valid constructor and not validate all constructors. Can you double check the code ? Here is a repro case and the stack trace (see attachments) Regards, Eric stack trace : org.simpleframework.xml.core.ConstructorException: No match found for field 'two' private final thirdparty.simplexml.ConstructorInjectionTest$SimpleElementTwo thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne.two in class thirdparty.simplexml.ConstructorInjectionTest$SimpleElementOne at org.simpleframework.xml.core.Scanner.validateConstructor(Scanner.java:513) at org.simpleframework.xml.core.Scanner.validateElements(Scanner.java:452) at org.simpleframework.xml.core.Scanner.validate(Scanner.java:413) at org.simpleframework.xml.core.Scanner.scan(Scanner.java:397) at org.simpleframework.xml.core.Scanner.<init>(Scanner.java:120) at org.simpleframework.xml.core.ScannerFactory.getInstance(ScannerFactory.java:65) at org.simpleframework.xml.core.Support.getScanner(Support.java:170) at org.simpleframework.xml.core.Source.getScanner(Source.java:281) at org.simpleframework.xml.core.Source.getCaller(Source.java:310) at org.simpleframework.xml.core.Composite.writeReplace(Composite.java:1059) at org.simpleframework.xml.core.Composite.writeElements(Composite.java:1034) at org.simpleframework.xml.core.Composite.write(Composite.java:943) at org.simpleframework.xml.core.Composite.write(Composite.java:919) at org.simpleframework.xml.core.Traverser.write(Traverser.java:236) at org.simpleframework.xml.core.Traverser.write(Traverser.java:208) at org.simpleframework.xml.core.Traverser.write(Traverser.java:186) at org.simpleframework.xml.core.Persister.write(Persister.java:1187) at org.simpleframework.xml.core.Persister.write(Persister.java:1169) at org.simpleframework.xml.core.Persister.write(Persister.java:1147) at org.simpleframework.xml.core.Persister.write(Persister.java:1266) at org.simpleframework.xml.core.Persister.write(Persister.java:1248) at org.simpleframework.xml.core.Persister.write(Persister.java:1229) at org.simpleframework.xml.core.Persister.write(Persister.java:1208) at thirdparty.simplexml.ConstructorInjectionTest.testConstructorInjection(ConstructorInjectionTest.java:78) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.junit.runner.JUnitCore.run(JUnitCore.java:157) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:94) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:196) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:65) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:115) On 9 November 2010 18:12, Eric Vantillard <eri...@ev...> wrote: > Hi List, > > Is this project still alive ? > > As far as i can see, the las bug tracker closed was on 2007-12-22. > > > Regards, > Eric > |
|
From: Niall G. <gal...@ya...> - 2010-11-10 09:03:53
|
Hi, Typicall any awkward XML fragments need to be handled with the @Convert annotation. There should be examples in the tutorial. If you want to send me the fragment you are trying to convert and the problems you have I can better answer the question. Niall --- On Wed, 27/10/10, Mikhail Kirillov <Mik...@fl...> wrote: From: Mikhail Kirillov <Mik...@fl...> Subject: [Simple-support] Analog of XmlAnyElement in SimpleFramework To: sim...@li... Received: Wednesday, 27 October, 2010, 2:42 AM Hello! I’ve recently switched to Simple from JAXB to solve some namespace configuration problems and am pretty happy with it. There’re some questions though to which I fail to find answers. The most important is the following. My potential XML documents have portions that do not have a defined schema and which I may not bind to normal Java object structure. I wish to handle them during deserialization as a portion of text of collection of XML elements (like in JAXB with XmlAnyElement) or something. Now I only know how to completely skip them with Strict = false. Is there a way I can access them with SimpleFramework? Any help will be appreciated. Best Regards, Mikhail Kirillov, Flexilogic Ltd. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Niall G. <gal...@ya...> - 2010-11-10 09:01:27
|
Hi,
Whats the exception message it gives you? Do you explicitly name the variable like so?
@Element(name="wrench$123")
Niall
--- On Tue, 9/11/10, Tom Carchrae <car...@gm...> wrote:
> From: Tom Carchrae <car...@gm...>
> Subject: [Simple-support] $ problems and reading elements without knowing the tag name
> To: sim...@li...
> Received: Tuesday, 9 November, 2010, 6:30 AM
>
> Hi,
>
> I'm new to Simple and it seems like a great tool.
> Unfortunately, my first attempt to use
> it hit a wall, and I wonder if someone can point me in the
> right direction.
>
> I want to map the following XML to a class:
>
> <example>
> <stuff>
> <wrench$123/>
> </stuff>
> <value>some value</value>
> </example>
>
> Here are the issues I seem to have.
>
> 1) It complains about the wrench. For the
> <wrench$123/> it is looking for a tag 'wrench'
> and says there is no matching /> for the line. Is
> this because $123/> is being
> interpreted as a 'variable' or something? How can I
> fix this?
>
> 2) Is there any nice way to load the labels of each
> element, for example, for stuff to be
> mapped to a list ie stuff = { "wrench$123" }
>
> Thanks in advance for any help,
>
> Tom
>
>
>
>
> ------------------------------------------------------------------------------
> The Next 800 Companies to Lead America's Growth: New Video
> Whitepaper
> David G. Thomson, author of the best-selling book
> "Blueprint to a
> Billion" shares his insights and actions to help propel
> your
> business during the next growth cycle. Listen Now!
> http://p.sf.net/sfu/SAP-dev2dev
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
|
|
From: <Nia...@rb...> - 2010-11-09 21:40:29
|
Hi, Yes it is still alive. Bug tracker is not used, the only way a bug will be acted on is if its mailed to this list. Regards, Niall -----Original Message----- From: Eric Vantillard [mailto:eri...@ev...] Sent: Wednesday, November 10, 2010 4:12 AM To: sim...@li... Subject: [Simple-support] about liveness of simple project Hi List, Is this project still alive ? As far as i can see, the las bug tracker closed was on 2007-12-22. Regards, Eric ------------------------------------------------------------------------------ The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book "Blueprint to a Billion" shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support *********************************************************************************** The Royal Bank of Scotland plc. Registered in Scotland No 90312. Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB. Authorised and regulated by the Financial Services Authority. The Royal Bank of Scotland N.V. is authorised and regulated by the De Nederlandsche Bank and has its seat at Amsterdam, the Netherlands, and is registered in the Commercial Register under number 33002587. Registered Office: Gustav Mahlerlaan 10, Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and The Royal Bank of Scotland plc are authorised to act as agent for each other in certain jurisdictions. This e-mail message is confidential and for use by the addressee only. If the message is received by anyone other than the addressee, please return the message to the sender by replying to it and then delete the message from your computer. Internet e-mails are not necessarily secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland N.V. including its affiliates ("RBS group") does not accept responsibility for changes made to this message after it was sent. Whilst all reasonable care has been taken to avoid the transmission of viruses, it is the responsibility of the recipient to ensure that the onward transmission, opening or use of this message and any attachments will not adversely affect its systems or data. No responsibility is accepted by the RBS group in this regard and the recipient should carry out such virus and other checks as it considers appropriate. Visit our website at www.rbs.com *********************************************************************************** |
|
From: Eric V. <eri...@ev...> - 2010-11-09 17:12:26
|
Hi List, Is this project still alive ? As far as i can see, the las bug tracker closed was on 2007-12-22. Regards, Eric |
|
From: Tom C. <car...@gm...> - 2010-11-09 14:58:44
|
Hi,
I'm new to Simple and it seems like a great tool. Unfortunately, my first attempt to use
it hit a wall, and I wonder if someone can point me in the right direction.
I want to map the following XML to a class:
<example>
<stuff>
<wrench$123/>
</stuff>
<value>some value</value>
</example>
Here are the issues I seem to have.
1) It complains about the wrench. For the <wrench$123/> it is looking for a tag 'wrench'
and says there is no matching /> for the line. Is this because $123/> is being
interpreted as a 'variable' or something? How can I fix this?
2) Is there any nice way to load the labels of each element, for example, for stuff to be
mapped to a list ie stuff = { "wrench$123" }
Thanks in advance for any help,
Tom
|
|
From: <Nia...@rb...> - 2010-11-08 22:21:07
|
Hi,
Yes, it works on Android.
Niall
________________________________
From: gato chlr [mailto:da...@gm...]
Sent: Tuesday, November 09, 2010 12:47 AM
To: sim...@li...
Subject: [Simple-support] Can i use Simple in Android?
Hi list,
Can i use Simple in Android?
Thanks.
***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312.
Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB.
Authorised and regulated by the Financial Services Authority. The
Royal Bank of Scotland N.V. is authorised and regulated by the
De Nederlandsche Bank and has its seat at Amsterdam, the
Netherlands, and is registered in the Commercial Register under
number 33002587. Registered Office: Gustav Mahlerlaan 10,
Amsterdam, The Netherlands. The Royal Bank of Scotland N.V. and
The Royal Bank of Scotland plc are authorised to act as agent for each
other in certain jurisdictions.
This e-mail message is confidential and for use by the addressee only.
If the message is received by anyone other than the addressee, please
return the message to the sender by replying to it and then delete the
message from your computer. Internet e-mails are not necessarily
secure. The Royal Bank of Scotland plc and The Royal Bank of Scotland
N.V. including its affiliates ("RBS group") does not accept responsibility
for changes made to this message after it was sent.
Whilst all reasonable care has been taken to avoid the transmission of
viruses, it is the responsibility of the recipient to ensure that the onward
transmission, opening or use of this message and any attachments will
not adversely affect its systems or data. No responsibility is accepted
by the RBS group in this regard and the recipient should carry out such
virus and other checks as it considers appropriate.
Visit our website at www.rbs.com
***********************************************************************************
|
|
From: gato c. <da...@gm...> - 2010-11-08 13:47:32
|
Hi list, Can i use Simple in Android? Thanks. |