Log into WLIConsole, go to process configuration and search for Method Authorization Policy.
Find your clientRequestwithReturn method (or whatever is called the public entry method of your process) and configure.
If you add the Anonymous user to the list of Authorized Roles, anybody can call your process.
If you set any other Role, the test console will stop working and you get this error:
<faultcode>JWSError</faultcode>
<faultstring>EJB Exception: ; nested exception is: java.lang.SecurityException: Access method: clientRequestwithReturn in application: PVHelloEAR, webapp: PVHelloWebjpd: hello.PVHelloSync1 not allowed for subject: principals=[]</faultstring>
<detail>
Showing posts with label wli. Show all posts
Showing posts with label wli. Show all posts
Monday, March 15, 2010
Saturday, February 13, 2010
In WLI, find out which Web Services are invoked by a given process
This is the first step for a Discovery and Monitoring and Testing tool:
package com.acme.integration.tools;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.net.MalformedURLException;
public class ClassLoaderTest {
private static final String COM_BEA_CONTROL_SERVICE_CONTROL$_LOCATION = "com.bea.control.ServiceControl$Location";
public static void main(String[] args) throws MalformedURLException, Exception {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
String processName = "adjustment.CancelAdjustmentProcess";
Class cls = cl.loadClass(processName);
Field[] fields = cls.getDeclaredFields();
for (Field field : fields) {
Class type = field.getType();
System.out.println("type " + type.getCanonicalName() + " " + field.getName());
for (Class iface : type.getInterfaces()) {
for (Annotation annotation : type.getAnnotations()) {
String name = annotation.annotationType().getName();
if (name.equals(COM_BEA_CONTROL_SERVICE_CONTROL$_LOCATION)) {
String[] urls = ((com.bea.control.ServiceControl.Location)annotation).urls();
for (String url : urls) {
System.out.println(" url=" + url);
}
}
}
}
}
}
}
of course some jars and the src folder containing the processes must be added to the classpath
package com.acme.integration.tools;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.net.MalformedURLException;
public class ClassLoaderTest {
private static final String COM_BEA_CONTROL_SERVICE_CONTROL$_LOCATION = "com.bea.control.ServiceControl$Location";
public static void main(String[] args) throws MalformedURLException, Exception {
ClassLoader cl = Thread.currentThread().getContextClassLoader();
String processName = "adjustment.CancelAdjustmentProcess";
Class cls = cl.loadClass(processName);
Field[] fields = cls.getDeclaredFields();
for (Field field : fields) {
Class type = field.getType();
System.out.println("type " + type.getCanonicalName() + " " + field.getName());
for (Class iface : type.getInterfaces()) {
for (Annotation annotation : type.getAnnotations()) {
String name = annotation.annotationType().getName();
if (name.equals(COM_BEA_CONTROL_SERVICE_CONTROL$_LOCATION)) {
String[] urls = ((com.bea.control.ServiceControl.Location)annotation).urls();
for (String url : urls) {
System.out.println(" url=" + url);
}
}
}
}
}
}
}
of course some jars and the src folder containing the processes must be added to the classpath
Labels:
wli
Thursday, February 11, 2010
Monitor all Message Broker channels doesn't work and gives 404?
apparenly in wliconsole the link /wliconsole/msgbroker?xxexternal=true&com=monmsgbroker is broken...
this is one of the joys of using WLI....
this is one of the joys of using WLI....
Labels:
wli
Subscribe to:
Posts (Atom)