[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to use Publish and get method of xmlblaster to get Database querry results using xml-rpc



sachin wrote:
> 
> hello all,
> I am using xmlblaster to fire big Database querrys  asynchrously  get
> results back ...
> server_url = http://sachintekale01:8080
> server = xmlrpclib.Server(server_url)
>  sessionId = server.authenticate.login( "Test1", "", "<qos></qos>", "")
>  print "\nLogin success with on ", server_url, " sessionId=", sessionId
>  #print "\n*  Trying to publish a essages ..."
>  sender = "Test1"
>  xmlkey = "<key oid='__sys__jdbc' queryType='EXACT'><database:adapter
> xmlns:database='http://www.xmlBlaster.org/jdbc'>
> <database:url>jdbc:odbc:javatrial</database:url>
> <database:username>postgres</database:username>
> <database:password>jshdjh</database:password> <database:interaction
> type='query'/> <database:command><![CDATA[select * from
> person]]></database:command> <database:connectionlifespan ttl='1'/>
> <database:rowlimit max='50'/> <database:confirmation
> confirm='true'/></database:adapter></key>"
>  content=''
>  server.xmlBlaster.publish( sessionId, xmlkey, content, "<qos></qos>")
> xmlrpcserver.xmlblaster.publish
>  i can  use to publish the querry using xmldbadapter?
> But i am not able to get the results ..
> xmlblaster.get()?
> Is there any way to  avoid  Callbacks use Publish and get method for the
> JDBC?

Sorry the late response.

Using get() to get the SQL results (to avoid a Callback server)
is a use case supported with xmlBlaster.

get() requests on key oid="__sys__jdbc" are handled by xmlBlaster
 (see RequestBroker.java) directly
and the result set is delivered as the return value of the get()
request.

As an example see

  xmlBlaster/demo/javaclients/jdbc/XmlDBClientSync.java

regards,

Marcel
 

-- 
Marcel Ruff
mailto:ruff at swand.lake.de
http://www.lake.de/home/lake/swand/
http://www.xmlBlaster.org