org.ksoap2.transport
Class Transport

java.lang.Object
  extended by org.ksoap2.transport.Transport
Direct Known Subclasses:
HttpTransport, HttpTransportSE

public abstract class Transport
extends java.lang.Object

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
 java.lang.String requestDump
          String dump of request for debugging.
 java.lang.String responseDump
          String dump of response for debugging
 
Constructor Summary
Transport()
           
Transport(java.lang.String url)
           
 
Method Summary
abstract  void call(java.lang.String targetNamespace, SoapEnvelope envelope)
          Perform a soap call with a given namespace and the given envelope.
 void reset()
          Attempts to reset the connection.
 void setUrl(java.lang.String url)
          Set the target url.
 void setXmlVersionTag(java.lang.String tag)
          Sets the version tag for the outgoing soap call.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debug

public boolean debug
Set to true if debugging


requestDump

public java.lang.String requestDump
String dump of request for debugging.


responseDump

public java.lang.String responseDump
String dump of response for debugging

Constructor Detail

Transport

public Transport()

Transport

public Transport(java.lang.String url)
Method Detail

setUrl

public void setUrl(java.lang.String url)
Set the target url.

Parameters:
url - the target url.

setXmlVersionTag

public void setXmlVersionTag(java.lang.String tag)
Sets the version tag for the outgoing soap call. Example

Parameters:
tag - the xml string to set at the top of the soap message.

reset

public void reset()
Attempts to reset the connection.


call

public abstract void call(java.lang.String targetNamespace,
                          SoapEnvelope envelope)
                   throws java.io.IOException,
                          org.xmlpull.v1.XmlPullParserException
Perform a soap call with a given namespace and the given envelope.

Parameters:
targetNamespace - the namespace with which to perform the call in.
envelope - the envelope the contains the information for the call.
Throws:
java.io.IOException
org.xmlpull.v1.XmlPullParserException