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

Sreenivas K commented on CXF-8904:
----------------------------------

I think i suspect this might be the issue, in all other interceptors i see this 
check, 
{*}{color:#000000}isGET({color}{color:#6a3e3e}message{color}{*}{color:#000000}{*}){*},{color}
 in *handleMessage* method  before proceeding further  but the same missed in 
{color:#000000}TransformInInterceptor. Due to this, *_XMLStreamReader_* being 
set to message even for *GET* requests.{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 *TransformInInterceptor 
> (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.*{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)

Reply via email to