-1

I need a help to clarify why I get this warning.

data: [/* DATA URL:http://jsonservices-staging.switchautomation.com/RestService.svc/GetObservationSummaries?TotalType=DetailSummaryByInstallationIDByObjectPropertyID&SourceID=InstallationID:8a9e5fcf-975e-4ab9-afbf-0ad94c19e0b5;ObjectPropertyID:8f9be426-b1e5-4ecc-a560-9d204aeceb12&DateFrom=19.04.2012&DateTo=20.04.2012*/
    <b>Error:</b> [2] Invalid argument supplied for foreach()<br />]
Danis
  • 1,978
  • 3
  • 16
  • 27

1 Answers1

1

Did you write the code, or are you trying to consume the web service? If you wrote it, you've got an issue with your For Each control structure. It could be that

  1. You're attempting to iterate through something that isn't a collection, array, or otherwise compatible with the For Each control structure. Or...
  2. You're attempting to cast / convert an element in then collection to the incorrect type.
  3. Something else?

If you didn't write the code, it's possible that:

  1. You passed in some data that wasn't understood, or was packaged incorrectly. Like you sent in an hashtable and it expected a single dimension array. Or.
  2. Their code's broken. :(

I know that wasn't too specific, but hopefully it will help get you on the right path. (:

darin
  • 419
  • 3
  • 9