Author: thomas.diesler(a)jboss.com
Date: 2007-01-21 08:08:14 -0500 (Sun, 21 Jan 2007)
New Revision: 2016
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextInjector.java
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointJSE.java
Log:
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextInjector.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextInjector.java 2007-01-21
12:37:13 UTC (rev 2015)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/core/jaxws/WebServiceContextInjector.java 2007-01-21
13:08:14 UTC (rev 2016)
@@ -50,25 +50,26 @@
try
{
// scan fields that are marked with @Resource
- Field[] fields = epImpl.getClass().getFields();
+ Field[] fields = epImpl.getClass().getDeclaredFields();
for (Field field : fields)
{
Class type = field.getType();
if (type == WebServiceContext.class &&
field.isAnnotationPresent(Resource.class))
{
+ field.setAccessible(true);
field.set(epImpl, webServiceContext);
}
}
// scan methods that are marked with @Resource
- Method[] methods = epImpl.getClass().getMethods();
+ Method[] methods = epImpl.getClass().getDeclaredMethods();
for (Method method : methods)
{
Class[] paramTypes = method.getParameterTypes();
if (paramTypes.length == 1 && paramTypes[0] ==
WebServiceContext.class && method.isAnnotationPresent(Resource.class))
{
+ method.setAccessible(true);
method.invoke(epImpl, new Object[] { webServiceContext });
-
}
}
}
Modified:
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointJSE.java
===================================================================
---
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointJSE.java 2007-01-21
12:37:13 UTC (rev 2015)
+++
trunk/jbossws-tests/src/main/java/org/jboss/test/ws/jaxws/context/EndpointJSE.java 2007-01-21
13:08:14 UTC (rev 2016)
@@ -36,7 +36,7 @@
public class EndpointJSE
{
@Resource
- public WebServiceContext wsCtx;
+ WebServiceContext wsCtx;
public String echo(String input)
{
Show replies by date