logo       


Kuddi: xmlrpc'ing vectors: msg#00001

Subject: Kuddi: xmlrpc'ing vectors
Hi!

According to some postings in

        http://www.mail-archive.com/rpc-user@xxxxxxxxxxxxxx/maillist.html

exactly the same question must have been posted in this list in sep 2002.

Sorry for this, but unfortunatly the kxmlrpc mailing-list archive is not
available.

Any idea, when the archive is going to work again?

Greetings,
Henrik

> -----Ursprüngliche Nachricht-----
> Von: Henrik Plate (GMX) [mailto:plate@xxxxxxx]
> Gesendet: Donnerstag, 6. März 2003 17:43
> An: kxmlrpc@xxxxxxxxxxx
> Betreff: xmlrpc'ing vectors
>
>
> Hi everybody!
>
> Beside (k)XMLRPC is really lightweight, easy to use/learn and
> efficient I do have some problems transfering vectors from a
> XMLRPC server to a MIDlet.
>
> I've got a servlet (source below, modified Apache class
> org.apache.xmlrpc.XmlRpcProxyServlet) which acts as a XMLRPC
> server. The servlet itself is registered as the default handler
> and got the method getProviders, which simply returns a newly
> constructed Vector. Other methods like getServerInfo, which
> returns a String, succeed.
>
> When I call the servlet with a J2SE client (slightly modified
> Apache example) the resulting object is a Vector. Fine.
>
> When I call the method from a MIDlet, the Wireless Toolkit prints
> the following exception:
>
> org.kxml.io.ParseException: unexpected: StartTag <data> line: -1
> attr: null @-1:-1
>       at org.kxml.parser.AbstractXmlParser.read(+53)
>       at org.kxmlrpc.XmlRpcParser.parseValue(+15)
>       at org.kxmlrpc.XmlRpcParser.parseArray(+23)
>       at org.kxmlrpc.XmlRpcParser.parseValue(+241)
>       at org.kxmlrpc.XmlRpcParser.parseParams(+46)
>       at org.kxmlrpc.XmlRpcParser.parseResponse(+144)
>       at org.kxmlrpc.XmlRpcClient.execute(+200)
>       at midlet.ServerConnection.callMethod(+15)
>       at midlet.XmlRpcTestControl$1.run(+18)
>
> The via HTTP transfered xml response of the servlet is
>
>     <?xml version="1.0" encoding="ISO-8859-1"?>
>     <methodResponse>
>         <params>
>             <param>
>                 <value>
>                     <array>
>                         <data>
>                             <value>String 1</value>
>                             <value>String 2</value>
>                         </data>
>                     </array>
>                 </value>
>             </param>
>         </params>
>     </methodResponse>
>
> Seems to be OK.
>
> Does kXMLRPC miss the implementation of Vector transfers? I can't
> imagine, cause the parser fails at the data-, not the array-tag.
> Is it versioning problem?
>
> Here's my enviroment:
>
>       kXMLRPC 0.6
>       XMLRPC 1.1 from Apache
>       J2SE 1.4.1
>       Tomcat 4.0.1
>
> Relevant part of the servlet source:
>
>     import org.apache.xmlrpc.*;
>
>     public class XmlRpcServlet extends HttpServlet  {
>
>         // The xml-rpc server.
>         final XmlRpcServer server = new XmlRpcServer();
>
>         public void init(ServletConfig config)throws ServletException{
>
>             // Config the xml-rpc server.
>             XmlRpc.setDebug(true);
>             server.addHandler("$default", this);
>         }
>
>         public String getServerInfo() { return "XmlRpcServlet"; }
> //"$Name$"; }
>
>         public Vector getProviders() {
>             final Vector v = new Vector();
>             v.add("String 1");
>             v.add("String 2");
>             return v;
>         }
>
>         public void service(HttpServletRequest req,
> HttpServletResponse res)throws ServletException, IOException{
>             byte[] result = server.execute(req.getInputStream ());
>             res.setContentType("text/xml");
>             res.setContentLength(result.length);
>             OutputStream output = res.getOutputStream();
>             output.write(result);
>             output.flush();
>         }
>     }
>
> Another question: If a XMLRPC call fails, the XmlRpcClient class
> returns the result of the previous call. Is that desireable? Not
> sure of this.
>
> Greetings und thanks in advance,
> Henrik
>
>
>
>
>
>
>


Ruby Jobs
Java Jobs
Jobs in California
more...
what
job title, keywords
where
city, state, zip
jobs by job search
Search:
Java, servers, webhosting, windows, cisco ...
more...
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
encryption.gpg....    ietf.rfc822/199...    freebsd.devel.i...    lang.haskell.li...    mail.squirrelma...    web.zope.plone....    yellowdog.gener...    text.xml.xalan....    recreation.phot...    kde.devel.educa...    hardware.bus.ca...    printing.ghosts...    voip.peering/20...    assembly/2006-0...    org.user-groups...    culture.interne...    network.i2p/200...    boot-loaders.ya...    xfree86.render/...    qnx.openqnx.dev...    jakarta.velocit...    user-groups.pal...   
Home | blog view | USPTO Patent Archive | 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