On 03/01/2011 7:10 AM, Juan Pedro Silva Gallino (UPM) wrote:
Ron, I really appreciate your answer.
With my comment I only meant to ask if you were aware that newer versions
solved the issue, and by it being rhetorical I meant that I should try
things before asking that much. I hope you took no offense on my comments
:-) .
Not at all.
Again, any perspective from outside helps seeing things more clearly, and
thanks to you I updated to a newer version of the CXF  framework (2.2.12)
while keeping the rest untouch. Besides having to enforce the use of some
saaj version, I ran into no other complications, so I thank you for this, as
your suggestion might have avoided a lot of bugs.

Sorry that it didn't fix the problem.
Regarding the error, it is still there. Again, it only happens when adding
"global-method-security" to the equation.
I get an "IllegalArgumentException: Object is not an instance of declaring
class" after the invocation of
org.apache.cxf.common.injection.ResourceInjector.invokePostConstruct(), both
with and without the setter method for the @Resource WebServiceContext.

Any ideas, anybody?, I can't seem to find any related info on the Web.
Thanks everybody for your help.
Regards,
              Juan Pedro

2011/1/3 Ron Wheeler<[email protected]>

On 02/01/2011 2:18 PM, Juan Pedro Silva Gallino (UPM) wrote:

Hi Ron, thanks for your answer.

Regarding the version in use, well, this is sort of a legacy code into
which
I'm adding new authorization functionality, so I was trying to get away
without changing versions just to avoid adding another grade of
uncertainty
from where new errors might come from. Just that.

Even more, I've never found in the different posts on the topic any
reference to a bug or a functionality that was to be added in future
versions, so I assumed that there was a particular way in which to do
things
to make it work that I was not aware of, not that this was a problem that
had been addressed in newer versions.

With that said, I may upgrade to newer versions of the CXF framework.
However, will just doing this solve the WebServiceContext injection
issue?,
I don't get that clearly from your answer and I didn't find anything
online
that would lead me to have such an impression. Anyhow, it is sort of a
rhetorical question, I'll try this first thing in the morning.

  It was only a general comment that should be easy to test and if it works
might lead to a more complete explanation and a workaround for the old
version.
It also keeps the discussion active which is sometimes helpful on weekends
and holidays when the real experts may be otherwise occupied and not see
your question.


Ron

  Thanks again,
                      Juan Pedro

2011/1/1 Ron Wheeler<[email protected]>

  On 28/12/2010 5:37 PM, Juan Pedro Silva Gallino (UPM) wrote:
  Hi, I've been trying to wire my WSS4J interceptors into Spring security,
which I was able to do following Freeman's suggestions.
However, I'm facing the (whats looks to be a) common problem with
WebServiceContext when trying to enable method security.

Before adding the global-method-security line everything works well.
When I add it, I get an IllegalArgumentException which complaints that
it
cannot set the WebServiceContext field to a "$Proxy131" (sorry, I'm not
able
to copy the stack trace from here).

I found some posts on the subject, mostly answered by Sergei and jax-RS
related. I learned thatthe issue is related to spring AOP and to CGLIB
proxies and suggesting to add a setter in the service interface to solve
te
issue. However, I added a setWebServiceContext(WebServiceContext wsc) to
the
service interface, and still have no luck, it fails with identical
exception
and message.

I'm using CXF 2.1.1, Spring 2.5, Spring-ws 1.5.9 and Spring-security
2.0.5.RELEASE.

  Any reason why you are using such old versions?
I would try to upgrade to newer versions before chasing bugs

Ron


  Which steps should I take to be able to use method security?

Thanks again for all the help.




Reply via email to