0
votes

We have a web service client, developed using Apache CXF. Inside our client class, we have this:

public class RunCode implements CallbackHandler
{

   @Test
   public void getView()
   {
       // Code     
   }

}

Now my question is: in which cases our classes need to implement the CallbackHandler? And in the above code what is it doing exactly?

1
What is 'CallbackHandler'? I can't imagine any case in which a JUnit test would need to or want to implement such a thing. - bmargulies
CallbackHandler is a interface from javax.security.auth.callback , - user974802

1 Answers

0
votes

CallbackHandler is used with WS-SECURITY and WS-SECURITYPOLICY. See this documentation of CXF WS-SECURITY. You would not make a unit test class implement it unless for some complex reason you chose to pass the 'this' of your unit test into CXF as the callback object, which would be a rather baroque design for a unit test if you ask me.