473,657 Members | 2,378 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I call a python method from the XML-RPC client in Java?

Hi all,
I have created a XML-RPC model (with server and client) written in
Java.
I want to call the methods in another XML-RPC model written in
Python.
I know that in Java, I can use like
"xmlrpc_client. excute("handler _name.method", param)" to call the
methods in my xml-rpc server written in java.
But how can I call the methods in Python? I cannot creat a handler
in my Python XML-RPC server.....

Is there anyone able to help me? I would be very appreciate!
Thanks!

Evelyne

Apr 20 '06 #1
3 3732
ev*********@gma il.com wrote:
Hi all,
I have created a XML-RPC model (with server and client) written in
Java.
I want to call the methods in another XML-RPC model written in
Python.
I know that in Java, I can use like
"xmlrpc_client. excute("handler _name.method", param)" to call the
methods in my xml-rpc server written in java.
But how can I call the methods in Python? I cannot creat a handler
in my Python XML-RPC server.....

Not sure what you mean by 'creating a handler in your Python RPC
server', but if you just want to use the Python XMLRPC library to make a
call to an XMLRPC server, there's an example in the documentation:

http://docs.python.org/lib/xmlrpc-client-example.html

Hope that helps.

Cheers,

Guido
Apr 21 '06 #2
On 20 Apr 2006 11:31:23 -0700, <ev*********@gm ail.com> wrote:
Hi all,
I have created a XML-RPC model (with server and client) written in
Java.
I want to call the methods in another XML-RPC model written in
Python.
I know that in Java, I can use like
"xmlrpc_client. excute("handler _name.method", param)" to call the
methods in my xml-rpc server written in java.
But how can I call the methods in Python? I cannot creat a handler
in my Python XML-RPC server.....


I'm not quite sure I understand the question. You seem to say that you
have both a client and a server in Java, and Python server. That means one
client and 2 servers, right? Are both servers up and running? IOW, do you
have a problem to *call* the Python server from the Java client, or to
*write* the Python server? Can you post some code (maybe not the full one,
but a simpler version showing what you're trying to do and what does not
work)?
--
python -c "print ''.join([chr(154 - ord(c)) for c in
'U(17zX(%,5.zmz 5(17l8(%,5.Z*(9 3-965$l7+-'])"
Apr 21 '06 #3
ev*********@gma il.com wrote:
Hi all, I have created a XML-RPC model (with server and client)
written in Java. I want to call the methods in another XML-RPC model
written in Python. I know that in Java, I can use like
"xmlrpc_client. excute("handler _name.method", param)" to call the
methods in my xml-rpc server written in java. But how can I call the
methods in Python? I cannot creat a handler in my Python XML-RPC
server.....

Is there anyone able to help me? I would be very appreciate!


It's not clear to me what you are trying to do: Do you want to
know how to write certain Java code (as the subject line
suggests), or how to write certain Python code (as "I cannot
create a handle in my Python XML-RPC server" suggests").

I'm going by the subject: As a first step, please try calling
the demo server in SimpleXMLRPCSer ver in Java. To do this,
start the demo servre, point your Java client to
http://localhost:8000/RPC2, and invoke
xmlrpc_client(" add", new args[]{1, 2}) (or some such, I'm not sure
how parameter passing in your library works).

You are right that there typically is no "handler" in Python,
so you just omit the handler_name part of the method string.

Regards,
Martin

Apr 23 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
1336
by: titouille | last post by:
Hi everybody ! first, sorry for my poor english, I'm french mothertongue ;) technologies : -------------- Python 2.3 Twisted Matrix 1.2.0 wxPython 2.5.1
6
1179
by: Colin Young | last post by:
I am creating some code that runs in Excel using VSTO. I am trying to get some xml from a webservice, using the following code: GBWPipeline.PipelineService pipeline = new GBWPipeline.PipelineService(); string xml = pipeline.GetOfferSale(OfferSheetId, CustomerId).GetXml(); I get a "There is an error in XML document. (1, 220)" message. If I execute the same method from WebServiceStudio, it works fine (using the same values for the...
3
4878
by: Nimai Malle | last post by:
I have not had any luck searching for a simple, simple example that calls a method on an object given a SOAP string. Here's what I'm looking for (in pseudocode): string SOAPCall = "bla bla bla"; // SOAP method invocation XML string SOAPResponse; MyObject x = new MyObject(); // and here's where I don't know what to do /* call the method on x as specified in SOAPCall and get the output into SOAPResponse. */
2
1671
by: Frank Millman | last post by:
Hi all I need to pass data between a server program and a client program, both written in Python. My first thought was to use xml. The server builds up an xml string, without using any xml tools. The client uses Sax to parse the string received. Here is an example. The server passes to the client the widgets required to set up a
1
1789
by: ralfbrand50 | last post by:
Hello, I've got the following question: Is it possible to run data that's from an xml file as python code, by this I mean the following. In a xml file there's the following data <code><!]></code>
1
2156
by: Steven Bethard | last post by:
I was trying to get elementsoap_ working with just xml.etree from Python 2.5 (and no standalone elementtree installation). I think I got everything working by changing the imports and copying in the FancyTreeBuilder class (since only TreeBuilder and XMLTreeBuilder are in the xml.etree.ElementTree module). I've attached the diff. Does this seem like the right approach? I'd rather not have to install elementtree alongside the one in the...
0
221
by: Kurt B. Kaiser | last post by:
Patch / Bug Summary ___________________ Patches : 418 open ( +5) / 3522 closed ( +1) / 3940 total ( +6) Bugs : 959 open (+13) / 6405 closed ( +5) / 7364 total (+18) RFE : 250 open ( +2) / 245 closed ( -1) / 495 total ( +1) New / Reopened Patches ______________________
7
8522
by: beginner | last post by:
Hi Everyone, I have encountered a small problems. How to call module functions inside class instance functions? For example, calling func1 in func2 resulted in a compiling error. "my module here" def func1(): print "hello"
1
1252
by: Kadin2048 | last post by:
This is a very noob-ish question so I apologize in advance, but I'm hoping to get some input and advice before I get too over my head. I'm trying to convert some log files from a formfeed- and linefeed-delimited form into XML. I'd been thinking of using Python to do this, but I'll be honest and say that I'm very inexperienced with Python, so before I dive in I wanted to see whether some more experienced minds thought I was choosing the...
2
21024
by: Silgd1 | last post by:
Hi all.... I'm using pyscripter 1.7.2, on a Win XP Prof 2002 - service pack 2 machine to script a website. I have no problem logging into the site, loading and an xml file, and retrieving the confirmation transaction code xml file, but when I go to the reports page and try to grab a report, I run into a problem. The "Get Report" button code within the web page is the following: <input type="button" name="change" value="Get Report"...
0
8399
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8312
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8732
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8504
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8606
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4159
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4318
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2732
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1622
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.