Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #84329

Re: python client call Java server by xmlrpc

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'skip:[ 20': 0.04; 'debugging': 0.07; "'no": 0.09; 'extends': 0.09; 'follows.': 0.09; 'indicates': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'runtime': 0.09; 'python': 0.11; '"["': 0.16; 'arguments:': 0.16; 'fail,': 0.16; 'logger': 0.16; 'received:80.91.229.3': 0.16; 'received:dip0.t-ipconnect.de': 0.16; 'received:plane.gmane.org': 0.16; 'received:t-ipconnect.de': 0.16; 'subject:Java': 0.16; 'tcp': 0.16; 'type)': 0.16; 'user-defined': 0.16; 'subject:python': 0.16; '(you': 0.16; 'elements': 0.16; 'extensions': 0.16; 'java,': 0.16; 'implementing': 0.19; 'passing': 0.19; "python's": 0.19; 'written': 0.21; 'header:User- Agent:1': 0.23; 'error': 0.23; 'recognize': 0.24; 'java': 0.24; 'non': 0.24; 'server.': 0.24; '(or': 0.24; 'extension': 0.26; 'recognized': 0.26; 'pass': 0.26; 'header:X-Complaints-To:1': 0.27; 'array': 0.29; 'matching': 0.30; 'libraries': 0.31; 'types.': 0.31; 'writes:': 0.31; 'anyone': 0.31; 'class': 0.32; 'open': 0.33; 'framework': 0.33; 'implemented': 0.33; 'maybe': 0.34; 'problem': 0.35; 'knows': 0.35; 'something': 0.35; 'but': 0.35; 'there': 0.35; 'interact': 0.36; 'object,': 0.36; 'method': 0.36; 'charset:us-ascii': 0.36; 'should': 0.36; 'too': 0.37; 'implement': 0.38; 'server': 0.38; 'skip:[ 10': 0.38; 'to:addr :python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'how': 0.40; 'new': 0.61; 'received:217': 0.63; 'information': 0.63; 'more': 0.64; 'side': 0.67; 'between': 0.67; 'determine': 0.67; 'incoming': 0.72; '(apparently': 0.84; 'exchanged': 0.84; 'before?': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From dieter <dieter@handshake.de>
Subject Re: python client call Java server by xmlrpc
Date Fri, 23 Jan 2015 08:26:08 +0100
References <OF59D4DFCB.6AA85FAB-ON48257DD5.002C7812-48257DD5.002D68BE@knotes.kodak.com>
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Gmane-NNTP-Posting-Host pd9e0b1f3.dip0.t-ipconnect.de
User-Agent Gnus/5.1008 (Gnus v5.10.8) XEmacs/21.4.22 (linux)
Cancel-Lock sha1:XFnMSSqKU4h66V9b4j5YOWnhGfg=
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.18026.1421997984.18130.python-list@python.org> (permalink)
Lines 51
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1421997984 news.xs4all.nl 2865 [2001:888:2000:d::a6]:52066
X-Complaints-To abuse@xs4all.nl
X-Received-Bytes 5438
X-Received-Body-CRC 374996657
Xref csiph.com comp.lang.python:84329

Show key headers only | View raw


fan.ding1@kodak.com writes:

> I have xmlrpc server written in Java, and it has a method like
>
> Fun( vector, vector), the vector is array of user-defined object, which is 
> a class  extends HashMap.
>
> And I call it like:
>
> server = xmlrpclib.ServerProxy("http://myserver")
>
> server.Fun( [ {"0.5":0.1}], [ ] )
>
> It always fails with error
>
> 'No method matching arguments: , [Ljava.lang.Object;, [Ljava.lang.Object; 
> '
> Does anyone use this before? It troubles me some days.

The standard XML-RPC protocol knows only about a very small set
of types. Extensions are required to pass on more type information.

The (slightly confusing) error message (you got) indicates
that the XML-RPC framework on the server side has
not correctly recognized the types of the incoming parameters:
it should recognize the "[]" (as this is a standard type)
(and maybe the open "[" indicates that it has indeed)
but apparently, it got the content elements only as
generalized "Object"s not something specific (extending "HashMap").


The "xmlrpclib" in the Python runtime libary does not support
extensions to pass on additional type information (as far as I know).
This might indicate that you cannot use Python's "xmlrpclib" out
of the box to interact with your Java implemented XML-RPC service.


I would approach the problem as follows.

Implement a Java based XML-RPC client for your service. Should this
fail, then your service implementation has too complex types for
XML-RPC (and you must simplify them).

Should you succeed, you can use a tcp logger (or maybe debugging
tools of the Java libary implementing XML-RPC) to determine
the exact messages exchanged between client and server.
This way, you can learn how your Java libraries pass on non standard
type information. You can then derive a new class from Python's "xmlrpclib"
and implement there this type information passing extension (apparently
used by your Java libaries).

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: python client call Java server by xmlrpc dieter <dieter@handshake.de> - 2015-01-23 08:26 +0100

csiph-web