|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.benow.service.SimpleServiceClient
public class SimpleServiceClient
The SimpleServiceClient is a simple accessor to services. It can be used as a standalone application (benow-service-client.jar) or within an application as an accessor to a remote system running the BeNOW services over http (BeNOW web framework).
| Nested Class Summary | |
|---|---|
class |
SimpleServiceClient.RemoteError
|
| Constructor Summary | |
|---|---|
SimpleServiceClient(java.lang.String urlStr)
Create a new client connecting to given service url, in the format [protocol]://[user:pass:]host[:port]/[prefix] such as http://localhost:8880/svc If no username or password is given, then the user and pass from the runtime (Security.getCurrentUser()) is used, if there is any. |
|
SimpleServiceClient(java.lang.String host,
int port)
Create client to given host, connect url constructed is http://[host]:[port]/svc. |
|
SimpleServiceClient(java.lang.String protocol,
java.lang.String host,
int port,
java.lang.String file)
|
|
SimpleServiceClient(java.net.URL url)
Create a new client connecting to given service url, in the format [protocol]://[user:pass:]host[:port]/[prefix] such as http://localhost:8880/svc If no username or password is given, then the user and pass from the runtime (Security.getCurrentUser()) is used, if there is any. |
|
| Method Summary | |
|---|---|
static java.lang.String |
elementToString(org.w3c.dom.Element elem)
Converts an element to a xml string. |
java.lang.Object |
exec(java.lang.String className,
java.lang.String methodSig,
java.lang.Object... params)
Exec a service method with parameters, returning a result as an object. |
byte[] |
execData(java.lang.String className,
java.lang.String methodSig,
java.lang.Object... params)
Runs a given method and returns the raw returned data. |
java.lang.String |
execString(java.lang.String className,
java.lang.String methodSig,
java.lang.Object... params)
Runs a given method and returns the full returned value in string format. |
org.w3c.dom.Document |
execXML(java.lang.String className,
java.lang.String methodSig,
java.lang.Object... params)
Call, returning xml document. |
static void |
main(java.lang.String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimpleServiceClient(java.lang.String urlStr)
throws java.net.MalformedURLException
urlStr -
java.net.MalformedURLException
public SimpleServiceClient(java.net.URL url)
throws java.net.MalformedURLException
urlStr -
java.net.MalformedURLException
public SimpleServiceClient(java.lang.String host,
int port)
throws java.net.MalformedURLException
host -
java.net.MalformedURLException
public SimpleServiceClient(java.lang.String protocol,
java.lang.String host,
int port,
java.lang.String file)
throws java.net.MalformedURLException
java.net.MalformedURLException| Method Detail |
|---|
public byte[] execData(java.lang.String className,
java.lang.String methodSig,
java.lang.Object... params)
throws SimpleServiceClient.RemoteError,
java.lang.RuntimeException
className - methodSig - params -
SimpleServiceClient.RemoteError - on something wrong remotely
java.lang.RuntimeException
public java.lang.Object exec(java.lang.String className,
java.lang.String methodSig,
java.lang.Object... params)
className - methodSig - params -
public java.lang.String execString(java.lang.String className,
java.lang.String methodSig,
java.lang.Object... params)
className - methodSig - params -
SimpleServiceClient.RemoteError - on something wrong remotely
java.lang.RuntimeException
public org.w3c.dom.Document execXML(java.lang.String className,
java.lang.String methodSig,
java.lang.Object... params)
className - methodSig - params -
public static java.lang.String elementToString(org.w3c.dom.Element elem)
throws java.io.IOException
elem -
java.io.IOExceptionpublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||