You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Frankiboy <ma...@gmail.com> on 2015/03/03 09:27:10 UTC

Can i get the Operation name from camel.

Im using CXF, im would like to log the operation name.   

Is there a easy way to get the operation name, from the exchange or ?

Frank



--
View this message in context: http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can i get the Operation name from camel.

Posted by Morgan Hautman <mo...@gmail.com>.
Frank,

http://stackoverflow.com/questions/10301895/calling-cxf-webservice-through-apache-camel

Regards,
Morgan

On 3/03/2015 9:27, Frankiboy wrote:
> Im using CXF, im would like to log the operation name.
>
> Is there a easy way to get the operation name, from the exchange or ?
>
> Frank
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Can i get the Operation name from camel.

Posted by Frankiboy <ma...@gmail.com>.
Thanks all for a fast reply 

Frank



--
View this message in context: http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459p5763482.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can i get the Operation name from camel.

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Yes, it's not what I said ?
If not, sorry about that (too much things in the same time ;)).

Regards
JB

On 03/03/2015 11:11 AM, Morgan Hautman wrote:
> Jb,
>
> Sorry to correct you but the default dataFormat is POJO.
>
> Regards,
> Morgan
>
> On 3/03/2015 10:22, Jean-Baptiste Onofré wrote:
>> Hi Frank,
>>
>> it depends the data format that you use on the CXF endpoint.
>>
>> Using the default data format (Message), you can retrieve the
>> operation name from the CxfConstants.OPERATION_NAME header:
>>
>> String operation =
>> (String)exchange.getIn().getHeader(CxfConstants.OPERATION_NAME);
>>
>> Regards
>> JB
>>
>> On 03/03/2015 09:27 AM, Frankiboy wrote:
>>> Im using CXF, im would like to log the operation name.
>>>
>>> Is there a easy way to get the operation name, from the exchange or ?
>>>
>>> Frank
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459.html
>>>
>>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>>
>>
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Can i get the Operation name from camel.

Posted by Morgan Hautman <mo...@gmail.com>.
Jb,

Sorry to correct you but the default dataFormat is POJO.

Regards,
Morgan

On 3/03/2015 10:22, Jean-Baptiste Onofré wrote:
> Hi Frank,
>
> it depends the data format that you use on the CXF endpoint.
>
> Using the default data format (Message), you can retrieve the 
> operation name from the CxfConstants.OPERATION_NAME header:
>
> String operation = 
> (String)exchange.getIn().getHeader(CxfConstants.OPERATION_NAME);
>
> Regards
> JB
>
> On 03/03/2015 09:27 AM, Frankiboy wrote:
>> Im using CXF, im would like to log the operation name.
>>
>> Is there a easy way to get the operation name, from the exchange or ?
>>
>> Frank
>>
>>
>>
>> -- 
>> View this message in context: 
>> http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459.html
>> Sent from the Camel - Users mailing list archive at Nabble.com.
>>
>


Re: Can i get the Operation name from camel.

Posted by Morgan Hautman <mo...@gmail.com>.
Frank,

http://camel.apache.org/cxf.html
"SOAP headers are not available in MESSAGE mode as SOAP processing is 
skipped."

So the answer to you question is "yes".

Regards,
Morgan

On 3/03/2015 11:02, Frankiboy wrote:
> Nt route starts like this:
>
>          from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching
>
>
> This give me null in the operation name...
>
>        Message in = exchange.getIn();
>          
>         String operation = (String)in.getHeader(CxfConstants.OPERATION_NAME);
>
> Maybe becouse the dataFomat is MESSAGE ?
>
> Frank
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459p5763471.html
> Sent from the Camel - Users mailing list archive at Nabble.com.


Re: Can i get the Operation name from camel.

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
it's what I said (sorry if I'm not clear): CXF_Message/Payload/POJO is 
OK, not Message.

Regards
JB

On 03/03/2015 11:02 AM, Frankiboy wrote:
> Nt route starts like this:
>
>          from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching
>
>
> This give me null in the operation name...
>
>        Message in = exchange.getIn();
>
>         String operation = (String)in.getHeader(CxfConstants.OPERATION_NAME);
>
> Maybe becouse the dataFomat is MESSAGE ?
>
> Frank
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459p5763471.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Can i get the Operation name from camel.

Posted by Frankiboy <ma...@gmail.com>.
Nt route starts like this:   

        from("cxf:bean:hubws?dataFormat=MESSAGE").streamCaching


This give me null in the operation name...

      Message in = exchange.getIn();
        
       String operation = (String)in.getHeader(CxfConstants.OPERATION_NAME);

Maybe becouse the dataFomat is MESSAGE ?

Frank 



--
View this message in context: http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459p5763471.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Can i get the Operation name from camel.

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Frank,

it depends the data format that you use on the CXF endpoint.

Using the default data format (Message), you can retrieve the operation 
name from the CxfConstants.OPERATION_NAME header:

String operation = 
(String)exchange.getIn().getHeader(CxfConstants.OPERATION_NAME);

Regards
JB

On 03/03/2015 09:27 AM, Frankiboy wrote:
> Im using CXF, im would like to log the operation name.
>
> Is there a easy way to get the operation name, from the exchange or ?
>
> Frank
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Can-i-get-the-Operation-name-from-camel-tp5763459.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com