BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 06-03-2009, 04:27 PM   #1
AbATaRCL
New Member
 
Join Date: Jun 2009
Model: 8820
PIN: N/A
Carrier: 987654321
Posts: 8
Lightbulb WebService with Ksoap2 help

Please Login to Remove!

PEOPLE.
this is connection is a webservice
I have a doubt in the point [ soapObject.addProperty("arg0", symbolField); ]
what argument put in "arg0"

WHAT'S WRONG WITH CODE?
would you mind let me hand please??
I already changed (h t t p: / / NAMESPACE/","getMail") for my server and also the HttpTransport

helpme please!!!
pd: sorry my english xD
try
{
SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);


SoapObject soapObject = new SoapObject("h t t p: / /NAMESPACE/","getMail");


soapObject.addProperty("arg0", symbolField);


envelope.setOutputSoapObject(soapObject);


HttpTransport transport = new HttpTransport("h t t p: / /IP:PORT/ws_blackberry/UsuarioWebFacade");

transport.call("getMail", envelope);

SoapObject response = (SoapObject) envelope.getResponse();
System.out.println(envelope.getResponse().toString ());

}catch (Exception e){
System.out.println("Error: "+e.getMessage());
}
Offline  
Old 06-04-2009, 04:33 PM   #2
AbATaRCL
New Member
 
Join Date: Jun 2009
Model: 8820
PIN: N/A
Carrier: 987654321
Posts: 8
Default

any reply please!
Offline  
Old 06-08-2009, 09:28 AM   #3
athma
New Member
 
Join Date: Apr 2009
Model: 8300
PIN: N/A
Carrier: AT&T
Posts: 5
Default

Quote:
Originally Posted by AbATaRCL View Post
PEOPLE.
this is connection is a webservice
I have a doubt in the point [ soapObject.addProperty("arg0", symbolField); ]
what argument put in "arg0"
Hi abat..

I'm also a beginner in BB and using KSoap. But I figured out the very basics of making a webservice call using ksoap2. Still struggling with complex data types. If you dig this forum a little bit you can find some good postings regarding hot to setup ksoap2 and how to use/make simple webservice calls and stuff.

But as far as I learned, when it comes to 'complex data types' be it a parameter or return value, you won't find any help in these forums. Trust me I mean it. The only thing you find is that some beginner (like me!) throwing suggestions like "may be you could read documentations, may be you could do this...". Half backed bunch of ...

Anyways, to answer to your question the "arg0" in the 'addProperty' is that the parameter name of the argument you want to use.

This you can find in the .wsdl. For example say you have a webservice method which concatenates (merges) given 2 names (strings) like this:

- <element name="concatenateElement">
- <complexType>
- <sequence>
<element name="first" type="string" nillable="true" />
<element name="last" type="string" nillable="true" />
</sequence>
</complexType>
</element>

the 'addProperty' for this would be like:

addProperty("first", "James");
addProperty("last", "Bond");

I hope this clears some things for you.

Athma.
Offline  
Old 06-08-2009, 04:37 PM   #4
AbATaRCL
New Member
 
Join Date: Jun 2009
Model: 8820
PIN: N/A
Carrier: 987654321
Posts: 8
Default

thanks athma!

XML don't had problems!

anyway thanks for reply!


I already fixed code :D, however the code never was bug
Offline  
Closed Thread



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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


Ballast Box 3 Pt Hitch 800LBS Counterweight for Cat 1 Tractor Steel Heavy Duty picture

Ballast Box 3 Pt Hitch 800LBS Counterweight for Cat 1 Tractor Steel Heavy Duty

$189.99



Accupro 703-00004-001  1 or 2 lamp T12 Rapid-Start Electronic Ballast  picture

Accupro 703-00004-001 1 or 2 lamp T12 Rapid-Start Electronic Ballast

$8.50



4 Count Case GE ProLine 2 Bulb 120V T12 Electronic Fluorescent Light Ballasts picture

4 Count Case GE ProLine 2 Bulb 120V T12 Electronic Fluorescent Light Ballasts

$49.99



Philips ADVANCE AmbiStar RELB-2S40-N Replacement Ballast 40-Watt 2-Lamp T12 picture

Philips ADVANCE AmbiStar RELB-2S40-N Replacement Ballast 40-Watt 2-Lamp T12

$18.79



Ballast Box 3 Point Category 1 Tractor Loader 2

Ballast Box 3 Point Category 1 Tractor Loader 2" Hitches Quick Tach Attachment

$199.99



Phillips Advance ICF-2S26-H1-LD Electronic Compact Fluorescent Ballast 12 Pack picture

Phillips Advance ICF-2S26-H1-LD Electronic Compact Fluorescent Ballast 12 Pack

$250.00







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