Is your client endpoint using the trailing "/" if necessary?
(http://community.microfocus.com/microfocus/corba/artix/w/knowledge_base/22413.com-ctc-wstx-exc-wstxeofexception-unexpected-eof-in-prolog.aspx)
If possible, I would activate Wireshark
(http://web-gmazza.rhcloud.com/blog/entry/soap-calls-over-wireshark)
during the calls to see what is on the wire -- you might get more
information beyond that error message.
Glen
On 09/25/2014 10:59 AM, Craddolph, Roland wrote:
Good morning,
I am getting the following error when I am sending a Base64 encode string in
CXF and was wondering if someone has seen this before.
Currently, I am sending an image to be stored in my Content Management System
in an encoded Base64 String. I have run this in SOAP UI and it works fine and
XML Spy did not throw any errors with the request. I have read that this error
typically means that there is a problem with the WSDL in reference, but I can't
find anything wrong with it. It has this element as xs:string.
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:253)
~[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:62)
~[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:845)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1624)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1513)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1318)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
[cxf-bundle-2.7.11.jar:2.7.11]
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
[cxf-bundle-2.7.11.jar:2.7.11]
at com.sun.proxy.$Proxy32.setImageDocument(Unknown Source)
[na:na]
at
com.cbi.payment_hub.services.impl.SetImageDocumentServiceImpl.sendImage(SetImageDocumentServiceImpl.java:108)
[classes/:na]
at
com.cbi.payment_hub.services.impl.SetImageDocumentServiceImpl.main(SetImageDocumentServiceImpl.java:130)
[classes/:na]
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:677)
~[woodstox-core-asl-4.2.1.jar:4.2.1]
at
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2137)
~[woodstox-core-asl-4.2.1.jar:4.2.1]
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2043)
~[woodstox-core-asl-4.2.1.jar:4.2.1]
at
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1133)
~[woodstox-core-asl-4.2.1.jar:4.2.1]
at
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1156)
~[woodstox-core-asl-4.2.1.jar:4.2.1]
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:152)
~[cxf-bundle-2.7.11.jar:2.7.11]
... 19 common frames omitted
Exception in thread "main" javax.xml.ws.soap.SOAPFaultException: Error reading
XMLStreamReader.
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:157)
at com.sun.proxy.$Proxy32.setImageDocument(Unknown Source)
at
com.cbi.payment_hub.services.impl.SetImageDocumentServiceImpl.sendImage(SetImageDocumentServiceImpl.java:108)
at
com.cbi.payment_hub.services.impl.SetImageDocumentServiceImpl.main(SetImageDocumentServiceImpl.java:130)
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:677)
at
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2137)
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2043)
at
com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1133)
at
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1156)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:152)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at
org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:845)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1624)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1513)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1318)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
at
org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:570)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:479)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
at
org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
... 3 more
Thanks,
Roland
*****************************************************************************
If you wish to communicate securely with Commerce Bank and its
affiliates, you must log into your account under Online Services at
http://www.commercebank.com or use the Commerce Bank Secure
Email Message Center at https://securemail.commercebank.com
NOTICE: This electronic mail message and any attached files are
confidential. The information is exclusively for the use of the
individual or entity intended as the recipient. If you are not
the intended recipient, any use, copying, printing, reviewing,
retention, disclosure, distribution or forwarding of the message
or any attached file is not authorized and is strictly prohibited.
If you have received this electronic mail message in error, please
advise the sender by reply electronic mail immediately and
permanently delete the original transmission, any attachments
and any copies of this message from your computer system.
*****************************************************************************