CXF Migration from 2.x to 3.x

2020-11-09 Thread Syed Mudassir Ahmed
Hi Devs,
  I am presently using CXF 2.7.8.  I need to migrate to 3.x version to be
able to work on Java11.  However, I see that there is a drastic change from
2.x to 3.x in CXF.  One such commit is
https://github.com/apache/cxf/commit/a18be4fac03d3886317b0201123e9917d1a33e60.
In this commit, I can here
https://github.com/apache/cxf/commit/a18be4fac03d3886317b0201123e9917d1a33e60#diff-f5349d24a3d1a3bced2aa168ce24d586461fe743d2e0b72f0fafcfedb9a99234R114,
that there is no0 longer a http processor present in the http async conduit
factory.  Whats the alternative for it in cxf 3.x?  I am not able to find
any reference so far.  Please advise and guide me here to complete the java
11 migration.

Thanks,

Syed Mudassir Ahmed
LMTS-2
o:  +91 40 64535352
m: +91 9177674397
w: www.gaiansolutions.com


[jira] [Assigned] (CXF-8365) LoggingInInterceptor could not be extended / logs only once

2020-11-09 Thread Freeman Yue Fang (Jira)


 [ 
https://issues.apache.org/jira/browse/CXF-8365?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Freeman Yue Fang reassigned CXF-8365:
-

Assignee: Freeman Yue Fang

> LoggingInInterceptor could not be extended / logs only once
> ---
>
> Key: CXF-8365
> URL: https://issues.apache.org/jira/browse/CXF-8365
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-WS Runtime, logging
>Affects Versions: 3.4.0
>Reporter: Lars Uffmann
>Assignee: Freeman Yue Fang
>Priority: Major
>
> Coming with CXF-8257 {{org.apache.cxf.ext.logging.LoggingInInterceptor}} will 
> log a given message only once:
> {code:java}
> public void handleMessage(Message message) throws Fault {
> if (isLoggingDisabledNow(message)) {
> return;
> } else {
> //ensure only logging once for a certain message
> //this can prevent message logging again when fault
> //happen after PRE_INVOKE phase(rewind calls into 
> LoggingInFaultInterceptor)
> message.put(LIVE_LOGGING_PROP, Boolean.FALSE);
> }
> {code}
> Filtering is done per message, not per Interceptor instance. We use a custom 
> {{MyLoggingInInterceptor}} which subclasses the {{LoggingInInterceptor}}. (We 
> Subclass in order to use different {{LogEventSender).}} So two distinct 
> interceptor instances are applied to the Endpoint/Bus/Client but the message 
> is logged only in the first invocation.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CXF-8365) LoggingInInterceptor could not be extended / logs only once

2020-11-09 Thread Freeman Yue Fang (Jira)


[ 
https://issues.apache.org/jira/browse/CXF-8365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17228785#comment-17228785
 ] 

Freeman Yue Fang commented on CXF-8365:
---

Hi [~cachescrubber],

I'm a bit confused, since your custom MyLoggingInInterceptor extends 
org.apache.cxf.ext.logging.LoggingInInterceptor, you actually can override 
{code}
public void handleMessage(Message message)
{code}
in org.apache.cxf.ext.logging.LoggingInInterceptor and get any behaviour to 
meet your requirement. Or do I miss anything?

Best Regards
Freeman

> LoggingInInterceptor could not be extended / logs only once
> ---
>
> Key: CXF-8365
> URL: https://issues.apache.org/jira/browse/CXF-8365
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-WS Runtime, logging
>Affects Versions: 3.4.0
>Reporter: Lars Uffmann
>Assignee: Freeman Yue Fang
>Priority: Major
>
> Coming with CXF-8257 {{org.apache.cxf.ext.logging.LoggingInInterceptor}} will 
> log a given message only once:
> {code:java}
> public void handleMessage(Message message) throws Fault {
> if (isLoggingDisabledNow(message)) {
> return;
> } else {
> //ensure only logging once for a certain message
> //this can prevent message logging again when fault
> //happen after PRE_INVOKE phase(rewind calls into 
> LoggingInFaultInterceptor)
> message.put(LIVE_LOGGING_PROP, Boolean.FALSE);
> }
> {code}
> Filtering is done per message, not per Interceptor instance. We use a custom 
> {{MyLoggingInInterceptor}} which subclasses the {{LoggingInInterceptor}}. (We 
> Subclass in order to use different {{LogEventSender).}} So two distinct 
> interceptor instances are applied to the Endpoint/Bus/Client but the message 
> is logged only in the first invocation.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CXF-8226) Not able to log webservice calls with corrupt data

2020-11-09 Thread Freeman Yue Fang (Jira)


[ 
https://issues.apache.org/jira/browse/CXF-8226?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17228798#comment-17228798
 ] 

Freeman Yue Fang commented on CXF-8226:
---

I believe this is fixed by CXF-8257

> Not able to log webservice calls with corrupt data 
> ---
>
> Key: CXF-8226
> URL: https://issues.apache.org/jira/browse/CXF-8226
> Project: CXF
>  Issue Type: Improvement
>  Components: logging
>Affects Versions: 3.3.5
>Reporter: Bernhard Mähr
>Priority: Major
>
> We are providing a webservice connected by multiple customers with no or not 
> much technical knowledge and existing old software. To support them it would 
> be helpful to be able to log webservice calls which even cant be parsed.
> I have implemented a solution by replacing the OutFaultChainInitiatorObserver 
> with a custom version which logs the in message before continuing.
> {code:java}
> public class MyOutFaultChainInitiatorObserver extends 
> OutFaultChainInitiatorObserver {  
> @Override
> public void onMessage(final Message message) {
> MySlf4jVerboseEventSender.in.handleMessage(message);
> super.onMessage(message);
> }
> }
> {code}
> But it is not ea really clean solution. Would be nice if it would be easier 
> to configure/activate. Additionally I think the request is logged twice if it 
> is parsable but fails with an other error. 
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (CXF-8365) LoggingInInterceptor could not be extended / logs only once

2020-11-09 Thread Lars Uffmann (Jira)


[ 
https://issues.apache.org/jira/browse/CXF-8365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17229033#comment-17229033
 ] 

Lars Uffmann commented on CXF-8365:
---

Hi Freeman,

yes, overriding org.apache.cxf.ext.logging.LoggingInInterceptor but might be 
the only way to workaround these issue in the short term.

I opened a Bug since we (and others) might as well have created two instances 
of LoggingInInterceptor, which is the actual intent of the override:

 
{code:java}
LoggingInInterceptor first = new LoggingInInterceptor(new 
Slf4jVerboseEventSender());
LoggingInInterceptor second = new LoggingInInterceptor(new 
MyCustomLogEventSender());
endpoint.getInInterceptors().add(first);
endpoint.getInInterceptors().add(second);
...{code}
 

The change in 8257 is quite subtle and might go unnoticed for a long time. I 
think It would  be better to revert the change made and restore the original 
behaviour. Or refine the key LOGGIN_EVENT_PROP to be unique per instance of 
LoggingInInterceptor. What do you think?

 

Best Regards,

Lars

> LoggingInInterceptor could not be extended / logs only once
> ---
>
> Key: CXF-8365
> URL: https://issues.apache.org/jira/browse/CXF-8365
> Project: CXF
>  Issue Type: Bug
>  Components: JAX-WS Runtime, logging
>Affects Versions: 3.4.0
>Reporter: Lars Uffmann
>Assignee: Freeman Yue Fang
>Priority: Major
>
> Coming with CXF-8257 {{org.apache.cxf.ext.logging.LoggingInInterceptor}} will 
> log a given message only once:
> {code:java}
> public void handleMessage(Message message) throws Fault {
> if (isLoggingDisabledNow(message)) {
> return;
> } else {
> //ensure only logging once for a certain message
> //this can prevent message logging again when fault
> //happen after PRE_INVOKE phase(rewind calls into 
> LoggingInFaultInterceptor)
> message.put(LIVE_LOGGING_PROP, Boolean.FALSE);
> }
> {code}
> Filtering is done per message, not per Interceptor instance. We use a custom 
> {{MyLoggingInInterceptor}} which subclasses the {{LoggingInInterceptor}}. (We 
> Subclass in order to use different {{LogEventSender).}} So two distinct 
> interceptor instances are applied to the Endpoint/Bus/Client but the message 
> is logged only in the first invocation.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)