You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Stephanie Dammann <St...@mpag.eu> on 2014/08/07 15:15:59 UTC

SOAP Fault Unexpected EOF in prolog

Hello,

I am developing a web service with WS-Security and I am using a UsernameToken + Password, Signatur and Encryption.
I am using the wssec_sign_enc-example for my application and I am able to start the Server.java class and the Client.java class.
After I am able to see the header from the client (via logging on the client side), with all the encryption-headers and signature-headers,
An error appears:
Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader: Unexpected EOF in prolog

I don't know why I am getting the error, can somebody give me a clue?
Is it possible that the header is to big?? Because there is a lot of stuff written into it...

Thanks in advance

Stephanie


Re: SOAP Fault Unexpected EOF in prolog

Posted by Aki Yoshida <el...@gmail.com>.
2014-08-13 10:55 GMT+02:00 Stephanie <st...@gmail.com>:
> I have installed CXF 3.0.0,

if you have downloaded the cxf-3.0.0 distribution and just gone to the
samples/ws_security/sign_enc and just run
mvn dependency:tree

you should have seen

org.apache.wss4j:wss4j-ws-security-common:jar:2.0.0:compile

that is transitively referenced in the project and this jar file
contains the Merlin class that your error log said it didn't find when
running mvn -Pserver.

I just rechecked it by myself running the sing_enc test with cxf-3.0.0
on osx with jdk1.7 and found everything to be fine.

Maybe your maven repo is corrupted. In that case, you might want to
delete your repo and run mvn fresh against an empty repo.
If that is not the case, something else on your system might be not
right but I have no idea. If you can reproduce the problem on another
machine, you can precisely describe the system configuration so that
we might get some clues on the cause.

regards, aki

>
> mvn dependency:tree shows that all dependencies (most compile, just two
> runtime) and everything seems to be correct.
>
> I am just using the sign_enc for an example to build my own service, but I
> am pretty sure I have done everything to execute it correctly.
>
> Thanks for your help!
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/SOAP-Fault-Unexpected-EOF-in-prolog-tp5747519p5747761.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: SOAP Fault Unexpected EOF in prolog

Posted by Stephanie <st...@gmail.com>.
I have installed CXF 3.0.0, 

mvn dependency:tree shows that all dependencies (most compile, just two
runtime) and everything seems to be correct.

I am just using the sign_enc for an example to build my own service, but I
am pretty sure I have done everything to execute it correctly.

Thanks for your help!



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

Re: SOAP Fault Unexpected EOF in prolog

Posted by Aki Yoshida <el...@gmail.com>.
I suppose you are using one of CXF 3.x.x, but which version are you
using exactly?
There is no special dependency setting required to run mvn -Pserver.
It all got everything in it and it shouldn't be throwing any
ClassNotFoundException.

what do you see when you run
mvn dependency:tree at the sign_enc folder?
that will show the project dependency.

regards, aki

2014-08-13 9:08 GMT+02:00 Stephanie <st...@gmail.com>:
> Hi, thanks for ypur answer.
>
> I am using eclipse IDE to execute the Server.java and Client.java.
> I was testing it with mvn -Pserver and mvn -Pclient, but there is shown an
> other error as in the eclipse IDE.
>
> mvn says that he cant find the class org.apache.wss4j.common.crypto.Merlin
>
> It seems like there is a dependency missing, but I am pretty sure, that I
> included everything I need.
>
> If I am executing the Java-Files in the IDE the error doesnt appear, instead
> there is the EOF exception
>
>
>
> --
> View this message in context: http://cxf.547215.n5.nabble.com/SOAP-Fault-Unexpected-EOF-in-prolog-tp5747519p5747747.html
> Sent from the cxf-user mailing list archive at Nabble.com.

Re: SOAP Fault Unexpected EOF in prolog

Posted by Stephanie <st...@gmail.com>.
Hi, thanks for ypur answer.

I am using eclipse IDE to execute the Server.java and Client.java.
I was testing it with mvn -Pserver and mvn -Pclient, but there is shown an
other error as in the eclipse IDE.

mvn says that he cant find the class org.apache.wss4j.common.crypto.Merlin

It seems like there is a dependency missing, but I am pretty sure, that I
included everything I need.

If I am executing the Java-Files in the IDE the error doesnt appear, instead
there is the EOF exception



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

Re: SOAP Fault Unexpected EOF in prolog

Posted by Aki Yoshida <el...@gmail.com>.
how are you running the test?
if you run it locally using the maven profile, that means you run
mvn -Pserver
in one shell console
and
mvn -Pclient
in another shell console

you shouldn't be getting any error unless something is interfering on
your system.

are you running the client and server on different machines or
potentially having something else already running at the port where
the server is supposed to listen?

regards, aki

2014-08-07 15:15 GMT+02:00 Stephanie Dammann <St...@mpag.eu>:
> Hello,
>
> I am developing a web service with WS-Security and I am using a UsernameToken + Password, Signatur and Encryption.
> I am using the wssec_sign_enc-example for my application and I am able to start the Server.java class and the Client.java class.
> After I am able to see the header from the client (via logging on the client side), with all the encryption-headers and signature-headers,
> An error appears:
> Caused by: org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader: Unexpected EOF in prolog
>
> I don't know why I am getting the error, can somebody give me a clue?
> Is it possible that the header is to big?? Because there is a lot of stuff written into it...
>
> Thanks in advance
>
> Stephanie
>