Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Ogojogi string output: msg#00038

cms.opengroupware.xmlrpc.devel

Subject: Re: Ogojogi string output

Christoph Guse wrote:

I managed to create my own UtfWorkaroundApacheXmlRpcCaller class wich extends ApacheXmlRpcCaller. But I don't have a clue where to start with my Utf82U class. I'm more or less a Java rookie.
Is it possible to use the Utf82U before the XML answer is parsed to an object, or do I have to go through the result object? How can I rush through the result object an change every item maked as string?

You'll have to go through the result object (the Apache XmlRpc Client library handles the socket). Generally: there are only a few types of XmlRpc types: of interest are
- String: if that is returned, simply use your code to create a correct String object and return that
- collections: ie. lists or structs; with them, you simply have to look at all of the items; if you find a
String, then simply replace it with a processed String; if you find another collection object just recurse
into it, ie. look at each of it's elements and process them; for a list, you'll get a java.util.Vector object (just look at each element);
for a struct, you'll get a Hashtable object (there's a method called keys(), which returns each key; with
this you get it's assignet value);

The methods in ApacheXmlRpcCaller return the object from the XmlRpc call, so your methods could look something like this:

*public* Object invoke(String method_name, String string)
*throws* ConnectionException, OgoException
return processResult(super.invoke(method_name, string));

}
The "processResult" method would be your method that would take an argument (an Object) and do what I
described above (the invoke method is overloaded, so you'll have to override all of them).

murphee

--
Werner Schuster (murphee)
Student of SoftwareEngineering and KnowledgeManagement
Maintainer of the OGO-JOGI Project @ http://ogo-jogi.sourceforge.net/
Blog @ http://jroller.com/page/murphee

--
OpenGroupware.org XML-RPC
xmlrpc@xxxxxxxxxxxxxxxxx
http://mail.opengroupware.org/mailman/listinfo/xmlrpc



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
db.postgresql.b...    video.ffmpeg.us...    gis.qgis.devel/...    web.rdf.redland...    file-systems.oc...    recreation.rail...    systems.archos....    python.c++/2003...    lang.c--/2005-0...    multimedia.gpho...    network.unison....    editors.jedit.u...    hardware.pciids...    cms.tiki.cvs/20...    bug-tracking.ma...    java.hadoop.hba...    ietf.rsvp/2002-...    xfree86.devel/2...    qnx.openqnx.dev...    apache.labs.dev...    tex.pdftex/2008...    os.solaris.open...    user-groups.lin...    kde.koffice/200...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation