Hi,

I created a new web service and a client that request for this web service by using SOAP message. Before consuming the web service, I created a class that implements SOAPHandler to intercept the soap message and authenticate the client. I would like to redirect the page to registration page if the authentication is fail. Does anybody know how to redirect to the JSP page from SOAPHandler class (HandleMessage method)?

Thanks,

Rick.

You need to capture the HttpServletResponse object from your SOAP handler and then call the redirect method. Alternatively, you can issue a SOAP fault message, which will automatically redirect to the caller.

Can you tell me how to get the HttpServletResponse object in the SOAP Handler?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.