|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ksoap2.serialization.AttributeContainer
org.ksoap2.serialization.SoapObject
public class SoapObject
A simple dynamic object that can be used to build soap calls without implementing KvmSerializable
Essentially, this is what goes inside the body of a soap envelope - it is the direct subelement of the body and all further subelements Instead of this this class, custom classes can be used if they implement the KvmSerializable interface.
Field Summary | |
---|---|
protected String |
name
The name of this soap object. |
protected String |
namespace
The namespace of this soap object. |
protected Vector |
properties
The Vector of properties. |
Constructor Summary | |
---|---|
SoapObject(String namespace,
String name)
Creates a new SoapObject instance. |
Method Summary | |
---|---|
SoapObject |
addProperty(PropertyInfo propertyInfo)
Adds a property (parameter) to the object. |
SoapObject |
addProperty(PropertyInfo propertyInfo,
Object value)
Deprecated. property info now contains the value |
SoapObject |
addProperty(String name,
Object value)
Adds a property (parameter) to the object. |
boolean |
equals(Object obj)
|
String |
getName()
|
String |
getNamespace()
|
Object |
getProperty(int index)
Get the property at the given index |
Object |
getProperty(String name)
Get the property with the given name |
int |
getPropertyCount()
Returns the number of properties |
void |
getPropertyInfo(int index,
Hashtable properties,
PropertyInfo propertyInfo)
Deprecated. |
void |
getPropertyInfo(int index,
PropertyInfo propertyInfo)
Places PropertyInfo of desired property into a designated PropertyInfo object |
boolean |
hasProperty(String name)
Knows whether the given property exists |
SoapObject |
newInstance()
Creates a new SoapObject based on this, allows usage of SoapObjects as templates. |
Object |
safeGetProperty(String name)
Get a property without chance of throwing an exception |
Object |
safeGetProperty(String name,
Object defaultThing)
Get a property without chance of throwing an exception. |
void |
setProperty(int index,
Object value)
Sets a specified property to a certain value. |
String |
toString()
Generate a String describing this object. |
Methods inherited from class org.ksoap2.serialization.AttributeContainer |
---|
addAttribute, addAttribute, attributesAreEqual, getAttribute, getAttribute, getAttributeCount, getAttributeInfo, hasAttribute, safeGetAttribute |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected String namespace
protected String name
protected Vector properties
Constructor Detail |
---|
public SoapObject(String namespace, String name)
SoapObject
instance.
namespace
- the namespace for the soap objectname
- the name of the soap objectMethod Detail |
---|
public boolean equals(Object obj)
equals
in class Object
public String getName()
public String getNamespace()
public Object getProperty(int index)
KvmSerializable
getProperty
in interface KvmSerializable
public Object getProperty(String name)
RuntimeException
- if the property does not existpublic boolean hasProperty(String name)
public Object safeGetProperty(String name)
NullSoapObject
is returnedpublic Object safeGetProperty(String name, Object defaultThing)
defaultThing
- the object to return if the property is not found
public int getPropertyCount()
getPropertyCount
in interface KvmSerializable
public void getPropertyInfo(int index, Hashtable properties, PropertyInfo propertyInfo)
getPropertyInfo
in interface KvmSerializable
index
- index of desired propertypropertyInfo
- designated retainer of desired propertyproperties
- information about the (de)serializer. Not frequently used.public void getPropertyInfo(int index, PropertyInfo propertyInfo)
index
- index of desired propertypropertyInfo
- designated retainer of desired propertypublic SoapObject newInstance()
public void setProperty(int index, Object value)
setProperty
in interface KvmSerializable
index
- the index of the specified propertyvalue
- the new value of the propertypublic SoapObject addProperty(String name, Object value)
name
- The name of the propertyvalue
- the value of the propertypublic SoapObject addProperty(PropertyInfo propertyInfo, Object value)
propertyInfo
- designated retainer of desired propertyvalue
- the value of the propertypublic SoapObject addProperty(PropertyInfo propertyInfo)
propertyInfo
- designated retainer of desired propertypublic String toString()
String
describing this object.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |