Methods Summary |
---|
public Call | _createCall()Creates a call from the service.
_call = (Call) service.createCall();
// TODO: There is a lot of code in the generated stubs that
// can be moved here.
return _call;
|
public Call | _getCall()Returns last Call object associated with this stub.
return _call;
|
public java.lang.Object | _getProperty(java.lang.String name)Gets the value of a named property.
if (name == null) {
throw new JAXRPCException(
Messages.getMessage("badProp05", name));
}
else {
if (name.equals(Call.USERNAME_PROPERTY)) {
return cachedUsername;
}
else if (name.equals(Call.PASSWORD_PROPERTY)) {
return cachedPassword;
}
else if (name.equals(Stub.ENDPOINT_ADDRESS_PROPERTY)) {
return cachedEndpoint.toString();
}
else if (name.equals(Call.SESSION_MAINTAIN_PROPERTY)) {
return maintainSessionSet ? (maintainSession ? Boolean.TRUE : Boolean.FALSE) : null;
}
else if (name.startsWith("java.") || name.startsWith("javax.")) {
throw new JAXRPCException(
Messages.getMessage("badProp05", name));
}
else {
return cachedProperties.get(name);
}
}
|
public java.util.Iterator | _getPropertyNames()Return the names of configurable properties for this stub class.
return cachedProperties.keySet().iterator();
|
public javax.xml.rpc.Service | _getService()Provide access to the service object. Not part of JAX-RPC
return service;
|
public void | _setProperty(java.lang.String name, java.lang.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:
- javax.xml.rpc.security.auth.username: Username for the HTTP Basic Authentication
- javax.xml.rpc.security.auth.password: Password for the HTTP Basic Authentication
- javax.xml.rpc.service.endpoint.address: Target service endpoint address.
- [TBD: Additional properties]
if (name == null || value == null) {
throw new JAXRPCException(
Messages.getMessage(name == null ?
"badProp03" : "badProp04"));
}
else if (name.equals(Call.USERNAME_PROPERTY)) {
if (!(value instanceof String)) {
throw new JAXRPCException(
Messages.getMessage("badProp00", new String[] {
name, "java.lang.String", value.getClass().getName()}));
}
cachedUsername = (String) value;
}
else if (name.equals(Call.PASSWORD_PROPERTY)) {
if (!(value instanceof String)) {
throw new JAXRPCException(
Messages.getMessage("badProp00", new String[] {
name, "java.lang.String", value.getClass().getName()}));
}
cachedPassword = (String) value;
}
else if (name.equals(Stub.ENDPOINT_ADDRESS_PROPERTY)) {
if (!(value instanceof String)) {
throw new JAXRPCException(
Messages.getMessage("badProp00", new String[] {
name, "java.lang.String", value.getClass().getName()}));
}
try {
cachedEndpoint = new URL ((String) value);
}
catch (MalformedURLException mue) {
throw new JAXRPCException(mue.getMessage());
}
}
else if (name.equals(Call.SESSION_MAINTAIN_PROPERTY)) {
if (!(value instanceof Boolean)) {
throw new JAXRPCException(
Messages.getMessage("badProp00", new String[]
{name,
"java.lang.Boolean",
value.getClass().getName()}));
}
maintainSessionSet = true;
maintainSession = ((Boolean) value).booleanValue();
}
else if (name.startsWith("java.") || name.startsWith("javax.")) {
throw new JAXRPCException(
Messages.getMessage("badProp05", name));
}
else {
cachedProperties.put(name, value);
}
|
public void | addAttachment(java.lang.Object handler)Add an attachment
attachments.add(handler);
|
public void | clearAttachments()This method clears the request attachments.
attachments.clear();
|
public void | clearHeaders()This method clears both requestHeaders and responseHeaders hashtables.
headers.clear();
|
public void | extractAttachments(Call call)Extract attachments
attachments.clear();
if(call.getResponseMessage() != null) {
Iterator iterator = call.getResponseMessage().getAttachments();
while(iterator.hasNext()){
attachments.add(iterator.next());
}
}
|
protected boolean | firstCall()Is this the first time the type mappings are being registered?
boolean ret = firstCall;
firstCall = false;
return ret;
|
public java.lang.Object[] | getAttachments()Get the array of attachments
The attachment array is cleared after this, so it is a destructive operation.
Object[] array = new Object[attachments.size()];
attachments.copyInto(array);
attachments.clear();
return array;
|
public org.apache.axis.message.SOAPHeaderElement | getHeader(java.lang.String namespace, java.lang.String partName)Get the header element
for(int i=0;i<headers.size();i++) {
SOAPHeaderElement header = (SOAPHeaderElement)headers.get(i);
if(header.getNamespaceURI().equals(namespace) &&
header.getName().equals(partName))
return header;
}
return null;
|
public org.apache.axis.message.SOAPHeaderElement[] | getHeaders()Get the array of header elements
SOAPHeaderElement[] array = new SOAPHeaderElement[headers.size()];
headers.copyInto(array);
return array;
|
public java.lang.String | getPassword()Get the password
return cachedPassword;
|
public javax.xml.namespace.QName | getPortName()Get the port name.
return cachedPortName;
|
public org.apache.axis.message.SOAPHeaderElement | getResponseHeader(java.lang.String namespace, java.lang.String partName)Get a response header element
try
{
if (_call == null)
return null;
return _call.getResponseMessage().getSOAPEnvelope().getHeaderByName(namespace, partName);
}
catch (Exception e)
{
return null;
}
|
public org.apache.axis.message.SOAPHeaderElement[] | getResponseHeaders()Get the array of response header elements
SOAPHeaderElement[] array = new SOAPHeaderElement[0];
try
{
if (_call == null)
return array;
Vector h = _call.getResponseMessage().getSOAPEnvelope().getHeaders();
array = new SOAPHeaderElement[h.size()];
h.copyInto(array);
return array;
}
catch (Exception e)
{
return array;
}
|
protected void | getResponseHeaders(org.apache.axis.client.Call call)Helper method for updating headers from the response.
Deprecated, since response headers should not be
automatically reflected back into the stub list.
|
public int | getTimeout()Get the timeout value in milliseconds. 0 means no timeout.
return cachedTimeout == null ? 0 : cachedTimeout.intValue();
|
public java.lang.String | getUsername()Get the user name
return cachedUsername;
|
public java.lang.Object | removeProperty(java.lang.String name)Remove a property from this instance of the Stub
NOTE: This is NOT part of JAX-RPC and is an Axis extension.
return cachedProperties.remove(name);
|
protected void | setAttachments(org.apache.axis.client.Call call)copy the attachments from the stub to the call object. After doing so,
the local set of attachments are cleared.
// Set the attachments.
Object[] attachments = getAttachments();
for(int i=0;i<attachments.length;i++){
call.addAttachmentPart(attachments[i]);
}
clearAttachments();
|
public void | setHeader(java.lang.String namespace, java.lang.String partName, java.lang.Object headerValue)Set the header
headers.add(new SOAPHeaderElement(namespace, partName, headerValue));
|
public void | setHeader(org.apache.axis.message.SOAPHeaderElement header)Set the header
headers.add(header);
|
public void | setMaintainSession(boolean session)If set to true, session is maintained; if false, it is not.
maintainSessionSet = true;
maintainSession = session;
cachedProperties.put(Call.SESSION_MAINTAIN_PROPERTY, session ? Boolean.TRUE : Boolean.FALSE);
|
public void | setPassword(java.lang.String password)Set the password.
cachedPassword = password;
|
public void | setPortName(javax.xml.namespace.QName portName)Set the port QName.
cachedPortName = portName;
|
public void | setPortName(java.lang.String portName)Set the port name.
setPortName(new QName(portName));
|
protected void | setRequestHeaders(org.apache.axis.client.Call call)
// Set the call headers.
SOAPHeaderElement[] headers = getHeaders();
for(int i=0;i<headers.length;i++){
call.addHeader(headers[i]);
}
|
public void | setTimeout(int timeout)Set the timeout in milliseconds.
cachedTimeout = new Integer(timeout);
|
public void | setUsername(java.lang.String username)Set the username.
cachedUsername = username;
|