Class NamingResponse
- java.lang.Object
-
- com.iplanet.services.naming.share.NamingResponse
-
public class NamingResponse extends Object
ThisNamingResponseclass represents a NamingResponse XML document. The NamingResponse DTD is defined as the following:<?xml version="1.0"> < !DOCTYPE NamingResponse [ < !ELEMENT NamingResponse (GetNamingProfile)> < !ATTLIST NamingResponse vers CDATA #REQUIRED reqid CDATA #REQUIRED> < !ELEMENT GetNamingProfile (Attribute*|Exception)> < !ELEMENT Attribute EMPTY> < !ATTLIST Attribute name CDATA #REQUIRED value CDATA #REQUIRED> < !ELEMENT Exception (#PCDATA)> ]>
-
-
Constructor Summary
Constructors Constructor Description NamingResponse(String reqid)This constructor shall only be used at the server side to construct a NamingResponse object.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAttribute(String name)Gets the attribute.StringgetException()Gets the exception.HashtablegetNamingTable()Gets the naming table.StringgetRequestID()Gets the request ID.StringgetResponseVersion()Gets the response version.static NamingResponseparseXML(String xml)This method is used primarily at the client side to reconstruct a NamingResponse object based on the XML document received from server.voidreplaceURI(String uri)Replaces "%uri" with the acutal URIvoidsetAttribute(String name, String value)Sets the naming attribute.voidsetException(String ex)Sets the exception.voidsetNamingTable(Hashtable table)Sets the naming table.StringtoXMLString()This method translates the response to an XML document String based on the NamingResponse DTD described above.
-
-
-
Constructor Detail
-
NamingResponse
public NamingResponse(String reqid)
This constructor shall only be used at the server side to construct a NamingResponse object.- Parameters:
reqid- The original request ID.
-
-
Method Detail
-
parseXML
public static NamingResponse parseXML(String xml)
This method is used primarily at the client side to reconstruct a NamingResponse object based on the XML document received from server. The DTD of this XML document is described above.- Parameters:
xml- The NamingResponse XML document String.
-
getResponseVersion
public String getResponseVersion()
Gets the response version.- Returns:
- The response version.
-
getRequestID
public String getRequestID()
Gets the request ID.- Returns:
- The request ID.
-
setAttribute
public void setAttribute(String name, String value)
Sets the naming attribute.- Parameters:
name- attribute name.value- attribute value.
-
getAttribute
public String getAttribute(String name)
Gets the attribute.- Parameters:
name- attribute name.- Returns:
- the attribute value.
-
getNamingTable
public Hashtable getNamingTable()
Gets the naming table.
-
setNamingTable
public void setNamingTable(Hashtable table)
Sets the naming table.
-
setException
public void setException(String ex)
Sets the exception.- Parameters:
ex- A string representing the exception.
-
getException
public String getException()
Gets the exception.- Returns:
- The exception.
-
replaceURI
public void replaceURI(String uri)
Replaces "%uri" with the acutal URI
-
toXMLString
public String toXMLString()
This method translates the response to an XML document String based on the NamingResponse DTD described above.- Returns:
- An XML String representing the response.
-
-