BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-21-2005, 01:47 AM   #1 (permalink)
New Member
 
Join Date: Jun 2005
Location: South Africa
Model: 7290
Carrier: Vodacom
Posts: 12
Post Thanks: 0
Thanked 0 Times in 0 Posts
Question ksoap and array inputs

Please Login to Remove!

Hi

I got the ksoap thing to work with BlackBerry. A simple request works:
Code:
m_rpc = new SoapObject(URN, TEST);
m_rpc.addProperty("input","test");
m_envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);
m_envelope.bodyOut = m_rpc;
System.out.println("m_rpc: " + m_rpc.toString());
m_ht = new HttpTransport(URL); 
m_ht.call(URNHASHTEST, m_envelope);
BUT the following request just gives me a NullPointerException (at the last step, m_ht.call):
Code:
m_rpc = new SoapObject(URN, GETCSW);
Vector vec = new Vector();
SoapObject sp = new SoapObject(GETCSW, "");
sp.addProperty("search",strIn);
sp.addProperty("start",new Integer(0));
sp.addProperty("size",new Integer(20));
vec.addElement(sp);
m_rpc.addProperty("input",vec);
m_envelope = new SoapSerializationEnvelope(SoapEnvelope.VER10);
m_envelope.bodyOut = m_rpc;
System.out.println("m_rpc: " + m_rpc.toString());
m_ht = new HttpTransport(URL); 
m_ht.call(URNHASHGETCSW, m_envelope);
The output of the System.out.println, above, looks like this:
Code:
m_rpc: getCSW{input=[{search=A; start=0; size=20; }]; }
The php equivalent looks like this (for our website, which works fine):
Code:
$search = $HTTP_GET_VARS["search"];
$input = array('search'=>$search,'start'=>$start, 'size'=>$size);
$reply = $soapclient->call('getCSW',array('input' => $input)) ;
$searchstr = "&search=".$search;
Please help?
Offline  




Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.