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

American Express Double-Panel Guest Check Presenter/Server Book (10 PACK)
$9.99
American Express Double-Panel Guest Check Presenter/Server Book (10 PACK) picture1PC Avocent DSAVIQ-USB2 DSR USB KVM Switch Server Module Cable New In Bag
$44.96
1PC Avocent DSAVIQ-USB2 DSR USB KVM Switch Server Module Cable New In Bag picture1PC Avocent AVRIQ-USB DSR USB KVM Switch Server Module cable (BLACK)
$29.19
1PC Avocent AVRIQ-USB DSR USB KVM Switch Server Module cable (BLACK) pictureBlack apron Florida Gators waitress server waiter waist apron 3 pockets
$11.0
Black apron Florida Gators waitress server waiter waist apron 3 pockets pictureLantronix MSS4 Four Port Device Server
$149.95
Lantronix MSS4 Four Port Device Server picture






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