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

(1PCS) BR93L86-W IC EEPROM 16KBIT 2MHZ 8DIP 93L86 BR93L86
$1.98
(1PCS) BR93L86-W IC EEPROM 16KBIT 2MHZ 8DIP 93L86 BR93L86 picture(5PCS) BR93L76-W IC EEPROM 8KBIT 2MHZ 8DIP 93L76 BR93L76
$9.81
(5PCS) BR93L76-W IC EEPROM 8KBIT 2MHZ 8DIP 93L76 BR93L76 picture(5PCS) BR24L02-W IC EEPROM 2KBIT 400KHZ 8DIP 24L02 BR24L02
$9.2
(5PCS) BR24L02-W IC EEPROM 2KBIT 400KHZ 8DIP 24L02 BR24L02 picture(1PCS) BR24S128FJ-WE2 IC EEPROM 128KBIT 400KHZ 8SOP 24S128 BR24S128
$1.56
(1PCS) BR24S128FJ-WE2 IC EEPROM 128KBIT 400KHZ 8SOP 24S128 BR24S128 picture(1PCS) BR24S128FVT-WE2 IC EEPROM 128KBIT 400KHZ 8TSSOP 24S128 BR24S128
$1.56
(1PCS) BR24S128FVT-WE2 IC EEPROM 128KBIT 400KHZ 8TSSOP 24S128 BR24S128 picture






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