Trouble getting a YQL table working - yql

So I'm trying to set up a YQL table using the API at http://www.teamliquid.net/video/streams/?filter=live&xml=1 but having some issues.
Here's my table definition:
<?xml version="1.0" encoding="UTF-8"?>
<table xmlns="http://query.yahooapis.com/v1/schema/table.xsd">
<meta>
<author>TL.net</author>
<description>TL.net's streams</description>
<documentationURL>none</documentationURL>
<sampleQuery>select * from {table}</sampleQuery>
</meta>
<bindings>
<select itemPath="streamlist" produces="XML">
<urls>
<url>http://www.teamliquid.net/video/streams/?xml=1</url>
</urls>
<inputs>
<key id="filter" type="xs:string" paramType="query" />
</inputs>
</select>
</bindings>
</table>
Running use "store://q5awkFLmEqteFVOTUJbQ6h" as tl; select * from tl where filter="live" yields the following error:
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng"
yahoo:count="0" yahoo:created="2012-02-13T22:14:48Z" yahoo:lang="en-US">
<diagnostics>
<publiclyCallable>true</publiclyCallable>
<url execution-start-time="1" execution-stop-time="33"
execution-time="32" proxy="DEFAULT"><![CDATA[store://q5awkFLmEqteFVOTUJbQ6h]]></url>
<url execution-start-time="35" execution-stop-time="232"
execution-time="197" http-status-code="406"
http-status-message="Not Acceptable" proxy="DEFAULT"><![CDATA[http://www.teamliquid.net/video/streams/?xml=1&filter=live]]></url>
<user-time>232</user-time>
<service-time>258</service-time>
<build-version>25247</build-version>
</diagnostics>
<results/>
</query>
I really can't figure out why it's not working.

In the debug statements, you can see that YQL is reading from your source URL: http://www.teamliquid.net/video/streams/?xml=1&filter=live, but is receiving back an HTTP 406 Not Acceptable error message.
HTTP 406 is meant to cover cases where the server cannot respond in any of the requested (Accept header) formats. I don't know how that applies in this case, but the teamliquid.net source mentions the following:
gzip encoding is required, please also send a valid User-Agent with the name of your application / site and contact info. This page and the XML are updated every five minutes, please do not poll more frequently than every five minutes or you may risk being IP banned. If you have any questions, please PM R1CH.
I suspect it's one of two things:
The YQL servers are not requesting data in gzip or compressed format
The teamliquid.net servers are blocking YQL

Related

Error while sending POST request to WSO2 ESB

I've created a proxy to tweet using WSO2 ESB Twitter connector. My Tweet proxy looks like this.
<?xml version="1.0" encoding="UTF-8"?>
<proxy name="Tweet" startOnLoad="true" trace="disable"
transports="http https" xmlns="http://ws.apache.org/ns/synapse">
<target>
<inSequence>
<property expression="json-eval($.message)" name="Tweet"
scope="default" type="STRING"/>
<twitter.init>
<consumerKey>xxxxxxxxxx</consumerKey>
<consumerSecret>xxxxxxxxxxxx</consumerSecret>
<accessToken>xxxxxxxxxxxxx</accessToken>
<accessTokenSecret>xxxxxxxxxx</accessTokenSecret>
</twitter.init>
<twitter.updateStatus>
<status>{$ctx:Tweet}</status>
</twitter.updateStatus>
<respond/>
</inSequence>
<outSequence/>
<faultSequence/>
</target>
</proxy>
The project was deployed without any errors but when ever i make a POST request to Tweet from Postman im getting an error status of 170 with a message Missing required parameter: status.
The Post request consist of a json like this.
{"Content-Type":"application/json","payload":"{\"message\":\"Hellow WSO2 ESB!!!! #WSO2 #Test\"}"}
In the ESB sever console it gives an error like this
ERROR - SynapseJsonPath #stringValueOf. Error evaluating JSON Path <$.message>. Returning empty result. Error>>> invalid path
Any particular reason why im getting this error?. How to overcome this?.
Change the property expression like this.
expression="json-eval($.payload.message)"

QuickBooks (QBD) SyncActivity inconsistent behavior?

I am using QuickBooks (QBD) SyncActivity API to get the information about Quickbooks Desktop synchronizations.But sometime when I call SyncActivity API I didn't get response and sometimes I get response.
Is there any connectivity issue with cloud or Is there anyting I'm missing to specify to get details from cloud, below is Request and code for more details,
//Sync Activity details
Intuit.Ipp.Data.Qbd.SyncActivityRequest syncActivityRequest = new SyncActivityRequest();
var syncStatuses = dataServices.GetSyncActivity(syncActivityRequest);
syncActivity Request,
<?xml version="1.0" encoding="utf-8"?>
<SyncActivityRequest xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.intuit.com/sb/cdm/v2" />
Please share your views and suggessions.
Thanks,
Reshma D.
You pass in a begin and end time stamp and you will get a response if there was any sync activity within the time span that you specified. There may or may not be something to return
<?xml version="1.0"?>
<SyncActivityRequest xmlns="http://www.intuit.com/sb/cdm/v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.intuit.com/sb/cdm/v2 RestDataFilter.xsd ">
<OfferingId>ipp</OfferingId>
<StartCreatedTMS>2011-06-02T08:31:25.0Z</StartCreatedTMS>
<EndCreatedTMS>2011-06-02T08:31:28.0Z</EndCreatedTMS>
</SyncActivityRequest>
Thanks
Jarred

Cannot get records for particular meeting

Cannot figure out how to properly send request to get all records, which are corresponding to the meeting.
From this request mysite.adobeconnect.com/api/xml?action=sco-info&sco-id=1087877981
I get such response:
<?xml version="1.0" encoding="utf-8"?>
<results>
<status code="ok"/>
<sco account-id="1051298934" disabled="" display-seq="0" folder-id="1057190786" icon="meeting" lang="en" max-retries="" sco-id="1087877981" source-sco-id="1051270965" type="meeting" version="3">
<date-begin>2013-08-20T03:15:00.000-07:00</date-begin>
<date-created>2013-08-20T03:30:04.200-07:00</date-created>
<date-end>2013-08-20T04:15:00.000-07:00</date-end>
<date-modified>2013-08-20T06:39:45.927-07:00</date-modified>
<name>DevTeam Meeting 2</name>
<url-path>/devmeeting2/</url-path>
<update-linked-item>true</update-linked-item>
</sco>
<source-sco>
<source-sco account-id="1051298934" disabled="" display-seq="0" folder-id="1051270964" icon="meeting" lang="en" max-retries="" sco-id="1051270965" source-sco-id="-8888" type="meeting" version="1">
<date-created>2012-05-15T14:09:07.453-07:00</date-created>
<date-modified>2013-08-13T16:33:57.600-07:00</date-modified>
<name>Default Meeting Template</name>
<url-path>/defaultmeetingtemplate/</url-path>
</source-sco></source-sco>
</results>
Where I see folder-id="1057190786" and sco-id="1087877981", but when I'm trying to get records for this meeting, using folder-id or sco-id according to documentation with requests
mysite.adobeconnect.com/api/xml?action=list-recordings&folder-id=1057190786
or
mysite.adobeconnect.com/api/xml?action=list-recordings&folder-id=1087877981
I receive:
<?xml version="1.0" encoding="utf-8"?>
<results>
<status code="invalid">
<invalid field="action" type="enum" subcode="no-such-item"/>
</status>
</results>
You should use another API method to get the recordings. They listed in the "scos" container, "url-path" element is what you need.
You should try the sco-contents method...
/api/xml?action=sco-contents&filter-icon=archive&sco-id=1087877981
Get your meeting contents calling sco-contents
You will find your records in those sco with icon="archive"
Don't use "list-recordings" as is not available anymore.
Reference (Sep. 20, 2016)
Provides a list of recordings (FLV and MP4) for a specified folder. The service and hence the API is no longer available.
Docs here.

Annoying Error #2048: Security sandbox violation from localhost

This is my crossdomain.xml that I put in the same folder of my Web.config:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" secure="false" />
<allow-http-request-headers-from domain="*" headers="*" />
</cross-domain-policy>
Although I can load using Security.loadPolicyFile("http://localhost:52090/crossdomain.xml").
When my swf try to comunicate with my local site (asp.net mvc) it says:
Error #2048: Security sandbox violation: http:/ /localhost:52090/Content/Swf/MyApp.swf cannot load data from localhost:52090
How do I solve that?
Since you use as3httpclientlib that based on Socket, rather than URLLoader you should setup socket policy server instead of http one (so your crossdomain.xml isn't used by flash in this case).
To setup flash policy server you can use perl script from this article http://www.adobe.com/devnet/flashplayer/articles/socket_policy_files.html with policy xml suggested by #Bart Friederichs (with to-ports attribute)
Try this one:
<?xml version="1.0"?>
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" />
</cross-domain-policy>
also, if you send it yourself, make sure to send a null-character in the end.

Intuit anywhere API telling me that a field is required when it's already specified

I am trying to create an invoice in QB for windows. Here is the XML:
<?xml version='1.0' encoding='utf-8'?>
<Add xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.intuit.com/sb/cdm/v2" xsi:schemaLocation="http://www.intuit.com/sb/cdm/V2./RestDataFilter.xsd " RequestId="1836474224e142c9ad9b7dd6cb0eaa41" FullResponse="true">
<OfferingId>ipp</OfferingId>
<ExternalRealmId>596059545</ExternalRealmId>
<Invoice>
<Header>
<TxnDate>2013-01-30</TxnDate>
<DiscountAmt>0</DiscountAmt>
<ARAccountName>Sales - Support and Maintenance</ARAccountName>
<DiscountAccountName>Discounts/Refunds</DiscountAccountName>
<DueDate>2013-02-17</DueDate>
<Currency>USD</Currency>
<CustomerId>4</CustomerId>
</Header>
<Line>
<Qty>1</Qty>
<UnitPrice>7.00</UnitPrice>
<Desc>Follow-up Test, Instant for Person138-Org3 Person138-Org3</Desc>
</Line>
</Invoice>
</Add>
Here's the response:
-2001: cvc-complex-type.2.4.a: Invalid content was found starting with element 'ARAccountName'. One of '{"http://www.intuit.com/sb/cdm/v2":DiscountAccountId, "http://www.intuit.com/sb/cdm/v2":DiscountAccountName, "http://www.intuit.com/sb/cdm/v2":DiscountTaxable, "http://www.intuit.com/sb/cdm/v2":TxnId}' is expected.
I don't understand, as I already have DiscountAccountName specified. I also tried to go with something more like the create example (same as above but with ARAccountName and DiscountAccountName removed) and got a similar response. Thanks in advance for your help.
The Intuit XML requests are validated by an XSD, and with XML validated by XSDs the order of the tags you provide matters.
That means that if the documentation (https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0500_QuickBooks_Windows/0600_Object_Reference/Invoice) dictates that ARAccountName comes before DiscountAmt, then you must put ARAccountName before DiscountAmt.
Switch the order of your XML tags to match the order shown in the docs, and you'll be all set.

Resources