Announcement

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

    Console Warning RPCManager:Error evaling REST RPC response

    I'm trying to access a custom build rest server via a RestDataSource with dataformat xml and setRecordXPath = "//alias". Everything works as expected, but in the developer console I see a warning for every response:

    Code:
    WARN:RPCManager:Error evaling REST RPC response: SyntaxError: Unexpected token < response text: <response>
      <data>
        <alias>
          <name>name</name>
          <prename>prename</prename>
        </alias>
      </data>
      <status>0</status>
      <startRow>0</startRow>
      <endRow>1</endRow>
      <totalRows>1</totalRows>
    </response>
    Any idea what the problem could be?

    I'm using SmartGWT v12.0p_2018-06-13

    #2
    That message would generally be logged for malformed XML. However you’re saying that the system generally works, which it wouldn’t if your responses were malformed. What may be happening is that some responses are malformed and others not?

    Using the browsers built-in network diagnostics will allow you to look at your raw responses and determine if some are malformed.

    Comment


      #3
      The raw response in the network diagnostics tab is exactly the same as posted above:

      Code:
       
       <response>   <data>     <alias>       <name>name</name>       <prename>prename</prename>     </alias>   </data>   <status>0</status>   <startRow>0</startRow>   <endRow>1</endRow>   <totalRows>1</totalRows> </response>
      As everything works as expected, is there a way to disable logging a warning to the console?

      Comment


        #4
        We can’t reproduce this, and we suspect something is incorrect about your report, for example, perhaps the dataFormat is actually still set to JSON, which would explain “<“ being an unexpected character.

        Note also that you’re not following the standard RestDataSource format. As the docs explain, if you want your own format (in any way, including something like introducing an unnecessary extra layer of nesting), you should start with DataSource, not RestDataSource.

        Let is know if you can produce a test case that shows correct usage and suggests a framework issue.

        Comment

        Working...
        X