org.apache.axis.client

Class Stub

public abstract class Stub extends Object implements Stub

This class is the base for all generated stubs.
Field Summary
protected URLcachedEndpoint
protected StringcachedPassword
protected QNamecachedPortName
protected PropertiescachedProperties
protected IntegercachedTimeout
protected StringcachedUsername
protected booleanmaintainSession
protected booleanmaintainSessionSet
protected Serviceservice
protected Call_call
Method Summary
voidaddAttachment(Object handler)
Add an attachment
voidclearAttachments()
This method clears the request attachments.
voidclearHeaders()
This method clears both requestHeaders and responseHeaders hashtables.
voidextractAttachments(Call call)
Extract attachments
protected booleanfirstCall()
Is this the first time the type mappings are being registered?
Object[]getAttachments()
Get the array of attachments The attachment array is cleared after this, so it is a destructive operation.
SOAPHeaderElementgetHeader(String namespace, String partName)
Get the header element
SOAPHeaderElement[]getHeaders()
Get the array of header elements
StringgetPassword()
Get the password
QNamegetPortName()
Get the port name.
SOAPHeaderElementgetResponseHeader(String namespace, String partName)
Get a response header element
SOAPHeaderElement[]getResponseHeaders()
Get the array of response header elements
protected voidgetResponseHeaders(Call call)
Helper method for updating headers from the response.
intgetTimeout()
Get the timeout value in milliseconds.
StringgetUsername()
Get the user name
ObjectremoveProperty(String name)
Remove a property from this instance of the Stub NOTE: This is NOT part of JAX-RPC and is an Axis extension.
protected voidsetAttachments(Call call)
copy the attachments from the stub to the call object.
voidsetHeader(String namespace, String partName, Object headerValue)
Set the header
voidsetHeader(SOAPHeaderElement header)
Set the header
voidsetMaintainSession(boolean session)
If set to true, session is maintained; if false, it is not.
voidsetPassword(String password)
Set the password.
voidsetPortName(QName portName)
Set the port QName.
voidsetPortName(String portName)
Set the port name.
protected voidsetRequestHeaders(Call call)
voidsetTimeout(int timeout)
Set the timeout in milliseconds.
voidsetUsername(String username)
Set the username.
Call_createCall()
Creates a call from the service.
Call_getCall()
Returns last Call object associated with this stub.
Object_getProperty(String name)
Gets the value of a named property.
Iterator_getPropertyNames()
Return the names of configurable properties for this stub class.
Service_getService()
Provide access to the service object.
void_setProperty(String name, Object value)
Sets the value for a named property.

Field Detail

cachedEndpoint

protected URL cachedEndpoint

cachedPassword

protected String cachedPassword

cachedPortName

protected QName cachedPortName

cachedProperties

protected Properties cachedProperties

cachedTimeout

protected Integer cachedTimeout

cachedUsername

protected String cachedUsername

maintainSession

protected boolean maintainSession

maintainSessionSet

protected boolean maintainSessionSet

service

protected Service service

_call

protected Call _call

Method Detail

addAttachment

public void addAttachment(Object handler)
Add an attachment

Parameters: handler

clearAttachments

public void clearAttachments()
This method clears the request attachments.

clearHeaders

public void clearHeaders()
This method clears both requestHeaders and responseHeaders hashtables.

extractAttachments

public void extractAttachments(Call call)
Extract attachments

Parameters: call

firstCall

protected boolean firstCall()
Is this the first time the type mappings are being registered?

getAttachments

public Object[] getAttachments()
Get the array of attachments The attachment array is cleared after this, so it is a destructive operation.

Returns: the array of attachments that was in the message, or an empty array if there were none

getHeader

public SOAPHeaderElement getHeader(String namespace, String partName)
Get the header element

getHeaders

public SOAPHeaderElement[] getHeaders()
Get the array of header elements

getPassword

public String getPassword()
Get the password

getPortName

public QName getPortName()
Get the port name.

getResponseHeader

public SOAPHeaderElement getResponseHeader(String namespace, String partName)
Get a response header element

getResponseHeaders

public SOAPHeaderElement[] getResponseHeaders()
Get the array of response header elements

getResponseHeaders

protected void getResponseHeaders(Call call)

Deprecated: This method has been changed to a no-op but remains in the code to keep compatibility with pre-1.1 generated stubs.

Helper method for updating headers from the response. Deprecated, since response headers should not be automatically reflected back into the stub list.

getTimeout

public int getTimeout()
Get the timeout value in milliseconds. 0 means no timeout.

getUsername

public String getUsername()
Get the user name

removeProperty

public Object removeProperty(String name)
Remove a property from this instance of the Stub NOTE: This is NOT part of JAX-RPC and is an Axis extension.

Parameters: name the name of the property to remove

Returns: the value to which the key had been mapped, or null if the key did not have a mapping.

setAttachments

protected void setAttachments(Call call)
copy the attachments from the stub to the call object. After doing so, the local set of attachments are cleared.

Parameters: call call object to configure

Throws: AxisFault

setHeader

public void setHeader(String namespace, String partName, Object headerValue)
Set the header

Parameters: namespace partName that uniquely identify a header object. headerValue Object that is sent in the request as a SOAPHeader

setHeader

public void setHeader(SOAPHeaderElement header)
Set the header

setMaintainSession

public void setMaintainSession(boolean session)
If set to true, session is maintained; if false, it is not.

setPassword

public void setPassword(String password)
Set the password.

setPortName

public void setPortName(QName portName)
Set the port QName.

setPortName

public void setPortName(String portName)
Set the port name.

setRequestHeaders

protected void setRequestHeaders(Call call)

setTimeout

public void setTimeout(int timeout)
Set the timeout in milliseconds.

setUsername

public void setUsername(String username)
Set the username.

_createCall

public Call _createCall()
Creates a call from the service.

Returns:

_getCall

public Call _getCall()
Returns last Call object associated with this stub.

_getProperty

public Object _getProperty(String name)
Gets the value of a named property.

Parameters: name

Returns: the value of a named property.

_getPropertyNames

public Iterator _getPropertyNames()
Return the names of configurable properties for this stub class.

_getService

public Service _getService()
Provide access to the service object. Not part of JAX-RPC

Returns: the service object for this stub

_setProperty

public void _setProperty(String name, Object value)
Sets the value for a named property. JAX-RPC 1.0 specification specifies a standard set of properties that may be passed to the Stub._setProperty method. These properties include:

Parameters: name - Name of the property value - Value of the property

Copyright B) 2005 Apache Web Services Project. All Rights Reserved.