|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.ksoap2.transport.Transport
public abstract class Transport
Abstract class which holds common methods and members that are used by the transport layers. This class encapsulates the serialization and deserialization of the soap messages, leaving the basic communication routines to the subclasses.
Field Summary | |
---|---|
boolean |
debug
Set to true if debugging |
protected Proxy |
proxy
Added to enable web service interactions on the emulator to be debugged with Fiddler2 (Windows) but provides utility for other proxy requirements. |
String |
requestDump
String dump of request for debugging. |
String |
responseDump
String dump of response for debugging |
protected int |
timeout
|
protected String |
url
|
Constructor Summary | |
---|---|
Transport()
|
|
Transport(Proxy proxy,
String url)
Construct the transport object |
|
Transport(String url)
|
|
Transport(String url,
int timeout)
|
Method Summary | |
---|---|
void |
call(String targetNamespace,
SoapEnvelope envelope)
Perform a soap call with a given namespace and the given envelope. |
abstract List |
call(String targetNamespace,
SoapEnvelope envelope,
List headers)
Perform a soap call with a given namespace and the given envelope providing any extra headers that the user requires such as cookies. |
protected byte[] |
createRequestData(SoapEnvelope envelope)
Serializes the request. |
abstract String |
getHost()
Return the name of the host that is specified as the web service target |
abstract String |
getPath()
Return the path to the web service target |
abstract int |
getPort()
Return the port number of the host that is specified as the web service target |
protected void |
parseResponse(SoapEnvelope envelope,
InputStream is)
Sets up the parsing to hand over to the envelope to deserialize. |
void |
reset()
Attempts to reset the connection. |
void |
setUrl(String url)
Set the target url. |
void |
setXmlVersionTag(String tag)
Sets the version tag for the outgoing soap call. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Proxy proxy
protected String url
protected int timeout
public boolean debug
public String requestDump
public String responseDump
Constructor Detail |
---|
public Transport()
public Transport(String url)
public Transport(String url, int timeout)
public Transport(Proxy proxy, String url)
proxy
- Specifies the proxy server to use for
accessing the web service or null
if a direct connection is availableurl
- Specifies the web service urlMethod Detail |
---|
protected void parseResponse(SoapEnvelope envelope, InputStream is) throws org.xmlpull.v1.XmlPullParserException, IOException
org.xmlpull.v1.XmlPullParserException
IOException
protected byte[] createRequestData(SoapEnvelope envelope) throws IOException
IOException
public void setUrl(String url)
url
- the target url.public void setXmlVersionTag(String tag)
tag
- the xml string to set at the top of the soap message.public void reset()
public abstract List call(String targetNamespace, SoapEnvelope envelope, List headers) throws IOException, org.xmlpull.v1.XmlPullParserException
List
of HeaderProperty
instances.
targetNamespace
- the namespace with which to perform the call in.envelope
- the envelope the contains the information for the call.headers
- List
of HeaderProperty
headers to send with the SOAP request.
List
of
HeaderProperty
instances.
IOException
org.xmlpull.v1.XmlPullParserException
public void call(String targetNamespace, SoapEnvelope envelope) throws IOException, org.xmlpull.v1.XmlPullParserException
targetNamespace
- the namespace with which to perform the call in.envelope
- the envelope the contains the information for the call.
IOException
org.xmlpull.v1.XmlPullParserException
public abstract String getHost()
public abstract int getPort()
public abstract String getPath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |