Dec 02, 2010, 2:56 PM
[CLOSED] Load failed: Unexpected token <
I have a store getting data from WebService. Getting the error Load failed: Unexpected token <.
Any ideas? Is there anything I'm not doing?
<list of Class that I'm returning...
Any ideas? Is there anything I'm not doing?
<list of Class that I'm returning...
[Serializable]
public class ActivityResult
{
public string Name { get; set; }
public string Comment { get; set; }
public int ActivityId { get; set; }
public int ActivityTypeId { get; set; }
public int EntityId { get; set; }
public int EntityTypeId { get; set; }
public string CreatedOn { get; set; }
public string CreatedBy { get; set; }
public string EntityName { get; set; }
public string Image { get; set; }
}
WebService Method: [WebMethod]
public List<ActivityResult> GetActivities()
{
return Aksia.Activities.Utilities.GetAllActivities();
}
<ext:Store runat="server" ID="storeActivities">
<Proxy>
<ext:HttpProxy Method="GET" Url="../../Services/ActivitiesService.asmx/GetActivities" />
</Proxy>
<Reader>
<ext:JsonReader>
<Fields>
<ext:RecordField Name="Name" Type="String" />
<ext:RecordField Name="Comment" Type="String" />
<ext:RecordField Name="Image" Type="String" />
<ext:RecordField Name="EntityTypeId" Type="Int" />
<ext:RecordField Name="EntityId" Type="Int" />
<ext:RecordField Name="EntityName" Type="String" />
<ext:RecordField Name="CreatedOn" Type="String" />
<ext:RecordField Name="CreatedBy" Type="String" />
</Fields>
</ext:JsonReader>
</Reader>
<Listeners>
<LoadException Handler="var e = e || {message: response.responseText}; alert('Load failed: ' + e.message);" />
</Listeners>
</ext:Store>
Sample return data:
<?xml version="1.0" encoding="utf-8"?>
<ArrayOfActivityResult xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
<ActivityResult>
<Name>test cas</Name>
<Comment>cas</Comment>
<ActivityId>15</ActivityId>
<ActivityTypeId>1</ActivityTypeId>
<EntityId>835</EntityId>
<EntityTypeId>0</EntityTypeId>
<CreatedOn>Dec 2 2010 10:12AM</CreatedOn>
<CreatedBy>AKSIA\rthiney</CreatedBy>
<EntityName>Queen's University at Kingston</EntityName>
<Image>Telephone</Image>
</ActivityResult>
<ActivityResult>
<Name>TEST NOTER</Name>
<Comment>NOTE WERE</Comment>
<ActivityId>14</ActivityId>
<ActivityTypeId>4</ActivityTypeId>
<EntityId>1171</EntityId>
<EntityTypeId>1</EntityTypeId>
<CreatedOn>Dec 1 2010 5:29PM</CreatedOn>
<CreatedBy>AKSIA\rthiney</CreatedBy>
<EntityName>Cerberus Capital Management</EntityName>
<Image>Note</Image>
</ActivityResult>
<ActivityResult>
<Name>tester</Name>
<Comment>asdfasdfasdfasdfasdfasdfasdfasdfasdfsdfasfasdfasdfasdfasdf</Comment>
<ActivityId>13</ActivityId>
<ActivityTypeId>4</ActivityTypeId>
<EntityId>15301</EntityId>
<EntityTypeId>5</EntityTypeId>
<CreatedOn>Dec 1 2010 3:51PM</CreatedOn>
<CreatedBy>AKSIA\rthiney</CreatedBy>
<EntityName>Marcos Romaneiro</EntityName>
<Image>Note</Image>
</ActivityResult>
<ActivityResult>
<Name>TEST Call</Name>
<Comment>TESTasdfasdf</Comment>
<ActivityId>11</ActivityId>
<ActivityTypeId>1</ActivityTypeId>
<EntityId>13867</EntityId>
<EntityTypeId>5</EntityTypeId>
<CreatedOn>Dec 1 2010 3:23PM</CreatedOn>
<CreatedBy>AKSIA\rthiney</CreatedBy>
<EntityName>Helen Clark</EntityName>
<Image>Telephone</Image>
</ActivityResult>
<ActivityResult>
<Name>TEST NOTe</Name>
<Comment>TEST</Comment>
<ActivityId>8</ActivityId>
<ActivityTypeId>4</ActivityTypeId>
<EntityId>13867</EntityId>
<EntityTypeId>5</EntityTypeId>
<CreatedOn>Dec 1 2010 3:00PM</CreatedOn>
<CreatedBy>AKSIA\rthiney</CreatedBy>
<EntityName>Helen Clark</EntityName>
<Image>Note</Image>
</ActivityResult>
<ActivityResult>
<Name>TEST NOTe</Name>
<Comment>TEST</Comment>
<ActivityId>9</ActivityId>
<ActivityTypeId>4</ActivityTypeId>
<EntityId>13867</EntityId>
<EntityTypeId>5</EntityTypeId>
<CreatedOn>Dec 1 2010 3:00PM</CreatedOn>
<CreatedBy>AKSIA\rthiney</CreatedBy>
<EntityName>Helen Clark</EntityName>
<Image>Note</Image>
</ActivityResult>
<ActivityResult>
<Name>TEST Call</Name>
<Comment>TESTasdfasdf</Comment>
<ActivityId>10</ActivityId>
<ActivityTypeId>1</ActivityTypeId>
<EntityId>13867</EntityId>
<EntityTypeId>5</EntityTypeId>
<CreatedOn>Dec 1 2010 3:00PM</CreatedOn>
<CreatedBy>AKSIA\rthiney</CreatedBy>
<EntityName>Helen Clark</EntityName>
<Image>Telephone</Image>
</ActivityResult>
<ActivityResult>
<Name>TEst meeting</Name>
<Comment>asfd</Comment>
<ActivityId>7</ActivityId>
<ActivityTypeId>3</ActivityTypeId>
<EntityId>636</EntityId>
<EntityTypeId>0</EntityTypeId>
<CreatedOn>Dec 1 2010 2:36PM</CreatedOn>
<CreatedBy>AKSIA\rthiney</CreatedBy>
<EntityName>King Abdullah University</EntityName>
<Image>Group</Image>
</ActivityResult>
<ActivityResult>
<Name>trst</Name>
<Comment>asfasd</Comment>
<ActivityId>6</ActivityId>
<ActivityTypeId>1</ActivityTypeId>
<EntityId>5300</EntityId>
<EntityTypeId>2</EntityTypeId>
<CreatedOn>Dec 1 2010 2:21PM</CreatedOn>
<CreatedBy>AKSIA\rthiney</CreatedBy>
<EntityName>Cerberus FIM </EntityName>
<Image>Telephone</Image>
</ActivityResult>
</ArrayOfActivityResult>
Last edited by Daniil; Dec 08, 2010 at 12:11 AM.
Reason: Marked as [CLOSED]. No more information was provided.