OpenLiberty / open-liberty

Open Liberty is a highly composable, fast to start, dynamic application server runtime environment
https://openliberty.io
Eclipse Public License 2.0
1.16k stars 597 forks source link

JAX-WS: Improve serviceability of Liberty CXF implementation #7027

Open neuwerk opened 5 years ago

neuwerk commented 5 years ago

Apache CXF used in the jaxws-2.2 feature doesn't has very sparse tracing, the issue is to add trace to CXF.

sawadood commented 1 year ago

When customers report problems in Liberty Web services JAX-WS, it's very hard to debug problems because there is insufficient trace in CXF. Most of the time, Level 3 developers have to create diagnostic ifix and add trace to debug the problem and this delays resolving the customer's problem. Adding lot of trace to CXF also creates another problem when we try to upgrade the CXF version in Liberty as it involves merging all our IBM specific trace with the new CXF release. We need to identify CXF code that is used in common customer scenarios based on the cases we have received so far and add sufficient trace to enable us to debug problems without having to create diagnostic ifxes to debug customer problems.

This issue will be used to identify list of files that need to be updated to add additional trace for common customer scenarios. Separate issues will be used to implement the solution that will be selected by this issue.

sawadood commented 1 year ago

The following is the list of files from my local sandbox that have Liberty specific changes and files that I have modified to add diagnostic trace for debugging customer problems:

com.ibm.ws.org.apache.cxf.cxf.core.3.2: 20 files

    - src\org\apache\cxf\attachment\AttachmentSerializer.java
    - src\org\apache\cxf\attachment\AttachmentUtil.java
    - src\org\apache\cxf\bus\osgi\CXFExtensionBundleListener.java
    - src\org\apache\cxf\bus\osgi\OSGiBeanLocator.java
    - src\org\apache\cxf\common\jaxb\JAXBUtils.java
    - src\org\apache\cxf\common\logging\LogUtils.java
    - src\org\apache\cxf\common\spi\NamespaceClassGenerator.java
    - src\org\apache\cxf\common\util\ProxyHelper.java
    - src\org\apache\cxf\configuration\jsse\TLSClientParameters.java
    - src\org\apache\cxf\endpoint\ClientImpl.java
    - src\org\apache\cxf\interceptor\ServiceInvokerInterceptor.java
    - src\org\apache\cxf\message\MessageImpl.java
    - src\org\apache\cxf\phase\PhaseInterceptorChain.java
    - src\org\apache\cxf\service\invoker\AbstractInvoker.java
    - src\org\apache\cxf\service\model\AbstractMessageContainer.java
    - src\org\apache\cxf\service\model\EndpointInfo.java
    - src\org\apache\cxf\service\model\MessagePartInfo.java
    - src\org\apache\cxf\staxutils\StaxSource.java
    - src\org\apache\cxf\staxutils\StaxUtils.java
    - src\org\apache\cxf\transport\ChainInitiationObserver.java

com.ibm.ws.org.apache.cxf.cxf.rt.bindings.soap.3.2: 19 files

    - src\org\apache\cxf\binding\soap\SoapBinding.java
    - src\org\apache\cxf\binding\soap\SoapBindingFactory.java
    - src\org\apache\cxf\binding\soap\SoapMessage.java
    - src\org\apache\cxf\binding\soap\interceptor\AbstractSoapInterceptor.java
    - src\org\apache\cxf\binding\soap\interceptor\MustUnderstandInterceptor.java
    - src\org\apache\cxf\binding\soap\interceptor\ReadHeadersInterceptor.java
    - src\org\apache\cxf\binding\soap\interceptor\RPCInInterceptor.java
    - src\org\apache\cxf\binding\soap\interceptor\Soap11FaultOutInterceptor.java
    - src\org\apache\cxf\binding\soap\interceptor\Soap12FaultOutInterceptor.java
    - src\org\apache\cxf\binding\soap\interceptor\SoapActionInInterceptor.java
    - src\org\apache\cxf\binding\soap\interceptor\SoapHeaderInterceptor.java
    - src\org\apache\cxf\binding\soap\interceptor\SoapOutInterceptor.java
    - src\org\apache\cxf\binding\soap\interceptor\SoapPreProtocolOutInterceptor.java
    - src\org\apache\cxf\binding\soap\interceptor\TibcoSoapActionInterceptor.java
    - src\org\apache\cxf\binding\soap\jms\interceptor\SoapFaultFactory.java
    - src\org\apache\cxf\binding\soap\model\SoapHeaderInfo.java
    - src\org\apache\cxf\binding\soap\saaj\SAAJFactoryResolver.java
    - src\org\apache\cxf\binding\soap\saaj\SAAJInInterceptor.java
    - src\org\apache\cxf\binding\soap\saaj\SAAJOutInterceptor.java

com.ibm.ws.org.apache.cxf.cxf.rt.databinding.jaxb.3.2: 5 files

    - src\org\apache\cxf\jaxb\JAXBContextInitializer.java
    - src\org\apache\cxf\jaxb\JAXBDataBinding.java
    - src\org\apache\cxf\jaxb\attachment\JAXBAttachmentSchemaValidationHack.java
    - src\org\apache\cxf\jaxb\io\DataReaderImpl.java
    - src\org\apache\cxf\jaxb\io\DataWriterImpl.java

com.ibm.ws.org.apache.cxf.cxf.rt.frontend.jaxws.3.2: 16 files

    - src\org\apache\cxf\jaxws\ServiceImpl.java
    - src\org\apache\cxf\jaxws\handler\soap\SOAPHandlerInterceptor.java
    - src\org\apache\cxf\jaxws\interceptors\HolderInInterceptor.java
    - src\org\apache\cxf\jaxws\interceptors\HolderOutInterceptor.java
    - src\org\apache\cxf\jaxws\interceptors\MessageModeOutInterceptor.java
    - src\org\apache\cxf\jaxws\interceptors\SwAOutInterceptor.java
    - src\org\apache\cxf\jaxws30\handler\types\CString.java
    - src\org\apache\cxf\jaxws30\handler\types\DescriptionType.java
    - src\org\apache\cxf\jaxws30\handler\types\DisplayNameType.java
    - src\org\apache\cxf\jaxws30\handler\types\FullyQualifiedClassType.java
    - src\org\apache\cxf\jaxws30\handler\types\IconType.java
    - src\org\apache\cxf\jaxws30\handler\types\ParamValueType.java
    - src\org\apache\cxf\jaxws30\handler\types\PathType.java
    - src\org\apache\cxf\jaxws30\handler\types\PortComponentHandlerType.java
    - src\org\apache\cxf\jaxws30\handler\types\XsdQNameType.java
    - src\org\apache\cxf\jaxws30\handler\types\XsdStringType.java

com.ibm.ws.org.apache.cxf.cxf.rt.transports.http.3.2: 12 files

com.ibm.ws.org.apache.cxf.cxf.rt.transports.http.hc.3.2: 2 files

    - src\org\apache\cxf\transport\http\asyncclient\AsyncHTTPConduit.java
    - src\org\apache\cxf\transport\http\asyncclient\AsyncHTTPConduitFactory.java

com.ibm.ws.org.apache.cxf.cxf.rt.ws.addr.3.2: 4 files

    - src\org\apache\cxf\ws\addressing\impl\InternalContextUtils.java
    - src\org\apache\cxf\ws\addressing\impl\MAPAggregatorImpl.java
    - src\org\apache\cxf\ws\addressing\soap\DecoupledFaultHandler.java
    - src\org\apache\cxf\ws\addressing\soap\MAPCodec.java

com.ibm.ws.org.apache.cxf.cxf.rt.ws.policy.3.2: 4 files

    - src\org\apache\cxf\ws\policy\PolicyEngineImpl.java
    - src\org\apache\cxf\ws\policy\PolicyVerificationInInterceptor.java
    - src\org\apache\cxf\ws\policy\mtom\MTOMPolicyInterceptor.java
    - src\org\apache\cxf\ws\policy\selector\MinimalAlternativeSelector.java

com.ibm.ws.org.apache.cxf.cxf.rt.wsdl.3.2: 4 files

    - src\org\apache\cxf\wsdl\interceptors\BareOutInterceptor.java
    - src\org\apache\cxf\wsdl\interceptors\DocLiteralInInterceptor.java
    - src\org\apache\cxf\wsdl\service\factory\ReflectionServiceFactoryBean.java
    - src\org\apache\cxf\wsdl11\WSDLServiceBuilder.java
sawadood commented 1 year ago

This is the code involved in processing a simple incoming JAX-WS request:

    LibertyJaxWsServlet.java
    AbstractJaxWsWebEndpoint.java
    AbstractHTTPDestination.java    (already included above)
    ChainInitiationObserver.java    (already included above)
    PhaseInterceptorChain.java      (already included above)
    ServiceInvokerInterceptor.java  (already included above)
    SynchronousExecutor.java
    JAXWSMethodInvoker.java
    AbstractJAXWSMethodInvoker.java
    AbstractInvoker.java            (already included above)

Code involved when generating simple outbound JAX-WS request:

   JaxWsClientProxy.java
    ClientProxy.java
    ClientImpl.java   (already included above)
    HTTPConduit.java  (already included)
    MessageSenderInterceptor.java
sawadood commented 1 year ago

Probably should enhance trace in following CXF interceptors. These interceptors are invoked when processing an incoming SOAP request from a Dispatch client.

    io.openliberty.jaxws.globalhandler.internal\src\com\ibm\ws\jaxws\globalhandler\GlobalHandlerInterceptor.java
    org\apache\cxf\interceptor\LoggingInInterceptor.java  (No Liberty change)
    rt\frontend\simple\src\main\java\org\apache\cxf\frontend\WSDLGetInterceptor.java (No Liberty change)
    core\src\main\java\org\apache\cxf\interceptor\StaxInInterceptor.java (No Liberty change)
    rt\bindings\soap\src\main\java\org\apache\cxf\binding\soap\saaj\StartBodyInterceptor.java (No Liberty change)
    com.ibm.ws.jaxws.wsat\src\com\ibm\ws\wsat\policy\WSATPolicyAwareInterceptor.java
    rt\bindings\soap\src\main\java\org\apache\cxf\binding\soap\interceptor\CheckFaultInterceptor.java (No Liberty change)
    core\src\main\java\org\apache\cxf\interceptor\OutgoingChainInterceptor.java (No Liberty change)
    core\src\main\java\org\apache\cxf\interceptor\StaxInEndingInterceptor.java (No Liberty change)
    SwAInInterceptor.java (No Liberty change)
    core\src\main\java\org\apache\cxf\interceptor\OneWayProcessorInterceptor.java (No Liberty change)
    rt\frontend\jaxws\src\main\java\org\apache\cxf\jaxws\interceptors\MessageModeInInterceptor.java (No Liberty change)

Interceptors invoked when processing Dispatch request (outbound):

    rt\ws\policy\src\main\java\org\apache\cxf\ws\policyPolicyOutInterceptor.java (No Liberty change)
    rt\frontend\jaxws\src\main\java\org\apache\cxf\jaxws\interceptors\WrapperClassOutInterceptor.java (No Liberty change)
    SoapHeaderOutFilterInterceptor.java (No Liberty change)
    com.ibm.ws.jaxws.2.3.clientcontainer\src\com\ibm\ws\jaxws\client\LibertyCustomizeBindingOutInterceptor.java
    com.ibm.ws.jaxws.2.3.common\src\com\ibm\ws\jaxws\client\LibertyJaxWsClientSecurityOutInterceptor.java
    LoggingOutInterceptor.java (No Liberty change)
    core\src\main\java\org\apache\cxf\interceptor\AttachmentOutInterceptor.java (No Liberty change)
    core\src\main\java\org\apache\cxf\interceptor\StaxOutInterceptor.java (No Liberty change)
    io.openliberty.jaxws.globalhandler.internal\src\com\ibm\ws\jaxws\globalhandler\GlobalHandlerEntryOutInterceptor.java
    com.ibm.ws.jaxws.2.3.clientcontainer\src\com\ibm\ws\jaxws\client\LibertyCustomizeBindingOutEndingInterceptor.java
    com.ibm.ws.jaxws.2.3.common\src\com\ibm\ws\jaxws\client\LibertyCustomizeBindingOutEndingInterceptor.java
    core\src\main\java\org\apache\cxf\interceptor\StaxOutEndingInterceptor.java (No Liberty change)
sawadood commented 1 year ago

Here is the final list of 118 CXF files that are involved in most common customer scenarios. We will start with this list and add additional trace in these files that will provide sufficient information in the trace logs to debug customer problems.

The list of 118 files will be split into three sub lists so that this task can be divided among the JAX-WS team members:

List 1: 40 files (Syed)

com.ibm.ws.org.apache.cxf.cxf.core.3.2

com.ibm.ws.org.apache.cxf.cxf.rt.ws.policy.3.2

com.ibm.ws.org.apache.cxf.cxf.rt.wsdl.3.2

List 2: 39 files (Thomas)

com.ibm.ws.org.apache.cxf.cxf.rt.bindings.soap.3.2

com.ibm.ws.org.apache.cxf.cxf.rt.databinding.jaxb.3.2

com.ibm.ws.org.apache.cxf.cxf.rt.transports.http.3.2

List 3: 39 files (Berksan)

com.ibm.ws.org.apache.cxf.cxf.rt.frontend.jaxws.3.2

com.ibm.ws.org.apache.cxf.cxf.rt.ws.addr.3.2

com.ibm.ws.jaxws.webcontainer

com.ibm.ws.jaxws.2.3.common

com.ibm.ws.org.apache.cxf.cxf.rt.frontend.simple.3.2

io.openliberty.jaxws.globalhandler.internal

com.ibm.ws.jaxws.wsat

com.ibm.ws.jaxws.2.3.clientcontainer

sawadood commented 1 year ago

26527

26528

26529