Hi Scott,

That seems like the right approach to follow for unit testing. It's hard to
know what's going wrong without some more information. Check to see that
the client and service provider are using the same ports? The IssueUnitTest
works with dynamic ports, so maybe your client is using a hard-coded port,
and the STS is using a dynamic port.

Change the logging level to INFO (or even FINE) and see if anything pops
out.

Colm.

On Wed, May 30, 2012 at 3:11 AM, Scott Came <[email protected]> wrote:

> I am developing an STS with some customized behavior.  In particular, I
> need to use a custom TokenValidator, and possibly a custom TokenProvider as
> well.  I've read (and am trying to follow) Colm and Oliver's blog series on
> how the CXF STS works.  I believe I've set up and configured my STS project
> correctly.
>
> My next step is to develop a unit test to send security token request
> messages to my STS web service.  I've followed the approach taken by
> IssueUnitTest in the CXF codebase.  Specifically, the test initiates and
> starts an STSServer in the setup.  I am running the test with
> standalone=true, which (as I understand it) means that the STSServer
> allocates an open port, starts up an http(s) jax-ws endpoint, and enables
> the service.  Then the test creates an STSClient, which sends a proper RST
> message to the service.
>
> Unfortunately, I'm not getting past square one...when the STSClient
> initiates, it is hitting the WSDL URL (created from the allocated port) but
> is getting a "ConnectionRefused" exception.  So it appears the endpoint is
> never fully starting.
>
> First of all...is this the right approach to unit testing an STS with
> custom token validators/providers?  Or is there an easier/better way to do
> this?  Any examples from outside the CXF codebase I can follow?
>
> Assuming this is the right approach...any hints on how to track down where
> the problem is happening with standing up the endpoint?
>
> Thanks for any help you can offer.
> --Scott
>



-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Reply via email to