Hello, 
I was trying to send a soap request but got Error reading XMLStreamReader:
Unexpected EOF in prolog.

The cxf version I use is 3.1.2

 Thu Mar 09 02:29:04 EST 2017 : WARNING: Interceptor for
{http://schemas.microsoft.com/exchange/services/2006/messages}ExchangeService#{http://schemas.microsoft.com/exchange/services/2006/messages}FindFolder
has thrown exception, unwinding now
 Thu Mar 09 02:29:04 EST 2017 : org.apache.cxf.binding.soap.SoapFault: Error
reading XMLStreamReader: Unexpected EOF in prolog
 Thu Mar 09 02:29:04 EST 2017 :  at
javax.xml.stream.SerializableLocation@2bae0ec2
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:283)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:69)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:798)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1641)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1532)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1330)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:652)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
 Thu Mar 09 02:29:04 EST 2017 :         at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
 Thu Mar 09 02:29:04 EST 2017 :         at
com.sun.proxy.$Proxy44.findFolder(Unknown Source)


I tried to use Fiddler to check the server response:

HTTP/1.1 401 Unauthorized
Cache-Control: private
Server: Microsoft-IIS/8.5
request-id: ******************
X-WSSecurity-Enabled: True
X-WSSecurity-For: None
X-OAuth-Enabled: True
X-AspNet-Version: 4.0.30319
WWW-Authenticate: Negotiate
WWW-Authenticate: NTLM
X-Powered-By: ASP.NET
X-FEServer: abc
Date: Fri, 10 Mar 2017 01:51:49 GMT
Content-Length: 0
Proxy-Support: Session-Based-Authentication


I noticed that the response header doesn't contain content-type, could this
be the possible of the root cause? 



--
View this message in context: 
http://cxf.547215.n5.nabble.com/Error-reading-XMLStreamReader-Unexpected-EOF-in-prolog-tp5777935.html
Sent from the cxf-user mailing list archive at Nabble.com.

Reply via email to