Hide Forgot
project_key: SOA The readme for the weather example suggests that the reader use SQLSquirrel to access the Teiid VDB - but it does not include details on creating the SQLSquirrel alias to connect to Teiid. See below for the text to add - also had some additional formatting/content changes: This example demonstrates how to use the WS Translator to call web services. A dynamic VDB (defined in weather-vdb.xml) is used to access the National Weather Service's SOAP/REST services at this URL: http://www.nws.noaa.gov/forecasts/xml/ Steps: 1) Copy the following files to the <jboss.home>/server/<server profile>/deploy directory. - weather-vdb.xml - weather-ds.xml 2) Start the JBoss Container 3) Edit JDBCClient.java and specify a username and password for a valid user account. 4) Use the simple client example run script, e.g. $./run.sh localhost 31000 weather "some query" NOTE - depending on your OS/Shell the quoting/escaping required to run the example can be complicated. It would be better to install a Java client, such as SQLSquirrel, to run the example listed queries below. For SQLSquirrel, the steps to follow are: 1) Create a new alias with these properties: * URL in this form: jdbc:teiid:weather@mm://localhost:31000 * Driver: teiid-client.jar (reference the EDS install directory) * Class name: org.teiid.jdbc.TeiidDriver 2) Cut and paste the queries listed below into the SQLSquirrel SQL frame and run them. Example queries: 1. REST access of the default endpoint augmented by a query string. The query string is formed with the querystring function, which ensures proper encoding of the name/value pairs. The invoke procedure has a return parameter, called result that contains the XML value of the result document. This document is then fed into the XMLTABLE function to extract row values. Note that the default invocation binding has been set in the vdb xml to HTTP, which is the proper setting for REST. select t.* from (call weather.invoke(action=>'GET', endpoint=>querystring('', '38.99,-77.02 39.70,-104.80 47.6,-122.30' as listLatLon, 'time-series' as product, '2004-01-01T00:00:00' as "begin", '2013-04-20T00:00:00' as "end", 'maxt' as maxt, 'mint' as mint) )) w, XMLTABLE('/dwml/data/location' passing w.result columns "location-key" string, lattitude string path 'point/@latitude', longitude string path 'point/@longitude') t 2. SOAP11 RPC call providing all of the parameter values for the invoke procedure. With a SOAP invocation, the action is used to convey the SOAPAction header value if needed. Also note the use of the endpoint here with an absolute URL, which will be used instead of the default on the datasource. select xmlserialize(document w.result as string) from (call weather.invoke(action=>'http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl#LatLonListZipCode', endpoint=>'http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php', binding=>'SOAP11', request=>' <ns1:LatLonListZipCode xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:ns1="http://www.weather.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl"> <zipCodeList xsi:type="ns2:zipCodeListType" xmlns:ns2="http://www.weather.gov/forecasts/xml/DWMLgen/schema/DWML.xsd">63303</zipCodeList> </ns1:LatLonListZipCode>')) as w (SEE the DatabaseMetadata on the invoke procedure for a full description of the parameters.)
Link: Added: This issue is related to TEIID-1450
For use with the simpleclient, here's the whole execution string. (Note the username and password are hardcoded in the simpleclient, which may prevent simple use if user/teiid is not a valid user/password.) ./run.sh <server> 31000 weather "select t.* from (call weather.invoke(action=>'GET', endpoint=>querystring('', '38.99,-77.02 39.70,-104.80 47.6,-122.30' as listLatLon, 'time-series' as product, '2004-01-01T00:00:00' as \"begin\", '2013-04-20T00:00:00' as \"end\", 'maxt' as maxt, 'mint' as mint) )) w, XMLTABLE('/dwml/data/location' passing w.result columns \"location-key\" string, lattitude string path 'point/@latitude', longitude string path 'point/@longitude') t"
Thx Paul - that's on Linix, correct?
Yes, Len. That's on linUx. ;-) Windows should be the same, except for the ./run.sh part.
Updated readme with QE recommendations.
Attachment: Added: README.txt
The readme file change has been made and is in the soa build process teiid examples.
Verified fixed in ER8 build.
Created attachment 593032 [details] screen shot of weather VDB execution
Created attachment 593033 [details] jboss 5.1.0-GA log of weather VDB SOAP sample 2 - note that REST sample works. See also previous attachment with screenshot of simleclient execution Thanks ! I'm using TEIID-7.7.0-final installed with spring and JBOSS 5.1.0.GA plus jbossws-cxf-3.4.1. Thanks and regards Rudi NOTE: This is urgent please as I'm prepping for a demo on Thursday 06/21
I'm still getting the parsing error with the SOAP sample even with the above corrections. I seem to get generally the problem with the weather SOAP sample and other samples with SOAP11 binding. Thanks for the help. Rudi
Created attachment 593064 [details] EDS Quckstart - DynamicVDB Webservices Attached is the eds_dynamicvdb_webservices.zip quick start. Unzip into the samples/quickstarts of the SOA install and follow the readme. Note: to run the SOAP11 query, execute: ant runtest -Dprompt=true then select #2 to run that query.