I am trying to retrieve some xml from a URL but seem to be having an issue.
SparqlMotion outline: 1 - sml:ImportXMLFromURL from http://api.evri.com/v1/entities/find?name=Genuine_Parts_Company - this works fine, returning the appropriate xml. 2 - sml:BindByXpath - I use this to get the ID of the entity returned in xml(//entity/@href) - this works fine 3 - smf:buildString - I build another URL base on this extracted string, from step 2 - http://api.evri.com/v1/sentiment/about?sentimentSource={?evriID}&sentimentType=positive&sort=date - this works fine 4 - sml:ImportXMLFromURL - This is where I have an issue. This is what I have set in the module: sm:outputVariable: xmlSent sml:url {?evriSentUri} The evriSentUri is the text sting that I constructed in step 3 However, when I debug this module I get and error message from Evri shown below in the console output, (in the xmlSent variable output). If you copy and paste the evriSenUri shown below, you will see that it definitely works and returns what it should (see the proper evri xmlSent below). ***********Consle output***************** Result variables of Import XMLFrom URL_2: - evriID (xsd:string) = /organization/genuine-parts-company-0x4eb8d - evriSentUri = http://api.evri.com/v1/sentiment/about?sentimentSource=/organization/genuine-parts-company-0x4eb8d&sentimentType=positive&sort=date - xml = <evriThing requestedUrl="/v1/entities/find" status="OK" version="1"> <messages> <message code="0">More information on the Evri API can be found at: http://www.evri.com/developer/index.html. By using or accessing the Evri API, you are agreeing to be bound by our Terms of Use which are specified at: http://www.evri.com/developer/tos.html</message> </messages> <entities> <entity href="/organization/genuine-parts-company-0x4eb8d" id="322445" score="1.0"> <facets> <facet count="0"> <name>Company</name> </facet> </facets> <name>Genuine Parts Company</name> <properties> <property> <name>wikipedia_paragraph</name> <value>Genuine Parts Company (NYSE: GPC) is a Fortune 1000 company that was founded in 1928. Based in Georgia with large operations in Alabama, the company employs 31,700 people. It specializes in replacement parts for cars and other industrial machines and is the largest member of the National Automotive Parts Association(NAPA). Approximately 5,800 NAPA Auto Part stores, around 1,000 of which are company owned, are serviced by the auto parts segment of the company, which accounted for 51% of their profits in 2005.</value> </property> </properties> <type>ORGANIZATION</type> </entity> </entities> </evriThing> - xmlSent = <evriThing requestedUrl="/v1/sentiment/about" status="ERROR" version="1"> <messages> <message code="0">More information on the Evri API can be found at: http://www.evri.com/developer/index.html. By using or accessing the Evri API, you are agreeing to be bound by our Terms of Use which are specified at: http://www.evri.com/developer/tos.html</message> <message code="412">The sentiment source, the subject, or both, must be provided</message> </messages> </evriThing> **********Proper evri xmlSent should look like this************** <?xml version="1.0" encoding="UTF-8"?> <evriThing status="OK" version="1" requestedUrl="/v1/sentiment/about"> <messages> <message code="0">More information on the Evri API can be found at: http://www.evri.com/developer/index.html. By using or accessing the Evri API, you are agreeing to be bound by our Terms of Use which are specified at: http://www.evri.com/developer/tos.html</message> </messages><mediaResult> <sentimentList currentResult="0" totalResults="0"> <sentiment type="positive"> <article> <author>Seeking Alpha</author> <link href="/log/click?url=http%3A%2F%2Fseekingalpha.com %2Farticle%2F140787-gm-bankruptcy-time-for-new-era-auto-opportunities %3Fsource%3Dfeed" type="UNKNOWN" hostName="seekingalpha.com" path="/ article/140787-gm-bankruptcy-time-for-new-era-auto-opportunities"/> <published>2 Jun 2009 07:05:17 GMT</published> <title>GM Bankruptcy: Time for New-Era Auto Opportunities</ title> <content>In auto parts, that's the kind of stature enjoyed by GPC....</content> </article> </sentiment> </sentimentList> </mediaResult> </evriThing> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/topbraid-composer-users?hl=en -~----------~----~----~----~------~----~------~--~---
