org.openspml.client
Class SpmlClient

java.lang.Object
  |
  +--org.openspml.client.SpmlClient
Direct Known Subclasses:
LighthouseClient

public class SpmlClient
extends java.lang.Object

A class providing a mechaism to send and recieve SPML requests using the SpmlRequest and SpmlResponse classes.

Once the request is formatted as XML, it uses the SOAPClient class to handle the actual communication. When the XML response is received, it is parsed into a SpmlResponse and returned.


Constructor Summary
SpmlClient()
           
 
Method Summary
 BatchResponse batchRequest(BatchRequest req)
          Send a BatchRequst, return a BatchResponse.
 ExtendedResponse extendedRequest(ExtendedRequest req)
          Summit a single ExtendedRequest.
static void println(java.lang.String msg)
           
 SpmlResponse request(SpmlRequest req)
          Send any request, return the corresponding response.
 SearchResponse searchRequest(SearchRequest req)
          Submit a single SearchRequest.
 void setAction(java.lang.String action)
          Set the "SOAP action name" which may be requried by the SOAP router in the application server.
 void setBodyAttributes(java.lang.String s)
          Set an optional list of attributes for the SOAP Body.
 void setHeader(java.lang.String s)
          Set an optional SOAP Header.
 void setMonitor(SOAPMonitor m)
          Install a SOAP message monitor.
 void setTrace(boolean b)
           
 void setUrl(java.lang.String s)
          Set the URL of a web service responding to SOAP requests.
 void setUrl(java.net.URL url)
          Set the URL of a web service responding to SOAP requests.
 void throwErrors(SpmlResponse res)
          Convert error messages in a response into an SpmlException.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SpmlClient

public SpmlClient()
Method Detail

setUrl

public void setUrl(java.lang.String s)
            throws java.net.MalformedURLException
Set the URL of a web service responding to SOAP requests.

setUrl

public void setUrl(java.net.URL url)
Set the URL of a web service responding to SOAP requests.

setAction

public void setAction(java.lang.String action)
Set the "SOAP action name" which may be requried by the SOAP router in the application server.

setHeader

public void setHeader(java.lang.String s)
Set an optional SOAP Header. The string is expected to contain well formed XML.

setBodyAttributes

public void setBodyAttributes(java.lang.String s)
Set an optional list of attributes for the SOAP Body. The string is expected to contain a fragment of well formed XML attribute definitions, "wsu:Id='myBody'" It is assumed for now that any namespace references in the attribute names do not need to be formally declared in the soap:Envelope.

setTrace

public void setTrace(boolean b)

setMonitor

public void setMonitor(SOAPMonitor m)
Install a SOAP message monitor.

request

public SpmlResponse request(SpmlRequest req)
                     throws SpmlException
Send any request, return the corresponding response.

println

public static void println(java.lang.String msg)

batchRequest

public BatchResponse batchRequest(BatchRequest req)
                           throws SpmlException
Send a BatchRequst, return a BatchResponse.

searchRequest

public SearchResponse searchRequest(SearchRequest req)
                             throws SpmlException
Submit a single SearchRequest.

extendedRequest

public ExtendedResponse extendedRequest(ExtendedRequest req)
                                 throws SpmlException
Summit a single ExtendedRequest.

throwErrors

public void throwErrors(SpmlResponse res)
                 throws SpmlException
Convert error messages in a response into an SpmlException.