cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From suryavikas <surya.vikas2...@gmail.com>
Subject CXF 2.4.1 Interceptor
Date Thu, 25 Aug 2011 18:15:10 GMT
Hi,

I had been using CXF 2.2.9 without any issues, and after reading the
advisory on the CXF site, I have upgraded to CXF 2.4.1. After the upgrade I
have been dealing with issues w.r.t the interceptors. 

With version 2.2.9 this code used to work just fine
public SessionInterceptor() {
		super(Phase.RECEIVE);
	}

	public void handleMessage(Message message) throws Fault {
		System.out.println(message.getContextualProperty("sessionId"));
		// Get the supplied SOAP envelope in the form of an InputStream
		InputStream inputStream = message.getContent(InputStream.class);
                .....
        }
And used to give me an entire SOAP envelope like this
[08-25 23:25:48] DEBUG SessionInterceptor [http-8080-2]: <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:dbs="http://dbsync.webservices.backend.local.com">
   <soapenv:Header>
      <sessionId>123</sessionId>
   </soapenv:Header>
   <soapenv:Body>
      <dbs:dbsync>
         <lastSyncId>11</lastSyncId>
         <userUuid>22</userUuid>
      </dbs:dbsync>
   </soapenv:Body>
</soapenv:Envelope>

Now after the upgrade the none of the clients are able to see the wsdls in
the browser or SOAP client as the request triggers the interceptor on any
requests it receives and it expects client to pass the SESSION ID, when not
found it just gives them HTTP 500 error.

I have tried with different phases to sort this issue out, but in all other
phases other than RECEIVE, I do not get the SOAP envelope in my code. 
I have disabled the inInterceptor & loaded the wsdl in SOAP UI and later
enabled back the inInterceptor & the old code was working as expected.
Now when I change the phase to any thing else clients are able to see the
wsdls, but my session checking doesn't work. 

Any suggestion or documentation about the changes in the Phase
implementation compared to 2.2.9 would really help.

Thanks 
Surya

--
View this message in context: http://cxf.547215.n5.nabble.com/CXF-2-4-1-Interceptor-tp4735473p4735473.html
Sent from the cxf-user mailing list archive at Nabble.com.

Mime
View raw message