Hi,

I'm using a jax-ws webservice generated from WSDL. It's SOAP document style
and everything works fine. The server is protected by Suns Policy agent, so
the client passes a session token as a cookie in the http header. However,
if the token is incorrect, the policy agent will return an empty http 302
redirect message. This has no body and so the client throws a SOAP fault.

Would anyone know what kind of interceptor I need to write for the client
that will catch the 302 response before CXF tries to parse the SOAP body?
Also, how would I exit the chain without the rest of the interceptors being
called?

Thanks for any help..
Here's the code to setup my client..

        QName serviceName = new QName("http://tempuri.org/";, "MyService");
        QName portName = new QName("http://tempuri.org/";,
"BasicHttpBinding_IMyService");
        String address =
"http://sample.com/Webservices/MyService/Service.svc";;

        // create port
        Service service = Service.create(serviceName);
        service.addPort(portName, SOAPBinding.SOAP11HTTP_BINDING, address);
        servicePort = (IMyService)service.getPort(portName,
IMyService.class);

-- 
View this message in context: 
http://www.nabble.com/Intercept-http-302-response-tp19951509p19951509.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to