You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Christian Schuhegger <Ch...@gmx.de> on 2008/08/06 15:15:58 UTC

Status of simple frontend in CXF 2.1.1?

Hello,

I am trying to get a simple test running for 2 days now and originally I
thought I am doing something wrong. But now I've downloaded the CXF 2.1.1
source distribution and I built it myself. It builds fine with a
> mvn -DskipTests

If I change into the directory
 cxf/rt/frontend/simple
and I run the tests there I get the result:
Tests run: 15, Failures: 0, Errors: 12, Skipped: 0

Specifically I took the test:
cxf/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/RountripTest.java
and executed it alone in a separate clean eclipse workspace. In the form it
is it works fine, but If I add a last line:
        assertEquals("hello", client.echo("hello"));
I get a test failure. The root cause seems to be that the message is not
correctly deserialized on the receiving side. There I constantly get null
values as input to any methods that I tried to get running.

Here is the log output before the echo method is invoked with a null input:
-- snip start --
[INFO ][14:52:00.288][o.a.c.i.LoggingOutInterceptor                     ] :
Outbound Message
---------------------------
Encoding: UTF-8
Headers: {SOAPAction=[""]}
Messages: 
Payload: <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns1:echo
xmlns:ns1="http://repositories.impl.service.usermanagement.collectionmanager.p20080705.jces.jclusterjobs.sourceforge.net/"><arg0
xmlns="http://repositories.impl.service.usermanagement.collectionmanager.p20080705.jces.jclusterjobs.sourceforge.net/">hello</arg0></ns1:echo></soap:Body></soap:Envelope>
-- snip end --

The same behaviour I experienced with any tests I performed with the simple
server and the AegisDatabinding. All input parameters are set to null, even
if values are in the Payload.

Can anybody reproduce this problem? Or do I have some problem in my
environment?

Thanks,
-- 
Christian Schuhegger
http://www.el-chef.de/
-- 
View this message in context: http://www.nabble.com/Status-of-simple-frontend-in-CXF-2.1.1--tp18850960p18850960.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Status of simple frontend in CXF 2.1.1?

Posted by Benson Margulies <bi...@gmail.com>.
Could we do some sort of CXF-CXF extension header that would detect and
diagnose this?

On Fri, Aug 8, 2008 at 11:48 AM, Daniel Kulp <dk...@apache.org> wrote:

> On Friday 08 August 2008 9:40:48 am Christian Schuhegger wrote:
> > Hello,
> >
> > could anybody please try to run the RountripTest.java
> >
> cxf/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/Rountri
> >pTest.java plus add the statement:
> >         assertEquals("hello", client.echo("hello"));
> > at the very end of the test method? Could you please tell me if this
> works
> > for you?
>
> OK.  Figured this out.  (pretty easy)
>
> On the server side, the simple frontend will use some class decompiling
> stuff
> to figure out the parameter names of the methods so the wsdl has some nicer
> looking things other than arg0.   In this case, it is expecting an element
> named "text".
>
> However, the client side only has the interface, not the impl.   Interfaces
> don't store the param names (only concrete classes do).   Thus, it is
> sending "arg0", not "text".
>
> If you add:
> svrBean.setServiceClass(HelloService.class);
> to the server side, it passes as it then uses that interface to construct
> the
> wsdl and model and stuff and thus expects the "arg0".
>
> Alternatively, if you change the client to use the wsdl that the server
> produces, that would work as well.
>
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>

Re: Status of simple frontend in CXF 2.1.1?

Posted by Daniel Kulp <dk...@apache.org>.
On Friday 08 August 2008 9:40:48 am Christian Schuhegger wrote:
> Hello,
>
> could anybody please try to run the RountripTest.java
> cxf/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/Rountri
>pTest.java plus add the statement:
>         assertEquals("hello", client.echo("hello"));
> at the very end of the test method? Could you please tell me if this works
> for you?

OK.  Figured this out.  (pretty easy)

On the server side, the simple frontend will use some class decompiling stuff 
to figure out the parameter names of the methods so the wsdl has some nicer 
looking things other than arg0.   In this case, it is expecting an element 
named "text".    

However, the client side only has the interface, not the impl.   Interfaces 
don't store the param names (only concrete classes do).   Thus, it is 
sending "arg0", not "text".   

If you add:
svrBean.setServiceClass(HelloService.class); 
to the server side, it passes as it then uses that interface to construct the 
wsdl and model and stuff and thus expects the "arg0".

Alternatively, if you change the client to use the wsdl that the server 
produces, that would work as well. 


-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: Status of simple frontend in CXF 2.1.1?

Posted by Daniel Kulp <dk...@apache.org>.
On Friday 08 August 2008 9:40:48 am Christian Schuhegger wrote:
> Hello,
>
> could anybody please try to run the RountripTest.java
> cxf/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/Rountri
>pTest.java plus add the statement:
>         assertEquals("hello", client.echo("hello"));
> at the very end of the test method? Could you please tell me if this works
> for you?

Nope.  It doesn't.   Hmmm....  Digging in.

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: Status of simple frontend in CXF 2.1.1?

Posted by Christian Schuhegger <Ch...@gmx.de>.
Hello,

could anybody please try to run the RountripTest.java
cxf/rt/frontend/simple/src/test/java/org/apache/cxf/service/factory/RountripTest.java
plus add the statement:
        assertEquals("hello", client.echo("hello")); 
at the very end of the test method? Could you please tell me if this works
for you?

Thanks,
-- 
Christian Schuhegger
http://www.el-chef.de/

-- 
View this message in context: http://www.nabble.com/Status-of-simple-frontend-in-CXF-2.1.1--tp18850960p18892047.html
Sent from the cxf-user mailing list archive at Nabble.com.