<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to return several InfoTable from service?如何一次性从Service中返回五六个InfoTable？ in ThingWorx Developers</title>
    <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527805#M21659</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;private static final int &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt;REQUEST_TIMEOUT = 60000;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I wait &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt;REQUEST_TIMEOUT * 2 milliseconds and still time out!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Other parameter is all right. I have written many code like this, they are all work well. But those services is not return InfoTable. Just this one use InfoTable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 May 2017 07:45:26 GMT</pubDate>
    <dc:creator>yingziDing</dc:creator>
    <dc:date>2017-05-05T07:45:26Z</dc:date>
    <item>
      <title>How to return several InfoTable from service?如何一次性从Service中返回五六个InfoTable？</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527800#M21654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-size: 13.3333px;"&gt;The return value type of the service is InfoTable. And I know that the column type can also be InfoTable. But, when I put five or six InfoTable in one row and return it to the client, the client side throws TimeoutException. I mean that I call the invokeService method (Java SDK), and set 60s to the timeout parameter, it's also timeout! Always timeout every time.I try to return just one InfoTable, it works. And then I try to return 2 or 3 InfoTables, it also work. But when I try to return 4 InfoTables, it is timeout. Sometimes return 3 InfoTable also timeout. It's unpredictable!&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #666666; font-family: Tahoma, Arial, 宋体, 'Malgun Gothic'; font-size: 12px; text-align: justify; background-color: rgba(255, 255, 255, 0.8);"&gt;Are there any restrictions in return value?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #666666; font-family: Tahoma, Arial, 宋体, 'Malgun Gothic'; font-size: 12px; text-align: justify; background-color: rgba(255, 255, 255, 0.8);"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="text-align: justify;"&gt;&lt;SPAN style="background-color: rgba(255, 255, 255, 0.8); color: #666666; font-size: 12px; font-family: Tahoma, Arial, 宋体, 'Malgun Gothic';"&gt;Following is the definition of return value. There is just 3 InfoTables, if there is 4 or 5 InfoTables, the client will timeout. But today, 3 InfoTables also make client timeout, I don't know why.&lt;SPAN style="font-size: 13.3333px;"&gt; It's totally unpredictable! &lt;SPAN style="color: #666666; font-family: Tahoma, Arial, 宋体, 'Malgun Gothic'; font-size: 12px; text-align: justify; background-color: rgba(255, 255, 255, 0.8);"&gt;Are there any restrictions in return value? The number of rows in each InfoTable are not large.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-size: 13.3333px;"&gt;&lt;SPAN style="color: #666666; font-family: Tahoma, Arial, 宋体, 'Malgun Gothic'; font-size: 12px; text-align: justify; background-color: rgba(255, 255, 255, 0.8);"&gt;&lt;IMG __jive_id="5336" alt="QQ图片20170505115713.png" class="image-1 jive-image" src="https://www.ptcusercommunity.com/legacyfs/online/thingworx/5336_QQ图片20170505115713.png" style="height: auto;" /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Service的返回值是InfoTable类型，通常里面是一行数据，带有几个字段，以此来返回数据，当需要返回的数据是InfoTable时，字段的类型可以是Infotable，这我知道，但是问题是现在我这么做了，但是却在客户端出现了invokeService超时的问题，InfoTable的数据量很少，每个InfoTable只有三四行，客户端调用invokeService设置超时时间60秒，仍然超时，服务器和客户端都在局域网，网速是没问题的。请问这是怎么回事？或者有什么别的解决方案以返回数个InfoTable，最好同时返回。&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 04:04:31 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527800#M21654</guid>
      <dc:creator>yingziDing</dc:creator>
      <dc:date>2017-05-05T04:04:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to return several InfoTable from service?如何一次性从Service中返回五六个InfoTable？</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527801#M21655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear &lt;A href="https://community.thingworx.com/u1/13600"&gt;yz ding&lt;/A&gt;,&lt;/P&gt;&lt;P&gt;Could you send me your sample code in Java SDK and the service called in invokeService in thingworx composer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 05:17:07 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527801#M21655</guid>
      <dc:creator>AnnaAn</dc:creator>
      <dc:date>2017-05-05T05:17:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to return several InfoTable from service?如何一次性从Service中返回五六个InfoTable？</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527802#M21656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;IMG alt="QQ图片20170505143656.png" class="image-1 jive-image" src="https://www.ptcusercommunity.com/legacyfs/online/thingworx/5337_QQ图片20170505143656.png" style="height: 258px; width: 620px;" /&gt;&lt;IMG alt="QQ图片20170505143711.png" class="image-2 jive-image" src="https://www.ptcusercommunity.com/legacyfs/online/thingworx/5338_QQ图片20170505143711.png" style="height: 176px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 06:39:29 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527802#M21656</guid>
      <dc:creator>yingziDing</dc:creator>
      <dc:date>2017-05-05T06:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to return several InfoTable from service?如何一次性从Service中返回五六个InfoTable？</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527803#M21657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.thingworx.com/u1/13600"&gt;yz ding&lt;/A&gt;​,&lt;/P&gt;&lt;P&gt;What's your REQUEST_TIMEOUT value in your restoreData method in Java SDK?&lt;/P&gt;&lt;P&gt;Does your Java SDK installed on the same server to Thingworx?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 07:15:18 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527803#M21657</guid>
      <dc:creator>AnnaAn</dc:creator>
      <dc:date>2017-05-05T07:15:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to return several InfoTable from service?如何一次性从Service中返回五六个InfoTable？</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527804#M21658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.thingworx.com/u1/13600"&gt;yz ding&lt;/A&gt;​,&lt;/P&gt;&lt;P&gt;Just let you know that the timeout in the invokeService is milliseconds, please check if the timeout you set is big enough.&lt;/P&gt;&lt;P&gt;Try to increase the timeout and see if issue is gone.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 07:18:56 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527804#M21658</guid>
      <dc:creator>AnnaAn</dc:creator>
      <dc:date>2017-05-05T07:18:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to return several InfoTable from service?如何一次性从Service中返回五六个InfoTable？</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527805#M21659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;private static final int &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt;REQUEST_TIMEOUT = 60000;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I wait &lt;SPAN style="color: #4d4d4f; font-family: 'Source Sans Pro', sans-serif; font-size: 13px;"&gt;REQUEST_TIMEOUT * 2 milliseconds and still time out!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Other parameter is all right. I have written many code like this, they are all work well. But those services is not return InfoTable. Just this one use InfoTable.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 07:45:26 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527805#M21659</guid>
      <dc:creator>yingziDing</dc:creator>
      <dc:date>2017-05-05T07:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to return several InfoTable from service?如何一次性从Service中返回五六个InfoTable？</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527806#M21660</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.thingworx.com/u1/13600"&gt;yz ding&lt;/A&gt;​,&lt;/P&gt;&lt;P&gt;In your Java SDK, I see you are using AndroidConnectedThingClient, could you let me know if this is a class you created and is it extending the ConnectedThingClient class? What's your java SDK version? As far as I know, you could call a service from edge with:&lt;/P&gt;&lt;P&gt;1. create SimpleThingClient which extends from ConnectedThingClient&lt;/P&gt;&lt;P&gt;2. Create new SimpleThingClient Object: SimpleThingClient client = new SimpleThingClient(config);&lt;/P&gt;&lt;P&gt;3. Create ValueCollection and set parameters for service(i)&lt;/P&gt;&lt;P&gt;4. Call InvokeService with: client.invokeService(ThingworxEntityTypes.Things, "YOURTHINGNAME", "SERVICENAME", new ValueCollection(), 5000);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could you try it and see if you got the same error?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 08:10:07 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527806#M21660</guid>
      <dc:creator>AnnaAn</dc:creator>
      <dc:date>2017-05-05T08:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to return several InfoTable from service?如何一次性从Service中返回五六个InfoTable？</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527807#M21661</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I use the official Android SDK provided by Thingworx. The version is 1.0.0.38.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 May 2017 09:42:57 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527807#M21661</guid>
      <dc:creator>yingziDing</dc:creator>
      <dc:date>2017-05-05T09:42:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to return several InfoTable from service?如何一次性从Service中返回五六个InfoTable？</title>
      <link>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527808#M21662</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.thingworx.com/u1/13600"&gt;yz ding&lt;/A&gt;​,&lt;/P&gt;&lt;P&gt;I did not use Android SDK before, but I indeed did the similar work with Java SDK and it works fine.&lt;/P&gt;&lt;P&gt;One thing I could imagine is that you client may not be connected to ThingWorx when you call the services.&lt;/P&gt;&lt;P&gt;So it worth a try to wait some time for the client to connect to Thingworx server and then&amp;nbsp; you call invokeService.&lt;/P&gt;&lt;P&gt;Try to add code&lt;/P&gt;&lt;PRE __default_attr="java" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14942961584937786 jive_text_macro" jivemacro_uid="_14942961584937786" modifiedtitle="true"&gt;&lt;P&gt;// try to add this section code after client instance is created&lt;/P&gt;&lt;P&gt;// in my exmaple it's 30000 ms, but you could increase/decrease it to test&lt;/P&gt;&lt;P&gt;if (client.waitForConnection(30000)){&lt;/P&gt;&lt;P&gt;// invokeservice here&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br,&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 09 May 2017 02:17:27 GMT</pubDate>
      <guid>https://www.ptcusercommunity.com/t5/ThingWorx-Developers/How-to-return-several-InfoTable-from-service/m-p/527808#M21662</guid>
      <dc:creator>AnnaAn</dc:creator>
      <dc:date>2017-05-09T02:17:27Z</dc:date>
    </item>
  </channel>
</rss>

