You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by "marcin.kasinski" <ma...@gmail.com> on 2013/03/02 13:10:33 UTC

Re: Operation name null in inInterceptor

Additional info :

In constructor I have:

super("pre-stream");
		super.addBefore(StaxOutInterceptor.class.getName());


I place My customInterceptor in my client and Service in and out
interceptor.

Client in interceptor : I can read operationName with code above.
Client out interceptor : I can read operationName with code above.
Service in interceptor : I GET NULL operationName with code above.
Service out interceptor : I can read operationName with code above.


Can you help me with this ?



-----

Regards
Marcin Kasinski
http://itzone.com.pl
--
View this message in context: http://cxf.547215.n5.nabble.com/Operation-name-null-in-inInterceptor-tp5723927p5723950.html
Sent from the cxf-dev mailing list archive at Nabble.com.

RE: Operation name null in inInterceptor

Posted by Andrei Shakirin <as...@talend.com>.
Hi,

In inbound chain CXF has three sources/options to determine operation name:
1. WS-Addressing headers
2. SOAP Action (it works only with HTTP protocol)
3. Top payload element (regarding WS-I basic profile top element name of input message should be the equals to operation name).

In case if you use document literal binding and JAXB marshalling, DocLiteralInInterceptor builds OperationInfo.class structure based on payload (option 3). 
DocLiteralInInterceptor also unmarshalls XML payload and packs input parameters as MessageContentList into message content on UNMARSHAL phase.

As far as message is already read from XML reader in DocLiteralInInterceptor, you cannot read it again in you interceptor placed after UNMARSHAL phase, but you have access to OperationInfo.class and unmarshalled payload in form of MessageContentList.

There are some options to resolve it, but I would like to understand your use case a little bit more: is unmarshalled payload not usable for your interceptor? Do you need message in stream form?

Cheers,
Andrei.

> -----Original Message-----
> From: marcin.kasinski [mailto:marcin.kasinski@gmail.com]
> Sent: Samstag, 2. März 2013 21:11
> To: dev@cxf.apache.org
> Subject: Re: Operation name null in inInterceptor
> 
> After additional debugging....
> 
> Phase UNMARSHAL = here I can read operation name using
> OperationInfo.class , but can not read input XML.
> 
> Phase before  UNMARSHAL  (RECEIVE, READ,...)= here I CAN NOT read
> operation name using OperationInfo.class , but can read input XML.
> 
> Now my question is :
> 
> Is there any chance to read OperationInfo and input XML in one phase in
> input service interceptor ?
> 
> 
> 
> 
> 
> -----
> 
> Regards
> Marcin Kasinski
> http://itzone.com.pl
> --
> View this message in context: http://cxf.547215.n5.nabble.com/Operation-
> name-null-in-inInterceptor-tp5723927p5723958.html
> Sent from the cxf-dev mailing list archive at Nabble.com.

Re: Operation name null in inInterceptor

Posted by "marcin.kasinski" <ma...@gmail.com>.
After additional debugging....

Phase UNMARSHAL = here I can read operation name using OperationInfo.class ,
but can not read input XML.

Phase before  UNMARSHAL  (RECEIVE, READ,...)= here I CAN NOT read operation
name using OperationInfo.class , but can read input XML.

Now my question is :

Is there any chance to read OperationInfo and input XML in one phase in
input service interceptor ?





-----

Regards
Marcin Kasinski
http://itzone.com.pl
--
View this message in context: http://cxf.547215.n5.nabble.com/Operation-name-null-in-inInterceptor-tp5723927p5723958.html
Sent from the cxf-dev mailing list archive at Nabble.com.