simple-support Mailing List for Simple (Page 35)
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: Martin S. <msc...@it...> - 2011-04-13 22:35:51
|
I've searched the mailing list but I have not found a way to read and write comments from an xml document. I basically just want to be able to read an xml document and preserve any comments that are in the document along with the elements. Is there a way to do it and if so is the a comprehensive example? Thanks in advance, martin |
|
From: Niall G. <gal...@ya...> - 2011-04-13 09:24:49
|
To use non-inline use this
@Path("commands")
@UnionList({
@ElementList(entry="copyDir", inline=true, type=CommandCopy.class),
@ElementList(entry="cleanDir", inline=true, type=CommandCleanDir.class),
@ElementList(entry="diffDirs", inline=true, type=CommandDiffDirs.class),
@ElementList(entry="runModule", inline=true, type=CommandRunModule.class)
})
private ArrayList<ICommand> commands = new ArrayList<ICommand>();
The reason for the difference here is so that you can have a list of the same class entries based on the name of the list if you want non-inline.
Niall
}) private ArrayList<ICommand> commands = new ArrayList<ICommand>();
--- On Wed, 13/4/11, Raphael Jolivet <rap...@gm...> wrote:
From: Raphael Jolivet <rap...@gm...>
Subject: [Simple-support] UnionList with non inline elements
To: sim...@li...
Received: Wednesday, 13 April, 2011, 2:14 AM
Hi,
I wanted to give a try to the new feature "Union list".I have an heterogeneous list of elements wrapped in a parent list element (not inline).
Here is a sample XML :
<script>
<purpose>Blab bla</purpose>
<commands> <cleanDir dir="folder1" />
<cleanDir dir="folder2" /> <copyDir srcDir="folder3" destDir="folder1" fileFilter="*.txt" />
</commands></script>
And the corresponding annotations in my class :
@Root(name="script")
public class Script {
// Heterogeneous list of commands @UnionList({
@ElementList(entry="copyDir", type=CommandCopy.class), @ElementList(entry="cleanDir", type=CommandCleanDir.class),
@ElementList(entry="diffDirs", type=CommandDiffDirs.class), @ElementList(entry="runModule", type=CommandRunModule.class)
}) private ArrayList<ICommand> commands = new ArrayList<ICommand>();
// Description of test case
@Element private String purpose;}
When trying to parse it, I got the following error :
org.simpleframework.xml.core.PersistenceException: Duplicate annotation of name 'commands' on org.simpleframework.xml.core.UnionListLabel@1126b07
at org.simpleframework.xml.core.StructureBuilder.union(StructureBuilder.java:214)
at org.simpleframework.xml.core.StructureBuilder.process(StructureBuilder.java:165)
Is it a bug, or do I miss something ?Thanks for your help,
Regards,Raphael
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Raphael J. <rap...@gm...> - 2011-04-13 09:14:25
|
Hi,
I wanted to give a try to the new feature "Union list".
I have an heterogeneous list of elements wrapped in a parent list element
(not inline).
Here is a sample XML :
<script>
<purpose>Blab bla</purpose>
<commands>
<cleanDir dir="folder1" />
<cleanDir dir="folder2" />
<copyDir srcDir="folder3" destDir="folder1" fileFilter="*.txt" />
</commands>
</script>
And the corresponding annotations in my class :
@Root(name="script")
public class Script {
// Heterogeneous list of commands
@UnionList({
@ElementList(entry="copyDir", type=CommandCopy.class),
@ElementList(entry="cleanDir", type=CommandCleanDir.class),
@ElementList(entry="diffDirs", type=CommandDiffDirs.class),
@ElementList(entry="runModule", type=CommandRunModule.class)
})
private ArrayList<ICommand> commands = new ArrayList<ICommand>();
// Description of test case
@Element private String purpose;
}
When trying to parse it, I got the following error :
org.simpleframework.xml.core.PersistenceException: Duplicate annotation of
name 'commands' on org.simpleframework.xml.core.UnionListLabel@1126b07
at
org.simpleframework.xml.core.StructureBuilder.union(StructureBuilder.java:214)
at
org.simpleframework.xml.core.StructureBuilder.process(StructureBuilder.java:165)
Is it a bug, or do I miss something ?
Thanks for your help,
Regards,
Raphael
|
|
From: Niall G. <gal...@ya...> - 2011-04-12 13:10:20
|
Hi,
Correction, these annotations have been renamed in 2.5 as
@Union
@UnionList
@UnionMap
Niall
--- On Fri, 8/4/11, Niall Gallagher <gal...@ya...> wrote:
> From: Niall Gallagher <gal...@ya...>
> Subject: Simple 2.5
> To: sim...@li...
> Received: Friday, 8 April, 2011, 8:05 AM
> Hi,
>
> I have released Simple 2.5. This release contains a set of
> new annotations.
>
> @Variant
> @VariantList
> @VariantMap
>
> This allows constructs such as
>
> @Variant({
>
> @Element(name="login"),
>
> @Element(name="account"),
>
> @Element(name="username"),
>
> @Element(name="id"),
>
> @Element(name="name")
> })
> private final String name;
>
> And for lists
>
> @VariantList({
>
> @ElementList(entry="double", inline=true,
> type=DoubleEntry.class),
>
> @ElementList(entry="text", inline=true,
> type=StringEntry.class),
>
> @ElementList(entry="int", inline=true,
> type=IntegerEntry.class)
> })
> private List<Entry> list;
>
> This allows dynamic serialization of types, matched by type
> on serialization and on XML element name for
> deserialization. This also ensures there is no need for
> class= attributes to determine the type and makes the
> generated XML more transparent.
>
> Regards,
> Niall
>
|
|
From: Niall G. <gal...@ya...> - 2011-04-08 15:32:41
|
Hi,
Works fine for me, the error is in the code that generates your text tree not in the XML serialization.
Whatever code generates this, is broken.
|--Test Case
|--1
|--2
|--3
|--4
|--5
|--Test Case1
|--1
|--2
|--3
|--4
|--5
|--Test Case1,Test Case3
|--Test Case1
|--1
|--2
|--3
|--4
|--5
|--6
|--Test Case2,Test Case4
|--Test Case2
|--1
|--2
|--3
|--4
|--5
|--6
|--7
|--8
|--9
|--10
Niall
--- On Mon, 28/3/11, Kakumanu Brahmananda Reddy <kak...@gm...> wrote:
From: Kakumanu Brahmananda Reddy <kak...@gm...>
Subject: [Simple-support] Not getting all objects in List
To: sim...@li...
Received: Monday, 28 March, 2011, 5:31 AM
Hi All,
Problem here am facing is am not getting list of "TestScenario" objects !!!
Below is my xml file.
<testSuit>
<defaultTestScenario>
<testCase name="Test Case" description="abc">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
</testCase>
<testCase name="Test Case1" description="abc">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
</testCase>
</defaultTestScenario>
<testScenario name="Test Case1,Test Case3" description="abc"
includeDefault="true">
<testCase name="Test Case1" description="abc">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
<step id="6" action="assertTrue" target="field id" value="value" />
</testCase>
<testCase name="Test Case3" description="abc">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
<step id="6" action="assertTrue" target="field id" value="value" />
<step id="7" action="assertTrue" target="field id" value="value" />
</testCase>
</testScenario>
<testScenario name="Test Case2,Test Case4" description="abc">
<testCase name="Test Case2" description="">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
<step id="6" action="open" target="field id" value="value" />
<step id="7" action="type" target="field id" value="value" />
<step id="8" action="select" target="field id" value="value" />
<step id="9" action="clickAndWait" target="field id" value="value" />
<step id="10" action="assertTrue" target="field id" value="value" />
</testCase>
<testCase name="Test Case4" description="">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
</testCase>
</testScenario>
</testSuit>
TestScenario.java
@Root
public class TestScenario {
@Element(required = false)
private String uRLs;
@Attribute
private String name;
@Attribute
private String description;
@ElementList(inline = true)
private List<TestCase> testCases;
@Attribute(required = false)
private String includeDefault = Boolean.toString(false);
public boolean getIncludeDefault() {
return Boolean.parseBoolean(includeDefault);
}
public List<TestCase> getTestCases() {
return testCases;
}
/*
public void setTestCase(List<TestCase> testCase) {
this.testCase.addAll(testCase);
}
*/
public String getURLs() {
return uRLs;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return getName();
}
}
TestCase.java
@Root
public final class TestCase {
@ElementList(inline = true)
private List<Step> steps;
@Attribute
private String name;
@Attribute
private String description;
@Attribute(required = false)
private String addBefore;
public String getAddBefore() {
return addBefore;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public List<Step> getSteps() {
return steps;
}
@Override
public String toString() {
return getName();
}
}
Step.java
@Root
public final class Step {
@Attribute
private int id;
@Attribute
private String action;
@Attribute
private String target;
@Attribute
private String value;
public int getId() {
return id;
}
public String getAction() {
return action;
}
public String getTarget() {
return target;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return Integer.toString(getId());
}
}
TestSuit.java
@Root
public class TestSuit {
@Element
private DefaultTestScenario defaultTestScenario;
@ElementList(inline = true, entry = "testScenario")
private List<TestScenario> testScenario;
public DefaultTestScenario getDefaultTestScenario() {
return defaultTestScenario;
}
public List<TestScenario> getTestScenario() {
return testScenario;
}
/*
* @Commit public void build() { Iterator<TestScenarios> iterator =
* testScenarios.iterator(); while (iterator.hasNext()) { TestScenarios
* testScenarios = iterator.next(); if (testScenarios.getIncludeDefault()) {
* System.out.println("In build: " + defaultTestScenario.getTestCase());
* testScenarios.setTestCase(defaultTestScenario.getTestCase()); } } }
*/
}
Below is the output what i am getting:
|--Test Case
|--1
|--2
|--3
|--4
|--5
|--Test Case1
|--1
|--2
|--3
|--4
|--5
|--Test Case1,Test Case3
|--Test Case1
|--1
|--2
|--3
|--4
|--5
|--6
|--Test Case2,Test Case4
|--Test Case2
|--1
|--2
|--3
|--4
|--5
|--6
|--7
|--8
|--9
|--10
Thanks in advance.
Regards,
Brahma.
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Philipp F. <phi...@go...> - 2011-04-08 15:25:05
|
That is so great news. Have been waiting for this, thank you!
On Fri, Apr 8, 2011 at 5:05 PM, Niall Gallagher
<gal...@ya...>wrote:
> Hi,
>
> I have released Simple 2.5. This release contains a set of new annotations.
>
> @Variant
> @VariantList
> @VariantMap
>
> This allows constructs such as
>
> @Variant({
> @Element(name="login"),
> @Element(name="account"),
> @Element(name="username"),
> @Element(name="id"),
> @Element(name="name")
> })
> private final String name;
>
> And for lists
>
> @VariantList({
> @ElementList(entry="double", inline=true, type=DoubleEntry.class),
> @ElementList(entry="text", inline=true, type=StringEntry.class),
> @ElementList(entry="int", inline=true, type=IntegerEntry.class)
> })
> private List<Entry> list;
>
> This allows dynamic serialization of types, matched by type on
> serialization and on XML element name for deserialization. This also ensures
> there is no need for class= attributes to determine the type and makes the
> generated XML more transparent.
>
> Regards,
> Niall
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
|
|
From: Niall G. <gal...@ya...> - 2011-04-08 15:05:40
|
Hi,
I have released Simple 2.5. This release contains a set of new annotations.
@Variant
@VariantList
@VariantMap
This allows constructs such as
@Variant({
@Element(name="login"),
@Element(name="account"),
@Element(name="username"),
@Element(name="id"),
@Element(name="name")
})
private final String name;
And for lists
@VariantList({
@ElementList(entry="double", inline=true, type=DoubleEntry.class),
@ElementList(entry="text", inline=true, type=StringEntry.class),
@ElementList(entry="int", inline=true, type=IntegerEntry.class)
})
private List<Entry> list;
This allows dynamic serialization of types, matched by type on serialization and on XML element name for deserialization. This also ensures there is no need for class= attributes to determine the type and makes the generated XML more transparent.
Regards,
Niall
|
|
From: jo d. <jd...@gm...> - 2011-04-08 10:17:36
|
Works perfect, thx Jo 2011/4/8 Niall Gallagher <gal...@ya...> > You need to write a Matcher object to return the Matcher for the specified > type. If you look in the test cases there is actually a Transformer for UUID > in there somewhere. > > --- On *Thu, 7/4/11, jo desmet <jd...@gm...>* wrote: > > > From: jo desmet <jd...@gm...> > Subject: [Simple-support] how to write a transformer > To: sim...@li... > Received: Thursday, 7 April, 2011, 8:44 AM > > > Hi, > > I need to serialize some object tree but it contains UUID's > > so when serializing I get the error > > Exception in thread "main" > org.simpleframework.xml.transform.TransformException: Transform of class > java.util.UUID not supported > > > It is easy to write a transformer for this but how can I add this to the > persister ? > > > > Jo > > -----Inline Attachment Follows----- > > > ------------------------------------------------------------------------------ > Xperia(TM) PLAY > It's a major breakthrough. An authentic gaming > smartphone on the nation's most reliable network. > And it wants your games. > http://p.sf.net/sfu/verizon-sfdev > > -----Inline Attachment Follows----- > > _______________________________________________ > Simple-support mailing list > Sim...@li...<http://mc/compose?to=...@li...> > https://lists.sourceforge.net/lists/listinfo/simple-support > > |
|
From: Александр (R. Щ. <ir...@gm...> - 2011-04-08 10:11:49
|
just implement Matcher and Transformer and pass the first as an argument to
Persister constructior.
Here is my implementation for enums (sometimes i gotta deal with them in
non-standart way):
public class EnumMatcher implements Matcher {
public Transform match(Class aClass) throws Exception {
if (aClass.equals(Protocol.class)) {
logger.debug("Matched :" + aClass.getName());
return new EnumTransform(aClass);
} else {
return null;
}
}
}
public class EnumTransform implements Transform {
private Class clazz;
public EnumTransform(Class clazz) {
this.clazz = clazz;
}
public Object read(String s) throws Exception {
if (clazz.equals(Protocol.class)) {
return Protocol.parseString(s);
} else throw new InternalException("Invalid transform match");
}
public String write(Object o) throws Exception {
if (clazz.equals(Protocol.class)) {
return ((Protocol) o).protocol();
} else throw new InternalException("Invalid transform match");
}
}
in this example Protocol is a Enum with static method parseString(String).
2011/4/8 Niall Gallagher <gal...@ya...>
> You need to write a Matcher object to return the Matcher for the specified
> type. If you look in the test cases there is actually a Transformer for UUID
> in there somewhere.
>
> --- On *Thu, 7/4/11, jo desmet <jd...@gm...>* wrote:
>
>
> From: jo desmet <jd...@gm...>
> Subject: [Simple-support] how to write a transformer
> To: sim...@li...
> Received: Thursday, 7 April, 2011, 8:44 AM
>
> Hi,
>
> I need to serialize some object tree but it contains UUID's
>
> so when serializing I get the error
>
> Exception in thread "main"
> org.simpleframework.xml.transform.TransformException: Transform of class
> java.util.UUID not supported
>
>
> It is easy to write a transformer for this but how can I add this to the
> persister ?
>
>
>
> Jo
>
> -----Inline Attachment Follows-----
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
>
> -----Inline Attachment Follows-----
>
> _______________________________________________
> Simple-support mailing list
> Sim...@li...<http://mc/compose?to=...@li...>
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
>
> ------------------------------------------------------------------------------
> Xperia(TM) PLAY
> It's a major breakthrough. An authentic gaming
> smartphone on the nation's most reliable network.
> And it wants your games.
> http://p.sf.net/sfu/verizon-sfdev
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
>
>
--
Sincerely Yours
Alexander Shchegolev
|
|
From: Niall G. <gal...@ya...> - 2011-04-08 09:21:42
|
You need to write a Matcher object to return the Matcher for the specified type. If you look in the test cases there is actually a Transformer for UUID in there somewhere.
--- On Thu, 7/4/11, jo desmet <jd...@gm...> wrote:
From: jo desmet <jd...@gm...>
Subject: [Simple-support] how to write a transformer
To: sim...@li...
Received: Thursday, 7 April, 2011, 8:44 AM
Hi,
I need to serialize some object tree but it contains UUID's
so when serializing I get the error
#yiv2095547325 p.yiv2095547325p1 {margin:0.0px 0.0px 0.0px 0.0px;font:11.0px Monaco;color:#ff0000;}
#yiv2095547325 span.yiv2095547325s1 {text-decoration:underline;color:#000080;}
Exception in thread "main" org.simpleframework.xml.transform.TransformException: Transform of class java.util.UUID not supported
It is easy to write a transformer for this but how can I add this to the persister ?
Jo
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: jo d. <jd...@gm...> - 2011-04-07 15:44:50
|
Hi, I need to serialize some object tree but it contains UUID's so when serializing I get the error Exception in thread "main" org.simpleframework.xml.transform.TransformException: Transform of class java.util.UUID not supported It is easy to write a transformer for this but how can I add this to the persister ? Jo |
|
From: Kakumanu B. R. <kak...@gm...> - 2011-03-28 12:31:39
|
Hi All,
Problem here am facing is am not getting list of "TestScenario" objects !!!
Below is my xml file.
<testSuit>
<defaultTestScenario>
<testCase name="Test Case" description="abc">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
</testCase>
<testCase name="Test Case1" description="abc">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
</testCase>
</defaultTestScenario>
<testScenario name="Test Case1,Test Case3" description="abc"
includeDefault="true">
<testCase name="Test Case1" description="abc">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
<step id="6" action="assertTrue" target="field id" value="value" />
</testCase>
<testCase name="Test Case3" description="abc">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
<step id="6" action="assertTrue" target="field id" value="value" />
<step id="7" action="assertTrue" target="field id" value="value" />
</testCase>
</testScenario>
<testScenario name="Test Case2,Test Case4" description="abc">
<testCase name="Test Case2" description="">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
<step id="6" action="open" target="field id" value="value" />
<step id="7" action="type" target="field id" value="value" />
<step id="8" action="select" target="field id" value="value" />
<step id="9" action="clickAndWait" target="field id" value="value" />
<step id="10" action="assertTrue" target="field id" value="value" />
</testCase>
<testCase name="Test Case4" description="">
<step id="1" action="open" target="field id" value="value" />
<step id="2" action="type" target="field id" value="value" />
<step id="3" action="select" target="field id" value="value" />
<step id="4" action="clickAndWait" target="field id" value="value" />
<step id="5" action="assertTrue" target="field id" value="value" />
</testCase>
</testScenario>
</testSuit>
TestScenario.java
@Root
public class TestScenario {
@Element(required = false)
private String uRLs;
@Attribute
private String name;
@Attribute
private String description;
@ElementList(inline = true)
private List<TestCase> testCases;
@Attribute(required = false)
private String includeDefault = Boolean.toString(false);
public boolean getIncludeDefault() {
return Boolean.parseBoolean(includeDefault);
}
public List<TestCase> getTestCases() {
return testCases;
}
/*
public void setTestCase(List<TestCase> testCase) {
this.testCase.addAll(testCase);
}
*/
public String getURLs() {
return uRLs;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
@Override
public String toString() {
return getName();
}
}
TestCase.java
@Root
public final class TestCase {
@ElementList(inline = true)
private List<Step> steps;
@Attribute
private String name;
@Attribute
private String description;
@Attribute(required = false)
private String addBefore;
public String getAddBefore() {
return addBefore;
}
public String getName() {
return name;
}
public String getDescription() {
return description;
}
public List<Step> getSteps() {
return steps;
}
@Override
public String toString() {
return getName();
}
}
Step.java
@Root
public final class Step {
@Attribute
private int id;
@Attribute
private String action;
@Attribute
private String target;
@Attribute
private String value;
public int getId() {
return id;
}
public String getAction() {
return action;
}
public String getTarget() {
return target;
}
public String getValue() {
return value;
}
@Override
public String toString() {
return Integer.toString(getId());
}
}
TestSuit.java
@Root
public class TestSuit {
@Element
private DefaultTestScenario defaultTestScenario;
@ElementList(inline = true, entry = "testScenario")
private List<TestScenario> testScenario;
public DefaultTestScenario getDefaultTestScenario() {
return defaultTestScenario;
}
public List<TestScenario> getTestScenario() {
return testScenario;
}
/*
* @Commit public void build() { Iterator<TestScenarios> iterator =
* testScenarios.iterator(); while (iterator.hasNext()) { TestScenarios
* testScenarios = iterator.next(); if (testScenarios.getIncludeDefault()) {
* System.out.println("In build: " + defaultTestScenario.getTestCase());
* testScenarios.setTestCase(defaultTestScenario.getTestCase()); } } }
*/
}
Below is the output what i am getting:
|--Test Case
|--1
|--2
|--3
|--4
|--5
|--Test Case1
|--1
|--2
|--3
|--4
|--5
|--Test Case1,Test Case3
|--Test Case1
|--1
|--2
|--3
|--4
|--5
|--6
|--Test Case2,Test Case4
|--Test Case2
|--1
|--2
|--3
|--4
|--5
|--6
|--7
|--8
|--9
|--10
Thanks in advance.
Regards,
Brahma.
|
|
From: Niall G. <gal...@ya...> - 2011-03-24 11:03:34
|
Hi,
Well if they are ordered you can do.
@Default
public class Root {
@path("type1[1]")
private final Type1Class type;
}
However, the XPath expressions in the @Path annotation is limited. I will be improving this in a future release. However, right now, its got limited functionality.
Niall
--- On Thu, 24/3/11, Francois D. Barnard <fba...@gm...> wrote:
From: Francois D. Barnard <fba...@gm...>
Subject: [Simple-support] XPath serializer.read
To: sim...@li...
Received: Thursday, 24 March, 2011, 3:43 AM
hi
I have a xml structure looking something like this
[data.xml]
<root>
<type1 id="1_1"/>
<type1 id="1_2"/>
<type1 id="1_3"/>
<type2 id="2_1"/>
<type2 id="2_2"/>
<type2 id="2_3"/>
<type3 id="3_1"/>
<type3 id="3_2"/>
<type3 id="3_3"/>
</root>
I created a class for root and a class each for the different types.
The root class has lists of type something like
List<Type1Class> Type1List
List<Type2Class> Type2List
List<Type3Class> Type3List
All this is working fine. The problem i have is this file isgetting bigger by the day and i am working on a android so resources are limited.
So the question is is there a way for me to serialize/deserialize this big xml file by providing xpath to determine what node i want as the source.
something like this
Type1Class tmp = serializer.read(Type1Class.class,"data.xml","/root/type1[@id='1_2']");
thanks
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software
be a part of the solution? Download the Intel(R) Manageability Checker
today! http://p.sf.net/sfu/intel-dev2devmar
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Francois D. B. <fba...@gm...> - 2011-03-24 10:44:05
|
hi I have a xml structure looking something like this [data.xml] <root> <type1 id="1_1"/> <type1 id="1_2"/> <type1 id="1_3"/> <type2 id="2_1"/> <type2 id="2_2"/> <type2 id="2_3"/> <type3 id="3_1"/> <type3 id="3_2"/> <type3 id="3_3"/> </root> I created a class for root and a class each for the different types. The root class has lists of type something like List<Type1Class> Type1List List<Type2Class> Type2List List<Type3Class> Type3List All this is working fine. The problem i have is this file isgetting bigger by the day and i am working on a android so resources are limited. So the question is is there a way for me to serialize/deserialize this big xml file by providing xpath to determine what node i want as the source. something like this Type1Class tmp = serializer.read(Type1Class.class,"data.xml","/root/type1[@id='1_2']"); thanks |
|
From: Niall G. <gal...@ya...> - 2011-03-18 10:19:43
|
This is true of any code, if you control your applet codebase then just don't allow code you don't know to be loaded. Simple is no different yo anything else. If you control your codebase, then you know, only methods with annotations can be invoked. You are in control here. If it were XML schemas without any annotations like for example castor etc.. then thats another issue. But if its not annotated, it can not be invoked by simple. --- On Thu, 17/3/11, Steve Martins <Ste...@te...> wrote: From: Steve Martins <Ste...@te...> Subject: [Simple-support] Running in applet To: Sim...@li... Received: Thursday, 17 March, 2011, 9:05 AM Hi, I am trying to deserialize an xml string within an applet, however due to security restrictions I am getting an exception for accessDeclaredMembers: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers) I have found the following: accessDeclaredMembers: This target grants permission to access the declared members of a class. Granting this permission allows code to query a class for its public, protected, default (package), and private fields and methods. Although the code would have access to the private and protected field and method names, it would not have access to the private and protected field data and would not be able to invoke any private methods. Nevertheless, malicious code may use this information to better aim an attack. Additionally, malicious code might invoke any public methods or access public fields in the class, which could be dangerous if the code would normally not be able to invoke those methods or access the fields because it cannot cast the object to the class or interface with those methods and fields. So this seems like it is a security issue, but how best to get around this? Has anyone else come up against this problem? Thanks, Steve Martins Senior Systems Developer Tel: +44 (0) 1908 684600 Mobile: +44 (0) 7500 956260 www.tensator.com / mailto:ste...@te... This message and any attachments are confidential to the ordinary user of the e-mail address to which it was addressed and may also be privileged. If you are not the addressee you may not copy, forward, disclose or use any part of this message or it's attachments and if you have received this message in error, please notify the sender immediately by return e-mail and delete it from your system. Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, arrive late or contain viruses. The sender therefore does not accept liability for any error or omissions in the context of this message, which arise as a result of Internet transmission. Any opinions contained in this message are those of the author and are not given or endorsed by Tensator Limited or offices through which this message is sent unless otherwise clearly indicated in this message and the authority of the author to so bind the Tensator Limited entity to is duly verified. -----Inline Attachment Follows----- ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d -----Inline Attachment Follows----- _______________________________________________ Simple-support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simple-support |
|
From: Steve M. <Ste...@te...> - 2011-03-17 16:04:31
|
Hi, I am trying to deserialize an xml string within an applet, however due to security restrictions I am getting an exception for accessDeclaredMembers: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessDeclaredMembers) I have found the following: accessDeclaredMembers: This target grants permission to access the declared members of a class. Granting this permission allows code to query a class for its public, protected, default (package), and private fields and methods. Although the code would have access to the private and protected field and method names, it would not have access to the private and protected field data and would not be able to invoke any private methods. Nevertheless, malicious code may use this information to better aim an attack. Additionally, malicious code might invoke any public methods or access public fields in the class, which could be dangerous if the code would normally not be able to invoke those methods or access the fields because it cannot cast the object to the class or interface with those methods and fields. So this seems like it is a security issue, but how best to get around this? Has anyone else come up against this problem? Thanks, Steve Martins Senior Systems Developer Tel: +44 (0) 1908 684600 Mobile: +44 (0) 7500 956260 www.tensator.com <http://www.tensator.com/> / mailto:ste...@te... <mailto:ste...@te...> This message and any attachments are confidential to the ordinary user of the e-mail address to which it was addressed and may also be privileged. If you are not the addressee you may not copy, forward, disclose or use any part of this message or it's attachments and if you have received this message in error, please notify the sender immediately by return e-mail and delete it from your system. Internet communications cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, arrive late or contain viruses. The sender therefore does not accept liability for any error or omissions in the context of this message, which arise as a result of Internet transmission. Any opinions contained in this message are those of the author and are not given or endorsed by Tensator Limited or offices through which this message is sent unless otherwise clearly indicated in this message and the authority of the author to so bind the Tensator Limited entity to is duly verified. |
|
From: Niall G. <gal...@ya...> - 2011-03-16 10:48:00
|
Yes, Ill make sure to integrate this. There is a patch for this I will attempt to integrate it. Sorry for late response, this got caught by my spam detector. --- On Fri, 18/2/11, Dawid Gorniak <daw...@gm...> wrote: > From: Dawid Gorniak <daw...@gm...> > Subject: Re: [Simple-support] Deserialize xml element as string > To: sim...@li... > Received: Friday, 18 February, 2011, 1:32 AM > > Hi, > can we hope for getXMLString in official Simple release? > > > niall.gallagher wrote: > > > > Hi, > > > > Thanks, ill take a look at this, looks like it could > be a very useful > > feature. > > > > Niall > > > > > > -- > View this message in context: http://old.nabble.com/Deserialize-xml-element-as-string-tp28309099p30957074.html > Sent from the Simple XML Serialization mailing list archive > at Nabble.com. > > > ------------------------------------------------------------------------------ > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d > _______________________________________________ > Simple-support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simple-support > |
|
From: Niall G. <gal...@ya...> - 2011-03-16 10:46:18
|
If you want to extract the actual XMLyou need to write a Converter yourself. Although there was a patch written some time ago that extracted the XML content. I have not had time yet to integrate it.
--- On Wed, 16/3/11, Niall Gallagher <gal...@ya...> wrote:
From: Niall Gallagher <gal...@ya...>
Subject: Re: [Simple-support] how to limit deserialization depth?
To: sim...@li..., "Alain Dechorgnat" <ade...@gm...>
Received: Wednesday, 16 March, 2011, 3:44 AM
@Root
public class Content{
@Element
private String elementA;
@Path("elementB")
@Element
private String elementC;
}
--- On Sat, 12/3/11, Alain Dechorgnat <ade...@gm...> wrote:
From: Alain Dechorgnat <ade...@gm...>
Subject: [Simple-support] how to limit deserialization depth?
To: sim...@li...
Received: Saturday, 12 March, 2011, 7:39 AM
Hi
I'd like to limit the deserialization depth.
My XML looks like:
<content>
<elementA>valueA</elementA
<elementB>
<elementC>valueC</elementC>
</elementB>
</content>
I'd like to declare elementB as String and get <elementC>valueC</elementC> as its value.
Is it possible and how do I manage this?
Alain
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Niall G. <gal...@ya...> - 2011-03-16 10:44:27
|
@Root
public class Content{
@Element
private String elementA;
@Path("elementB")
@Element
private String elementC;
}
--- On Sat, 12/3/11, Alain Dechorgnat <ade...@gm...> wrote:
From: Alain Dechorgnat <ade...@gm...>
Subject: [Simple-support] how to limit deserialization depth?
To: sim...@li...
Received: Saturday, 12 March, 2011, 7:39 AM
Hi
I'd like to limit the deserialization depth.
My XML looks like:
<content>
<elementA>valueA</elementA
<elementB>
<elementC>valueC</elementC>
</elementB>
</content>
I'd like to declare elementB as String and get <elementC>valueC</elementC> as its value.
Is it possible and how do I manage this?
Alain
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Niall G. <gal...@ya...> - 2011-03-16 10:42:37
|
Persister.read(MyClass.class, inputStream, false)
--- On Mon, 7/3/11, Dewitt, Tyler (317G) <Tyl...@jp...> wrote:
From: Dewitt, Tyler (317G) <Tyl...@jp...>
Subject: [Simple-support] Ignore non-included elements and attributes
To: "sim...@li..." <sim...@li...>
Received: Monday, 7 March, 2011, 10:08 AM
Hi all,
I'm working on a project that doesn't have an official schema and was wondering if there was a way that I could tell simpleXML to ignore any element contained in the XML that wasn't contained in my class definition (I'm using Java). Also, could I catch exceptions, particularly if I have defined an element in my Class structure that is then given to me as multiple elements in the XML (an inlined list)? I only need certain elements from the XML, and have those defined in my Java Classes.
For example:
I define:
Class Human{
@Element
Int age;
}
And am given:
<Human>
<age>30</age>
<height>70</height>
</Human>
Is there a way I can tell SimpleXML to grab the age element and ignore the height element? I know I can add in a required = false height element, but I don't know which elements the people generating the XML might throw at me.
Thanks!
Tyler
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Niall G. <gal...@ya...> - 2011-03-16 10:35:00
|
Yep...
--- On Tue, 15/3/11, Alexander Shchegolev <ir...@gm...> wrote:
From: Alexander Shchegolev <ir...@gm...>
Subject: Re: [Simple-support] Inner ElementList issue with WCF REST Service Response
To: "Pinakin Shah" <pi...@gm...>
Cc: "sim...@li..." <sim...@li...>
Received: Tuesday, 15 March, 2011, 1:09 AM
Set required=false for the ElementList. Otherwise it always fails on empty lists.
С уважением, Александр Щеголев.
15.03.2011, в 10:04, Pinakin Shah <pi...@gm...> написал(а):
Hello,
We are using the simple framework 2.4.1 in Android to deserialize the WCF REST service response. We are using the WCF Bare response format, which do not have a enclosing parent tag in the response xml. It works well as long as the WCF returns atleast one record in response but gives the following error if the search do not fetch any records. Please help
org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(data=false, empty=true, entry=, inline=true, name=, required=true, type=void) on field 'list' public java.util.List com.realtyradar.mobile.PropertySearchResult.list for class com.realtyradar.mobile.PropertySearchResult at line -1
Below is the code and xml responses from WCF
package com.realtyradar.mobile;
import java.util.List;
import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Namespace;
import org.simpleframework.xml.NamespaceList;
import org.simpleframework.xml.Root;
@Root(name = "ArrayOfmob_searchpropertiesbybudget_Result", strict=false)
@NamespaceList({
@Namespace(reference = "http://schemas.datacontract.org/2004/07/RealtyRadarMobileService"),
//@Namespace(reference = "http://schemas.datacontract.org/2004/07/RealtyRadarMobileService", prefix = "i") })
@Namespace(reference = "http://www.w3.org/2001/XMLSchema-instance", prefix = "i") })
public class PropertySearchResult {
@ElementList( inline=true)
public List<Property> list ;
// public PropertySearchResult(@ElementList(inline = true,entry="mob_searchpropertiesbybudget_Result") List<Property> list) {
// this.list = list;
// }
public List<Property> getList() {
return this.list;
}
}
@Root(name = "mob_searchpropertiesbybudget_Result")
@Namespace(reference = "http://schemas.microsoft.com/2003/10/Serialization/", prefix = "z")
class Property
{
@Attribute
@Namespace(reference = "http://schemas.microsoft.com/2003/10/Serialization/", prefix="z")
private String Id;
public String getId()
{return Id;}
@Element(name = "BrokerEmail",required=false)
private String BrokerEmail;
public String getBrokerEmail() {
return BrokerEmail;
}
@Element(name = "BrokerMobile",required=false)
private String BrokerMobile;
public String getBrokerMobile() {
return BrokerMobile;
}
@Element(name = "BrokerName", required = false)
private String BrokerName;
public String getBrokerName() {
return BrokerName;
}
@Element(name ="BuildingAddress",required=false)
private String BuildingAddress;
public String getBudildingAddress(){
return BuildingAddress;
}
@Element(name = "Buildingname",required=false)
private String Buildingname;
public String getBuildingname() {
return Buildingname;
}
@Element(name = "ClientEmail",required=false)
private String ClientEmail;
public String getClientEmail() {
return ClientEmail;
}
@Element(name = "ClientMobile", required = false)
private String ClientMobile;
public String getClientMobile() {
return ClientMobile;
}
@Element(name = "ClientName", required = false)
private String ClientName;
public String getClientName() {
return ClientName;
}
@Element(name ="PropertyId")
private String PropertyId;
public String getPropertyId(){
return PropertyId;
}
@Element(name ="area",required=false)
private String area;
public String getarea(){
return area;
}
@Element(name = "date",required=false)
private String date;
public String getdate (){
return date;
}
@Element(name = "price",required=false)
private String price;
public String getPrice() {
return price;
}
@Element(name = "propertytitle", required = false)
private String propertytitle;
public String getPropertyTitle() {
return propertytitle;
}
public Property(
@Attribute(name="Id") @Namespace(reference = "http://schemas.microsoft.com/2003/10/Serialization/", prefix="z") String Id,
@Element(name = "BrokerEmail",required=false) String BrokerEmail,
@Element(name = "BrokerMobile",required=false) String BrokerMobile,
@Element(name = "BrokerName", required = false) String BrokerName,
@Element(name = "BuildingAddress",required=false) String BuildingAddress,
@Element(name = "Buildingname",required=false) String Buildingname,
@Element(name = "ClientEmail",required=false) String ClientEmail,
@Element(name = "ClientMobile", required = false) String ClientMobile,
@Element(name = "ClientName",required = false) String ClientName,
@Element(name = "PropertyId") String PropertyId,
@Element(name = "area",required=false) String area,
@Element(name = "date",required=false) String date,
@Element(name = "price",required=false) String price,
@Element(name="propertytitle",required=false)String propertytitle)
{
this.Id=Id;
this.BrokerEmail=BrokerEmail;
this.BrokerMobile=BrokerMobile;
this.BrokerName=BrokerName;
this.BuildingAddress=BuildingAddress;
this.Buildingname=Buildingname;
this.ClientEmail=ClientEmail;
this.ClientMobile=ClientMobile;
this.ClientName=ClientName;
this.PropertyId=PropertyId;
this.area=area;
this.date=date;
this.price=price;
this.propertytitle=propertytitle;
}
}
With Data in search
<ArrayOfmob_searchpropertiesbybudget_Result xmlns="http://schemas.datacontract.org/2004/07/RealtyRadarMobileService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<mob_searchpropertiesbybudget_Result z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
<BrokerEmail i:nil="true" />
<BrokerMobile i:nil="true" />
<BrokerName i:nil="true" />
<BuildingAddress>ALAKNANDA SOCIETY</BuildingAddress>
<Buildingname>ALAKNANDA SOCIETY</Buildingname>
<ClientEmail />
<ClientMobile />
<ClientName>S P Thakur [98334 46831]</ClientName>
<PropertyId>1</PropertyId>
<area>2000</area>
<date>2010-04-01T00:00:00</date>
<price>4.6 Cr</price>
<propertytitle>2BHK Apartment in BORIVALI - WEST for Outright</propertytitle>
</mob_searchpropertiesbybudget_Result>
<mob_searchpropertiesbybudget_Result z:Id="i2" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
<BrokerEmail />
<BrokerMobile>9594111465</BrokerMobile>
<BrokerName>Rohan Gill</BrokerName>
<BuildingAddress>INDIRA APARTMENTS</BuildingAddress>
<Buildingname>INDIRA APARTMENTS</Buildingname>
<ClientEmail />
<ClientMobile />
<ClientName>S P Thakur [98334 46831]</ClientName>
<PropertyId>2</PropertyId>
<area>2986</area>
<date>2010-04-01T00:00:00</date>
<price>7.76 Cr</price>
<propertytitle>3BHK Apartment in ANDHERI - EAST for Lease/Outright</propertytitle>
</mob_searchpropertiesbybudget_Result>
</ArrayOfmob_searchpropertiesbybudget_Result>
Without Data
<ArrayOfmob_searchpropertiesbybudget_Result xmlns="http://schemas.datacontract.org/2004/07/RealtyRadarMobileService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
-----Inline Attachment Follows-----
------------------------------------------------------------------------------
Colocation vs. Managed Hosting
A question and answer guide to determining the best fit
for your organization - today and in the future.
http://p.sf.net/sfu/internap-sfd2d
-----Inline Attachment Follows-----
_______________________________________________
Simple-support mailing list
Sim...@li...
https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Pinakin <pi...@gm...> - 2011-03-15 09:51:21
|
Thanks. It seem to be working now
Sent on my BlackBerry® from Vodafone
-----Original Message-----
From: Alexander Shchegolev <ir...@gm...>
Date: Tue, 15 Mar 2011 11:09:21
To: Pinakin Shah<pi...@gm...>
Cc: sim...@li...<sim...@li...>
Subject: Re: [Simple-support] Inner ElementList issue with WCF REST Service Response
Set required=false for the ElementList. Otherwise it always fails on empty lists.
С уважением, Александр Щеголев.
15.03.2011, в 10:04, Pinakin Shah <pi...@gm...> написал(а):
> Hello,
>
> We are using the simple framework 2.4.1 in Android to deserialize the WCF REST service response. We are using the WCF Bare response format, which do not have a enclosing parent tag in the response xml. It works well as long as the WCF returns atleast one record in response but gives the following error if the search do not fetch any records. Please help
>
> org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(data=false, empty=true, entry=, inline=true, name=, required=true, type=void) on field 'list' public java.util.List com.realtyradar.mobile.PropertySearchResult.list for class com.realtyradar.mobile.PropertySearchResult at line -1
>
> Below is the code and xml responses from WCF
>
> package com.realtyradar.mobile;
> import java.util.List;
> import org.simpleframework.xml.Attribute;
> import org.simpleframework.xml.Element;
> import org.simpleframework.xml.ElementList;
> import org.simpleframework.xml.Namespace;
> import org.simpleframework.xml.NamespaceList;
> import org.simpleframework.xml.Root;
> @Root(name = "ArrayOfmob_searchpropertiesbybudget_Result", strict=false)
> @NamespaceList({
> @Namespace(reference = "http://schemas.datacontract.org/2004/07/RealtyRadarMobileService"),
> //@Namespace(reference = "http://schemas.datacontract.org/2004/07/RealtyRadarMobileService", prefix = "i") })
> @Namespace(reference = "http://www.w3.org/2001/XMLSchema-instance", prefix = "i") })
> public class PropertySearchResult {
>
> @ElementList( inline=true)
> public List<Property> list ;
>
> // public PropertySearchResult(@ElementList(inline = true,entry="mob_searchpropertiesbybudget_Result") List<Property> list) {
> // this.list = list;
> // }
> public List<Property> getList() {
> return this.list;
> }
>
> }
> @Root(name = "mob_searchpropertiesbybudget_Result")
> @Namespace(reference = "http://schemas.microsoft.com/2003/10/Serialization/", prefix = "z")
> class Property
> {
> @Attribute
> @Namespace(reference = "http://schemas.microsoft.com/2003/10/Serialization/", prefix="z")
> private String Id;
>
> public String getId()
> {return Id;}
> @Element(name = "BrokerEmail",required=false)
> private String BrokerEmail;
> public String getBrokerEmail() {
> return BrokerEmail;
> }
> @Element(name = "BrokerMobile",required=false)
> private String BrokerMobile;
> public String getBrokerMobile() {
> return BrokerMobile;
> }
> @Element(name = "BrokerName", required = false)
> private String BrokerName;
> public String getBrokerName() {
> return BrokerName;
> }
>
> @Element(name ="BuildingAddress",required=false)
> private String BuildingAddress;
> public String getBudildingAddress(){
> return BuildingAddress;
> }
>
> @Element(name = "Buildingname",required=false)
> private String Buildingname;
> public String getBuildingname() {
> return Buildingname;
> }
> @Element(name = "ClientEmail",required=false)
> private String ClientEmail;
> public String getClientEmail() {
> return ClientEmail;
>
> }
> @Element(name = "ClientMobile", required = false)
> private String ClientMobile;
> public String getClientMobile() {
> return ClientMobile;
> }
> @Element(name = "ClientName", required = false)
> private String ClientName;
> public String getClientName() {
> return ClientName;
> }
>
>
> @Element(name ="PropertyId")
> private String PropertyId;
> public String getPropertyId(){
> return PropertyId;
> }
>
>
> @Element(name ="area",required=false)
> private String area;
> public String getarea(){
> return area;
> }
>
> @Element(name = "date",required=false)
> private String date;
> public String getdate (){
> return date;
> }
>
> @Element(name = "price",required=false)
> private String price;
> public String getPrice() {
> return price;
> }
>
> @Element(name = "propertytitle", required = false)
> private String propertytitle;
> public String getPropertyTitle() {
> return propertytitle;
> }
>
> public Property(
> @Attribute(name="Id") @Namespace(reference = "http://schemas.microsoft.com/2003/10/Serialization/", prefix="z") String Id,
> @Element(name = "BrokerEmail",required=false) String BrokerEmail,
> @Element(name = "BrokerMobile",required=false) String BrokerMobile,
> @Element(name = "BrokerName", required = false) String BrokerName,
> @Element(name = "BuildingAddress",required=false) String BuildingAddress,
> @Element(name = "Buildingname",required=false) String Buildingname,
> @Element(name = "ClientEmail",required=false) String ClientEmail,
> @Element(name = "ClientMobile", required = false) String ClientMobile,
> @Element(name = "ClientName",required = false) String ClientName,
> @Element(name = "PropertyId") String PropertyId,
> @Element(name = "area",required=false) String area,
> @Element(name = "date",required=false) String date,
> @Element(name = "price",required=false) String price,
> @Element(name="propertytitle",required=false)String propertytitle)
> {
> this.Id=Id;
> this.BrokerEmail=BrokerEmail;
> this.BrokerMobile=BrokerMobile;
> this.BrokerName=BrokerName;
> this.BuildingAddress=BuildingAddress;
> this.Buildingname=Buildingname;
> this.ClientEmail=ClientEmail;
> this.ClientMobile=ClientMobile;
> this.ClientName=ClientName;
> this.PropertyId=PropertyId;
> this.area=area;
> this.date=date;
> this.price=price;
> this.propertytitle=propertytitle;
> }
> }
>
> With Data in search
>
> <ArrayOfmob_searchpropertiesbybudget_Result xmlns="http://schemas.datacontract.org/2004/07/RealtyRadarMobileService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
> <mob_searchpropertiesbybudget_Result z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
> <BrokerEmail i:nil="true" />
> <BrokerMobile i:nil="true" />
> <BrokerName i:nil="true" />
> <BuildingAddress>ALAKNANDA SOCIETY</BuildingAddress>
> <Buildingname>ALAKNANDA SOCIETY</Buildingname>
> <ClientEmail />
> <ClientMobile />
> <ClientName>S P Thakur [98334 46831]</ClientName>
> <PropertyId>1</PropertyId>
> <area>2000</area>
> <date>2010-04-01T00:00:00</date>
> <price>4.6 Cr</price>
> <propertytitle>2BHK Apartment in BORIVALI - WEST for Outright</propertytitle>
> </mob_searchpropertiesbybudget_Result>
> <mob_searchpropertiesbybudget_Result z:Id="i2" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
> <BrokerEmail />
> <BrokerMobile>9594111465</BrokerMobile>
> <BrokerName>Rohan Gill</BrokerName>
> <BuildingAddress>INDIRA APARTMENTS</BuildingAddress>
> <Buildingname>INDIRA APARTMENTS</Buildingname>
> <ClientEmail />
> <ClientMobile />
> <ClientName>S P Thakur [98334 46831]</ClientName>
> <PropertyId>2</PropertyId>
> <area>2986</area>
> <date>2010-04-01T00:00:00</date>
> <price>7.76 Cr</price>
> <propertytitle>3BHK Apartment in ANDHERI - EAST for Lease/Outright</propertytitle>
> </mob_searchpropertiesbybudget_Result>
> </ArrayOfmob_searchpropertiesbybudget_Result>
>
>
> Without Data
>
>
> <ArrayOfmob_searchpropertiesbybudget_Result xmlns="http://schemas.datacontract.org/2004/07/RealtyRadarMobileService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
>
>
>
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
>_______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Alexander S. <ir...@gm...> - 2011-03-15 08:11:20
|
Set required=false for the ElementList. Otherwise it always fails on empty lists.
С уважением, Александр Щеголев.
15.03.2011, в 10:04, Pinakin Shah <pi...@gm...> написал(а):
> Hello,
>
> We are using the simple framework 2.4.1 in Android to deserialize the WCF REST service response. We are using the WCF Bare response format, which do not have a enclosing parent tag in the response xml. It works well as long as the WCF returns atleast one record in response but gives the following error if the search do not fetch any records. Please help
>
> org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy @org.simpleframework.xml.ElementList(data=false, empty=true, entry=, inline=true, name=, required=true, type=void) on field 'list' public java.util.List com.realtyradar.mobile.PropertySearchResult.list for class com.realtyradar.mobile.PropertySearchResult at line -1
>
> Below is the code and xml responses from WCF
>
> package com.realtyradar.mobile;
> import java.util.List;
> import org.simpleframework.xml.Attribute;
> import org.simpleframework.xml.Element;
> import org.simpleframework.xml.ElementList;
> import org.simpleframework.xml.Namespace;
> import org.simpleframework.xml.NamespaceList;
> import org.simpleframework.xml.Root;
> @Root(name = "ArrayOfmob_searchpropertiesbybudget_Result", strict=false)
> @NamespaceList({
> @Namespace(reference = "http://schemas.datacontract.org/2004/07/RealtyRadarMobileService"),
> //@Namespace(reference = "http://schemas.datacontract.org/2004/07/RealtyRadarMobileService", prefix = "i") })
> @Namespace(reference = "http://www.w3.org/2001/XMLSchema-instance", prefix = "i") })
> public class PropertySearchResult {
>
> @ElementList( inline=true)
> public List<Property> list ;
>
> // public PropertySearchResult(@ElementList(inline = true,entry="mob_searchpropertiesbybudget_Result") List<Property> list) {
> // this.list = list;
> // }
> public List<Property> getList() {
> return this.list;
> }
>
> }
> @Root(name = "mob_searchpropertiesbybudget_Result")
> @Namespace(reference = "http://schemas.microsoft.com/2003/10/Serialization/", prefix = "z")
> class Property
> {
> @Attribute
> @Namespace(reference = "http://schemas.microsoft.com/2003/10/Serialization/", prefix="z")
> private String Id;
>
> public String getId()
> {return Id;}
> @Element(name = "BrokerEmail",required=false)
> private String BrokerEmail;
> public String getBrokerEmail() {
> return BrokerEmail;
> }
> @Element(name = "BrokerMobile",required=false)
> private String BrokerMobile;
> public String getBrokerMobile() {
> return BrokerMobile;
> }
> @Element(name = "BrokerName", required = false)
> private String BrokerName;
> public String getBrokerName() {
> return BrokerName;
> }
>
> @Element(name ="BuildingAddress",required=false)
> private String BuildingAddress;
> public String getBudildingAddress(){
> return BuildingAddress;
> }
>
> @Element(name = "Buildingname",required=false)
> private String Buildingname;
> public String getBuildingname() {
> return Buildingname;
> }
> @Element(name = "ClientEmail",required=false)
> private String ClientEmail;
> public String getClientEmail() {
> return ClientEmail;
>
> }
> @Element(name = "ClientMobile", required = false)
> private String ClientMobile;
> public String getClientMobile() {
> return ClientMobile;
> }
> @Element(name = "ClientName", required = false)
> private String ClientName;
> public String getClientName() {
> return ClientName;
> }
>
>
> @Element(name ="PropertyId")
> private String PropertyId;
> public String getPropertyId(){
> return PropertyId;
> }
>
>
> @Element(name ="area",required=false)
> private String area;
> public String getarea(){
> return area;
> }
>
> @Element(name = "date",required=false)
> private String date;
> public String getdate (){
> return date;
> }
>
> @Element(name = "price",required=false)
> private String price;
> public String getPrice() {
> return price;
> }
>
> @Element(name = "propertytitle", required = false)
> private String propertytitle;
> public String getPropertyTitle() {
> return propertytitle;
> }
>
> public Property(
> @Attribute(name="Id") @Namespace(reference = "http://schemas.microsoft.com/2003/10/Serialization/", prefix="z") String Id,
> @Element(name = "BrokerEmail",required=false) String BrokerEmail,
> @Element(name = "BrokerMobile",required=false) String BrokerMobile,
> @Element(name = "BrokerName", required = false) String BrokerName,
> @Element(name = "BuildingAddress",required=false) String BuildingAddress,
> @Element(name = "Buildingname",required=false) String Buildingname,
> @Element(name = "ClientEmail",required=false) String ClientEmail,
> @Element(name = "ClientMobile", required = false) String ClientMobile,
> @Element(name = "ClientName",required = false) String ClientName,
> @Element(name = "PropertyId") String PropertyId,
> @Element(name = "area",required=false) String area,
> @Element(name = "date",required=false) String date,
> @Element(name = "price",required=false) String price,
> @Element(name="propertytitle",required=false)String propertytitle)
> {
> this.Id=Id;
> this.BrokerEmail=BrokerEmail;
> this.BrokerMobile=BrokerMobile;
> this.BrokerName=BrokerName;
> this.BuildingAddress=BuildingAddress;
> this.Buildingname=Buildingname;
> this.ClientEmail=ClientEmail;
> this.ClientMobile=ClientMobile;
> this.ClientName=ClientName;
> this.PropertyId=PropertyId;
> this.area=area;
> this.date=date;
> this.price=price;
> this.propertytitle=propertytitle;
> }
> }
>
> With Data in search
>
> <ArrayOfmob_searchpropertiesbybudget_Result xmlns="http://schemas.datacontract.org/2004/07/RealtyRadarMobileService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
> <mob_searchpropertiesbybudget_Result z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
> <BrokerEmail i:nil="true" />
> <BrokerMobile i:nil="true" />
> <BrokerName i:nil="true" />
> <BuildingAddress>ALAKNANDA SOCIETY</BuildingAddress>
> <Buildingname>ALAKNANDA SOCIETY</Buildingname>
> <ClientEmail />
> <ClientMobile />
> <ClientName>S P Thakur [98334 46831]</ClientName>
> <PropertyId>1</PropertyId>
> <area>2000</area>
> <date>2010-04-01T00:00:00</date>
> <price>4.6 Cr</price>
> <propertytitle>2BHK Apartment in BORIVALI - WEST for Outright</propertytitle>
> </mob_searchpropertiesbybudget_Result>
> <mob_searchpropertiesbybudget_Result z:Id="i2" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/">
> <BrokerEmail />
> <BrokerMobile>9594111465</BrokerMobile>
> <BrokerName>Rohan Gill</BrokerName>
> <BuildingAddress>INDIRA APARTMENTS</BuildingAddress>
> <Buildingname>INDIRA APARTMENTS</Buildingname>
> <ClientEmail />
> <ClientMobile />
> <ClientName>S P Thakur [98334 46831]</ClientName>
> <PropertyId>2</PropertyId>
> <area>2986</area>
> <date>2010-04-01T00:00:00</date>
> <price>7.76 Cr</price>
> <propertytitle>3BHK Apartment in ANDHERI - EAST for Lease/Outright</propertytitle>
> </mob_searchpropertiesbybudget_Result>
> </ArrayOfmob_searchpropertiesbybudget_Result>
>
>
> Without Data
>
>
> <ArrayOfmob_searchpropertiesbybudget_Result xmlns="http://schemas.datacontract.org/2004/07/RealtyRadarMobileService" xmlns:i="http://www.w3.org/2001/XMLSchema-instance" />
>
>
>
>
> ------------------------------------------------------------------------------
> Colocation vs. Managed Hosting
> A question and answer guide to determining the best fit
> for your organization - today and in the future.
> http://p.sf.net/sfu/internap-sfd2d
> _______________________________________________
> Simple-support mailing list
> Sim...@li...
> https://lists.sourceforge.net/lists/listinfo/simple-support
|
|
From: Pinakin S. <pi...@gm...> - 2011-03-15 07:04:09
|
Hello,
We are using the simple framework 2.4.1 in Android to deserialize the WCF
REST service response. We are using the WCF Bare response format, which do
not have a enclosing parent tag in the response xml. It works well as long
as the WCF returns atleast one record in response but gives the following
error if the search do not fetch any records. Please help
*org.simpleframework.xml.core.ValueRequiredException: Unable to satisfy
@org.simpleframework.xml.ElementList(data=false, empty=true, entry=,
inline=true, name=, required=true, type=void) on field 'list' public
java.util.List com.realtyradar.mobile.PropertySearchResult.list for class
com.realtyradar.mobile.PropertySearchResult at line -1*
**
*Below is the code and xml responses from WCF*
*package com.realtyradar.mobile;*
*import java.util.List;*
*import org.simpleframework.xml.Attribute;
import org.simpleframework.xml.Element;
import org.simpleframework.xml.ElementList;
import org.simpleframework.xml.Namespace;
import org.simpleframework.xml.NamespaceList;
import org.simpleframework.xml.Root;*
*@Root(name = "ArrayOfmob_searchpropertiesbybudget_Result", strict=false)
@NamespaceList({
@Namespace(reference = "**
http://schemas.datacontract.org/2004/07/RealtyRadarMobileService*<http://schemas.datacontract.org/2004/07/RealtyRadarMobileService>
*"),
**//@Namespace(reference** = "**
http://schemas.datacontract.org/2004/07/RealtyRadarMobileService*<http://schemas.datacontract.org/2004/07/RealtyRadarMobileService>
*", prefix = "i") })
@Namespace(reference =
"**http://www.w3.org/2001/XMLSchema-instance*<http://www.w3.org/2001/XMLSchema-instance>
*", prefix = "i") })
public class PropertySearchResult {
@ElementList( inline=true)
public List<Property> list ;
// public PropertySearchResult(@ElementList(inline =
true,entry="mob_searchpropertiesbybudget_Result") List<Property> list) {
// this.list = list;
// }*
* public List<Property> getList() {*
* return this.list;
}
}*
*@Root(name = "mob_searchpropertiesbybudget_Result")
@Namespace(reference = "**
http://schemas.microsoft.com/2003/10/Serialization/*<http://schemas.microsoft.com/2003/10/Serialization/>
*", prefix = "z")
class Property
{
@Attribute
@Namespace(reference = "**
http://schemas.microsoft.com/2003/10/Serialization/*<http://schemas.microsoft.com/2003/10/Serialization/>
*", prefix="z")
private String Id;
public String getId()
{return Id;}*
* @Element(name = "BrokerEmail",required=false)
private String BrokerEmail;*
* public String getBrokerEmail() {
return BrokerEmail;
}*
* @Element(name = "BrokerMobile",required=false)
private String BrokerMobile;*
* public String getBrokerMobile() {
return BrokerMobile;
}*
* @Element(name = "BrokerName", required = false)
private String BrokerName;*
* public String getBrokerName() {
return BrokerName;
}
@Element(name ="BuildingAddress",required=false)
private String BuildingAddress;
public String getBudildingAddress(){
return BuildingAddress;
}
@Element(name = "Buildingname",required=false)
private String Buildingname;*
* public String getBuildingname() {
return Buildingname;
}*
* @Element(name = "ClientEmail",required=false)
private String ClientEmail;*
* public String getClientEmail() {
return ClientEmail;
}
@Element(name = "ClientMobile", required = false)
private String ClientMobile;*
* public String getClientMobile() {
return ClientMobile;
}*
* @Element(name = "ClientName", required = false)
private String ClientName;*
* public String getClientName() {
return ClientName;
}
@Element(name ="PropertyId")
private String PropertyId;
public String getPropertyId(){
return PropertyId;
}
@Element(name ="area",required=false)
private String area;
public String getarea(){
return area;
}
@Element(name = "date",required=false)
private String date;*
* public String getdate (){
return date;
}
@Element(name = "price",required=false)
private String price;*
* public String getPrice() {
return price;
}
@Element(name = "propertytitle", required = false)
private String propertytitle;*
* public String getPropertyTitle() {
return propertytitle;
}
public Property(
@Attribute(name="Id") @Namespace(reference = "**
http://schemas.microsoft.com/2003/10/Serialization/*<http://schemas.microsoft.com/2003/10/Serialization/>
*", prefix="z") String Id,
@Element(name = "BrokerEmail",required=false) String BrokerEmail,
@Element(name = "BrokerMobile",required=false) String BrokerMobile,
@Element(name = "BrokerName", required = false) String BrokerName,
@Element(name = "BuildingAddress",required=false) String BuildingAddress,
@Element(name = "Buildingname",required=false) String Buildingname,
@Element(name = "ClientEmail",required=false) String ClientEmail,
@Element(name = "ClientMobile", required = false) String ClientMobile,
@Element(name = "ClientName",required = false) String ClientName,
@Element(name = "PropertyId") String PropertyId,
@Element(name = "area",required=false) String area,
@Element(name = "date",required=false) String date,
@Element(name = "price",required=false) String price,
@Element(name="propertytitle",required=false)String propertytitle)
{
this.Id=Id;
this.BrokerEmail=BrokerEmail;
this.BrokerMobile=BrokerMobile;
this.BrokerName=BrokerName;
this.BuildingAddress=BuildingAddress;
this.Buildingname=Buildingname;
this.ClientEmail=ClientEmail;
this.ClientMobile=ClientMobile;
this.ClientName=ClientName;
this.PropertyId=PropertyId;
this.area=area;
this.date=date;
this.price=price;
this.propertytitle=propertytitle;
}
}*
* With Data in search*
**
<ArrayOfmob_searchpropertiesbybudget_Result xmlns="*
http://schemas.datacontract.org/2004/07/RealtyRadarMobileService*" xmlns:i="
*http://www.w3.org/2001/XMLSchema-instance*">
<mob_searchpropertiesbybudget_Result z:Id="*i1*" xmlns:z="*
http://schemas.microsoft.com/2003/10/Serialization/*">
* * <BrokerEmail i:nil="*true*" />
* * <BrokerMobile i:nil="*true*" />
* * <BrokerName i:nil="*true*" />
* * <BuildingAddress>*ALAKNANDA SOCIETY*</BuildingAddress>
* * <Buildingname>*ALAKNANDA SOCIETY*</Buildingname>
* * <ClientEmail />
* * <ClientMobile />
* * <ClientName>*S P Thakur [98334 46831]*</ClientName>
* * <PropertyId>*1*</PropertyId>
* * <area>*2000*</area>
* * <date>*2010-04-01T00:00:00*</date>
* * <price>*4.6 Cr*</price>
* * <propertytitle>*2BHK Apartment in BORIVALI - WEST for Outright*</
propertytitle>
* * </mob_searchpropertiesbybudget_Result>
<mob_searchpropertiesbybudget_Result z:Id="*i2*" xmlns:z="*
http://schemas.microsoft.com/2003/10/Serialization/*">
* * <BrokerEmail />
* * <BrokerMobile>*9594111465*</BrokerMobile>
* * <BrokerName>*Rohan Gill*</BrokerName>
* * <BuildingAddress>*INDIRA APARTMENTS*</BuildingAddress>
* * <Buildingname>*INDIRA APARTMENTS*</Buildingname>
* * <ClientEmail />
* * <ClientMobile />
* * <ClientName>*S P Thakur [98334 46831]*</ClientName>
* * <PropertyId>*2*</PropertyId>
* * <area>*2986*</area>
* * <date>*2010-04-01T00:00:00*</date>
* * <price>*7.76 Cr*</price>
* * <propertytitle>*3BHK Apartment in ANDHERI - EAST for Lease/Outright*</
propertytitle>
* * </mob_searchpropertiesbybudget_Result>
</ArrayOfmob_searchpropertiesbybudget_Result>
Without Data
<ArrayOfmob_searchpropertiesbybudget_Result xmlns="*
http://schemas.datacontract.org/2004/07/RealtyRadarMobileService*" xmlns:i="
*http://www.w3.org/2001/XMLSchema-instance*" />
|
|
From: Alain D. <ade...@gm...> - 2011-03-12 15:39:29
|
Hi
I'd like to limit the deserialization depth.
My XML looks like:
<content>
<elementA>valueA</elementA
<elementB>
<elementC>valueC</elementC>
</elementB>
</content>
I'd like to declare elementB as String and get <elementC>valueC</elementC>
as its value.
Is it possible and how do I manage this?
Alain
|