| Constructor: |
public AxisInvocationHandler(URL endPoint) {
this(endPoint, new DefaultMethodMap());
}
Creates a new AxisInvocationHandler that keeps a persistent session with
the service endpoint. The unqualified name of the
intercepted Java interface will be the used service name.
Intercepted methods are mapped straightforwardly to web service names. Parameters:
endPoint - target url of the web service
methodMap - a map of Java method to service method names
|
public AxisInvocationHandler(URL endPoint,
Map methodMap) {
this(endPoint, methodMap, new DefaultInterfaceMap());
}
Creates a new AxisInvocationHandler that keeps a persistent session with
the service endpoint. The unqualified name of the
intercepted Java interface will be the used service name. Parameters:
endPoint - target url of the web service
methodMap - a map of Java method to service method names
|
public AxisInvocationHandler(Call call,
Map methodMap,
Map interfaceMap) {
//
// Constructors
//
this.call = call;
this.methodToInterface = interfaceMap;
this.methodToName = methodMap;
// we obtain the configuration of the service
EngineConfiguration myEngineConfig = call.getService().getEngine().getConfig();
try
{
rootContext = (String) myEngineConfig.getGlobalOptions().get(Constants.CONFIGURATION_CONTEXT);
}
catch (ConfigurationException e)
{
// access problem
}
catch (NullPointerException e)
{
// no global options
}
// if the endpoint has already been specified,
// save it for re-attachement
if (call.getTargetEndpointAddress() != null)
{
endPoint = call.getTargetEndpointAddress().toString();
}
}
Creates a new AxisInvocationHandler and
save some origin information to re-attach to the
engine after being serialized. Parameters:
call - the Axis call object
methodMap - a map of Java method to service method names
interfaceMap - a map of Java interface to service names
|
public AxisInvocationHandler(URL endPoint,
Map methodMap,
Map interfaceMap) {
this(endPoint, methodMap, interfaceMap, true);
}
Creates a new AxisInvocationHandler that keeps a persistent session with
the service endpoint Parameters:
endPoint - target url of the web service
methodMap - a map of Java method to service method names
interfaceMap - a map of Java interface to service names
|
public AxisInvocationHandler(URL endpoint,
Service service,
Map methodMap,
Map interfaceMap) {
this(new Call(service), methodMap, interfaceMap);
call.setTargetEndpointAddress(endpoint);
setBasicAuthentication(endpoint);
endPoint = endpoint.toString();
}
Creates a new AxisInvocationHandler Parameters:
endpoint - target address of the service
service - an Axis service object
methodMap - a map of Java method to service method names
interfaceMap - a map of Java interface to service names
|
public AxisInvocationHandler(URL endPoint,
Map methodMap,
Map interfaceMap,
boolean maintainSession) {
this(endPoint, new Service(), methodMap, interfaceMap);
call.setMaintainSession(maintainSession);
}
Creates a new AxisInvocationHandler Parameters:
endPoint - target url of the web service
methodMap - a map of Java method to service method names
interfaceMap - a map of Java interface to service names
maintainSession - a flag that indicates whether this handler
should keep a persistent session with the service endpoint
|
| Method from org.jboss.net.axis.AxisInvocationHandler Detail: |
public static Object createAxisService(Class _interface,
URL endpoint) {
return createAxisService(_interface, new AxisInvocationHandler(endpoint));
} Deprecated!default creation of service |
public static Object createAxisService(Class _interface,
Call call) {
return createAxisService(
_interface,
new AxisInvocationHandler(call, new DefaultMethodMap(), new DefaultInterfaceMap()));
} Deprecated!default creation of service |
public static Object createAxisService(Class _interface,
AxisInvocationHandler handler) {
return Proxy.newProxyInstance(
_interface.getClassLoader(),
new Class[]{_interface},
handler);
} Deprecated!default creation of service |
public static Object createAxisService(Class _interface,
URL endpoint,
Service service) {
return createAxisService(
_interface,
new AxisInvocationHandler(endpoint, service, new DefaultMethodMap(), new DefaultInterfaceMap()));
} Deprecated!default creation of service |
public Object invoke(String serviceName,
String methodName,
Object[] args) throws RemoteException {
try
{
return call.invoke(serviceName, methodName, args);
}
finally
{
call.setReturnType(null);
call.removeAllParameters();
}
} Deprecated!invoke given namespace+method+args |
public Object invoke(Object target,
Method method,
Object[] args) throws Throwable {
return invoke(
(String) methodToInterface.get(method),
(String) methodToName.get(method),
args,
method.getParameterTypes());
} Deprecated!generic invocation method |
public Object invoke(String serviceName,
String methodName,
Object[] args,
Class[] parameters) throws RemoteException {
// classes are normally ignored
return invoke(serviceName, methodName, args);
} Deprecated!invoke with additional method parameter signature |
protected void setBasicAuthentication(URL target) {
String userInfo = target.getUserInfo();
if (userInfo != null)
{
java.util.StringTokenizer tok = new java.util.StringTokenizer(userInfo, ":");
if (tok.hasMoreTokens())
{
call.setUsername(tok.nextToken());
if (tok.hasMoreTokens())
{
call.setPassword(tok.nextToken());
}
}
}
} Deprecated!helper to transfer url authentication information into engine |