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

Re: [xmlblaster] Assistance required with xmlrpc communication



Colin Brown wrote:
Hi
I am not able to get Ptp communication working between xmlrpc client/server.
Hi Colin,

your xmlBlaster server logs don't tell me a lot, when pinging the callback server they say:


java.io.IOException: Server returned HTTP response code: 500 for URL: http://cbrown:1381/RPC2

(Internal Error 500 The server encountered an unexpected condition which prevented it from fulfilling the request.)


The Python http (xmlrpc) callback server sends this. Can you try to do a telnet on this port to see how your Python callback server reacts?


Try to start xmlBlaster like:

  java org.xmlBlaster.Main -plugin/xmlrpc/debug true -trace[xmlrpc] true

and a java client like:

  java javaclients.HelloWorldSubscribe -protocol XMLRPC  -plugin/xmlrpc/debug true -trace[xmlrpc] true


You have now a functional detailed logging of the xmlrpc protocol Looking at the ping calls and comparing them to your python variant should clarify the problem,

regards

Marcel


Server:
====================
import time
import pyBlaster as p
c = p.XmlBlasterClient()
cb = p.XmlBlasterCallbackClient()
cb.startCallbackServer()
print 'CallbackUrl is',cb.callback_url
cb.connect('http://dserv1:8080')
cb.login(username='cbs',callback_url=cb.callback_url)
while 1:
time.sleep(60) ====================
Client:


import time
import pyBlaster as p
ptpqos = '''<qos>
<destination queryType='EXACT'>
%s
</destination>
<source>
%s
</source>
</qos>'''
cb = p.XmlBlasterCallbackClient()
cb.startCallbackServer()
print 'CallbackUrl is',cb.callback_url
cb.connect('http://dserv1:8080')
cb.login(username='cbc',callback_url=cb.callback_url)
cb.publish("<key oid='task'/>",'the quick brown fox',\
ptpqos % ('cbs','cbc'))
time.sleep(30) cb.logout()
===================
Xmlblaster logfile output attached.
XMLRPC conversation Proxy logging attached.
Notes:
I am using Python2.2 xmlrpclib.py as I read in mail listings that 2.3 has a problem - made no difference.
I am not subscribing as Marcel noted in a mail reply that it is not required for Ptp transmissions.
Thanks for any assistance.
Colin Brown
[Server output]========================
Thread-1 starts
==> ::STARTCALLBACKSERVER:: <==
Success with callback_url= http://cbrown:1404/RPC2
CallbackUrl is http://cbrown:1404/RPC2
Thread-1 ends
==> ::CONNECT to XmlBlaster:: <==
Sucessful Server connect on http://dserv1:8080
==> ::LOGIN:: <==
Success with sessionId= sessionId:10.10.194.2-null-1093325765565-16867290
90-5
[Client output]==========================
Thread-1 starts
==> ::STARTCALLBACKSERVER:: <==
Success with callback_url= http://cbrown:1406/RPC2
CallbackUrl is http://cbrown:1406/RPC2
Thread-1 ends
==> ::CONNECT to XmlBlaster:: <==
Sucessful Server connect on http://dserv1:8080
==> ::LOGIN:: <==
Success with sessionId= sessionId:10.10.194.2-null-1093325836812-14899965
19-6
==> ::PUBLISH:: <==
==> ::LOGOUT:: <==
========================================
The setup is:
Linux Server: (info from xmlBlaster dump)
versionInfo=version=0.903,os.name=Linux,os.version=2.4.21-15.0.3.ELsmp,java.vm.vendor=Sun Microsystems Inc.,java.vm.version=1.3.1_02-b02,os.arch=i386,build.timestamp=05/12/2004 11:58 PM,build.java.vendor=IBM Corporation,build.java.version=1.3.1
running (unconfigured xmlBlaster - no security settings):
/home/oracle/jre/1.3.1/bin/java -jar lib/xmlBlaster.jar -logConsole false -useKeyboard false >> xmlblaster_log.txt 2>&1 &
Windows 2000 client, Python 2.3


--
http://www.xmlBlaster.org