[
https://issues.apache.org/jira/browse/CXF-8904?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17750124#comment-17750124
]
Sreenivas K edited comment on CXF-8904 at 8/2/23 6:30 AM:
----------------------------------------------------------
[~reta] This is what im getting in logs:
{color:#000000}InputStream is::
org.apache.cxf.transport.http.AbstractHTTPDestination$1@32349729{color}
{color:#000000}To add more details, this is the interceptor chain i see thats
getting executed when *?wsdl* accessed: {color}
{color:#000000} receive [PolicyInInterceptor, WireTapIn,
LoggingInFaultInterceptor, AttachmentInInterceptor]{color}
{color:#000000} pre-stream [RemoveDefaultsInterceptor,
CertConstraintsInterceptor]{color}
{color:#000000} post-stream [{*}MyTransformInInterceptor{*},
StaxInInterceptor]{color}
{color:#000000} read [SAAJPreInInterceptor, {*}MyWSDLGetInterceptor2{*},
ReadHeadersInterceptor, SoapActionInInterceptor, StartBodyInterceptor]{color}
{color:#000000} pre-protocol [{*}MySAAJInInterceptor{*},
MustUnderstandInterceptor]{color}
{color:#000000} post-protocol [CheckFaultInterceptor,
JAXBAttachmentSchemaValidationHack]{color}
{color:#000000} unmarshal [DocLiteralInInterceptor,
SoapHeaderInterceptor]{color}
{color:#000000} pre-logical [OneWayProcessorInterceptor]{color}
{color:#000000} post-logical [WrapperClassInInterceptor]{color}
{color:#000000} pre-invoke [LoggingInInterceptor, SwAInInterceptor,
HolderInInterceptor]{color}
{color:#000000} invoke [ServiceInvokerInterceptor]{color}
{color:#000000} post-invoke [OutgoingChainInterceptor]{color}
{color:#000000}*MyTransformInInterceptor ->* its just a copy of
*TransformInInterceptor* to add logs{color}
{color:#000000}*MyWSDLGetInterceptor2 ->* Custom interceptor extends
{*}WSDLGetInterceptor{*}, to alter generated WSDL for my usecases.{color}
{color:#000000}*MySAAJInInterceptor ->* Custom interceptor extends
*SAAJInInterceptor* to alter soap body for a usecase.{color}
was (Author: JIRAUSER295990):
[~reta] This is what im getting in logs:
{color:#000000}InputStream is::
org.apache.cxf.transport.http.AbstractHTTPDestination$1@32349729{color}
> TransformInInterceptor and SAAJInInterceptor - Getting SoapFault when
> accessing WSDL
> ------------------------------------------------------------------------------------
>
> Key: CXF-8904
> URL: https://issues.apache.org/jira/browse/CXF-8904
> Project: CXF
> Issue Type: Bug
> Components: JAX-WS Runtime
> Affects Versions: 3.5.3
> Reporter: Sreenivas K
> Priority: Major
>
> Due to my peculiar usecase, i had to configure both
> *org.apache.cxf.feature.StaxTransformFeature (to transform namespaces) and
> SAAJInInterceptor* *(to modify soap body for a case).*
> But due to this, when i accessed webservice *?wsdl* in browser, its failing
> with below exception:
> _org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader._
> _at
> org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInInterceptor.handleMessage(SAAJInInterceptor.java:145)
> ~[cxf-rt-bindings-soap-3.5._
> _3.jar:3.5.3]_
> _Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog_
> _at [row,col
> {unknown-source}
> ]: [1,0]_
> _at
> com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:701)
> ~[woodstox-core-6.2.8.jar:6.2.8]_
> _at
> com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2235)
> ~[woodstox-core-6.2.8.jar:6.2.8]_
>
> When i looked into source code of
> _*org.apache.cxf.binding.soap.saaj.SAAJInInterceptor$SAAJPreInInterceptor,
> found below code to validate whether its GET request or not, which is failing
> and so it proceeded further and thrown that exception:*_
>
> {color:#000000} {color}{color:#7f0055}public{color}{color:#000000}
> {color}{color:#7f0055}boolean{color}{color:#000000} isGET(T
> {color}{color:#6a3e3e}message{color}{color:#000000}) {{color}
> {color:#000000} String {color}{color:#6a3e3e}method{color}{color:#000000} =
> (String)
> {color}{color:#6a3e3e}message{color}{color:#000000}.get({color}{color:#2a00ff}"org.apache.cxf.request.method"{color}{color:#000000});{color}
> {color:#000000} {color}{color:#7f0055}return{color}{color:#000000}
> {color}{color:#2a00ff}"GET"{color}{color:#000000}.equals({color}{color:#6a3e3e}method{color}{color:#000000})
> &&
> {color}{color:#6a3e3e}message{color}{color:#000000}.{color}{color:#000000}getContent{color}{color:#000000}(XMLStreamReader.{color}{color:#7f0055}class{color}{color:#000000})
> == {color}{color:#7f0055}null{color}{color:#000000};{color}
> {color:#000000} }{color}
> Here, this condition,
> *{color:#6a3e3e}message{color}{color:#000000}.{color}{color:#000000}getContent{color}{color:#000000}(XMLStreamReader.{color}{color:#7f0055}class{color}{color:#000000})
> == {color}{color:#7f0055}null,{color}* {color:#172b4d}is failing and reason
> i found is, its being set in *TransformInInterceptor,* which is gettng added
> to Interceptor Chain when *StaxTranformFeature* configured to cxf bus.{color}
> {color:#172b4d}To fix it (for now), i can remove that condition by extending
> the interceptor and overriding *isGET* method. But i just want to know is
> this expected or a bug ? And if i remove that condition, any other issues i
> may get? Or is there any other solution to address my problem?{color}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)