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  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Midtronics CTU-6000 Celltron Ultra Battery Analyzer CTU6000 Mainframe ONLY
$999.95
Midtronics CTU-6000 Celltron Ultra Battery Analyzer CTU6000 Mainframe ONLY pictureAgilent Mainframe 8163A
$1200.0
Agilent Mainframe 8163A pictureLECROY 1454 HIGH VOLTAGE MAINFRAME
$1500.0
LECROY 1454 HIGH VOLTAGE MAINFRAME picture PHILIPS, AGILENT TELEMETRY MAINFRAME M2604A WITH 8 RECEIVERS M2603A
$99.99
 PHILIPS, AGILENT TELEMETRY MAINFRAME M2604A WITH 8 RECEIVERS M2603A pictureHP Agilent 8350B Digital Interface Frequency Sweep Oscillator Mainframe PARTS #3
$49.99
HP Agilent 8350B Digital Interface Frequency Sweep Oscillator Mainframe PARTS #3 picture






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