ws-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "GRIMSHAW, Richard" <Richard.GRIMS...@london.sema.slb.com>
Subject RE: value has no type ?
Date Mon, 01 Sep 2003 08:13:42 GMT
Jesus,

	The default or implicit type is String, so the XML-RPC library
doesn't bother specifying <String>.

If this is a problem I think you have to change the source.

Richard  

-----Original Message-----
From: Jesus M. Salvo Jr. [mailto:jesus.salvo@migasia.com]
Sent: 29 August 2003 02:34
To: xmlrpc-user@ws.apache.org
Subject: value has no type ?



Using 1.2-b1. ( BTW, the e-mail archives is not valid from the website ).

The following XML was generated by XMLRPC-1.2b1:

POST / HTTP/1.1
Content-Length: 342
Content-Type: text/xml
User-Agent: Java1.3.1
Host: 192.168.0.82
Accept: text/html, image/gif, image/jpeg, *; q=.2, */*; q=.2
Connection: keep-alive

<?xml version="1.0" encoding="ISO-8859-1"?>
<methodCall>
         <methodName>sendsimplemessage</methodName>
         <params>
         <param>
         <value>
         <struct><member>
                 <name>MSISDN</name>
                 <value>
                         <array><data><value>
                         <struct><member>
                                 <name>num</name>
                                 <value>+61444444</value>
                         </member></struct>
                         </value></data></array>
                 </value>
         </member></struct>
         </value>
         </param>
         </params>
</methodCall>


Notice that the part where it says:

         <struct><member>
                 <name>num</name>
                 <value>+61444444</value>
         </member></struct>

... which has a missing type for the value element.
I was expecting it to be:


         <struct><member>
                 <name>num</name>
                 <value><string>+61444444</string></value>
         </member></struct>



Here's the code that generated it:

import java.io.*;
import java.net.*;
import java.util.*;

import org.apache.xmlrpc.*;
import org.apache.xmlrpc.secure.*;

public class XMLRPCTest {

   public XMLRPCTest() {

   }

   public static void main( String args[] ) throws Exception {
      XmlRpcClient client = new SecureXmlRpcClient (
       "http://192.168.0.82" );
      XmlRpc.debug = true;
      Vector    params = new Vector();
      Hashtable hashParams = new Hashtable();

      Vector msisdns = new Vector();
      Hashtable hashNumber = new Hashtable();
      hashNumber.put( "num", "+61444444" );
      msisdns.add( hashNumber );

      hashParams.put( "MSISDN", msisdns );
      params.add( hashParams );


      client.execute( "sendsimplemessage", params );
   }

}






Regards,


-- 
Jesus M. Salvo Jr.
Mobile Internet Group Pty Ltd
(formerly Softgame International Pty Ltd)
M: +61 409 126699
T: +61 2 94604777
F: +61 2 94603677

PGP Public key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0xC0BA5348


Mime
View raw message