Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Malformed fetch request XML

    Hello,
    I'm having trouble with a REST datasource fetch operation. I pass an AdvancedCriteria object to it so:

    Code:
    Criterion[] criterions = new Criterion[] {new Criterion(CRITERIA_FULLTEXT, OperatorId.ICONTAINS, value.toString())};
    AdvancedCriteria criteria = new AdvancedCriteria(OperatorId.AND, criterions));
    
    grid.fetchData(criteria, new CustomCallback() {
    			
    			@Override
    			public void success() {
    				...
    			}
    			
    }, new CustomRequest().prompt("Reading data ..."));
    When running the compiled code in either Firefox or Chrome, the browser says that there are malformed characters in the request XML. I had a look at it, and the problem is here:

    Code:
    <criteria>
                	<fieldName>__fulltext</fieldName>
                	<operator>iContains</operator>
                	<value>
                		<0>t</0>
                		<1>r</1>
                		<2>e</2>
                		<3>n</3>
                		<4>d</4>
                		<tI>2</tI>
                	</value>
    </criteria>
    Why does it separate each letter into a separate node? This doesn't work. I'm using SmartGWT 2.2.

    Thanks in advance for your kind reply.

    #2
    I also had this problem. This solved it:

    http://forums.smartclient.com/showthread.php?t=13849

    (Cast to (String) instead of using toString())

    Comment


      #3
      Originally posted by RubenS
      I also had this problem. This solved it:

      http://forums.smartclient.com/showthread.php?t=13849

      (Cast to (String) instead of using toString())
      You saved my life!

      Comment

      Working...
      X