cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benson Margulies" <bim2...@basistech.com>
Subject RE: simple-frontend.html
Date Wed, 17 Oct 2007 15:33:01 GMT
The 'nice idea' is fine if you understand the constraints. The two ends
have to come up with the same answer for the hidden internal model of
the service. If this is your situation, my suggestion is to avoid
interfaces and stick with classes in terms of communicating with CXF or
any similar toolkit. 

> -----Original Message-----
> From: Jonathan Slate [mailto:jslate@mtl.mit.edu]
> Sent: Wednesday, October 17, 2007 9:04 AM
> To: cxf-user@incubator.apache.org
> Subject: Re: simple-frontend.html
> 
> Ok, now I think I understand the crux of the issue. As it's working
for
> me now, I have to wonder... should I change it or go ahead with the
old
> "if it ain't broke don't fix it?" No need to answer, rhetorical
> question. :)
> 
> It is a nice idea that you can setup your services/clients using CXF
and
> not worry about all the hairy details, requiring that the client use
the
> WSDL seems to interfere with that goal a bit, but as the WSDL is the
> real contract I guess it will be hard to guarantee that the server and
> client will match up when building both off of the interface. So maybe
> it's unavoidable.
> 
> Anyway, thanks for the "gut feeling" explanation, we can now make an
> intelligent choice on how to handle this, I hope. :)
> 
> -Jonathan
> 
> Benson Margulies wrote:
> > My opinion is that using the Simple front end with an interface (as
> > opposed to a WSDL) is a gun pointed firmly at the user's foot, and
we
> > should prohibit it.
> >
> > Jonathan, I can't prove it today, but my gut feeling is that you are
> > still experiencing the client constructing a different contract than
the
> > server is using. Consuming the WSDL is the only really reliable way
to
> > get them in sync. At least, I'd suggest trying the WSDL-consumption
> > alternative and see if it works, and we can go from there.
> >
> >
> >> -----Original Message-----
> >> From: Jonathan Slate [mailto:jslate@mtl.mit.edu]
> >> Sent: Wednesday, October 17, 2007 8:26 AM
> >> To: cxf-user@incubator.apache.org
> >> Subject: Re: simple-frontend.html
> >>
> >> Thanks Jeff for making this change, it's certainly more visible.
> >> However, I'm not sure that this is the same problem. The JIRA talks
> >> about the argument name being wrong (arg0 vs. title) but in my
case,
> >>
> > the
> >
> >> argument is arg0 and it worked fine w/out changing that. The
problem
> >>
> > was
> >
> >> the xmlns="http://example.hello/" argument appearing in the
argument's
> >>
> > tag.
> >
> >> I don't think someone would figure out from looking at the JIRA
that
> >> they should use JaxWsProxyFactoryBean to avoid this problem. Or
maybe
> >>
> > it
> >
> >> *should* work with ClientProxyFactoryBean as documented and I'm
doing
> >> something wrong, which would be nice to know. But I think it's ok,
> >> because that's what the Spring client example uses...
> >>
> >> -Jonathan
> >>
> >> Jeff Yu wrote:
> >>
> >>> At the bottom of simple-frontend.html, there is a tip talked about
> >>> this, see this JIRA for detail:
> >>> https://issues.apache.org/jira/browse/CXF-897
> >>>
> >>> I updated it "Others" title to "Well-Known issue" for easily to
get
> >>> people's attention.
> >>>
> >>> Thanks
> >>> Jeff
> >>>
> >>> Jonathan Slate wrote:
> >>>
> >>>> Just wanted to ask about an issue I had and a possible problem
with
> >>>> the documentation on the Web site.
> >>>>
> >>>> In trying to learn CXF, I created a HelloWorld service using
Spring
> >>>>
> > ,
> >
> >>>> following the instructions on this page:
> >>>>
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
> >>>>
> >>>> I then created a separate client application (not using Spring)
> >>>>
> > using
> >
> >>>> the instructions on this page:
> >>>> http://cwiki.apache.org/CXF20DOC/simple-frontend.html (under
> >>>>
> > heading
> >
> >>>> ClientProxyFactoryBean)
> >>>>
> >>>> This did not work, the "text" argument was null when the sayHi
> >>>>
> > method
> >
> >>>> was called. So I set up a Spring client following the
instructions
> >>>>
> > on
> >
> >>>> the first page mentioned above. That worked. Eventually I figured
> >>>>
> > out
> >
> >>>> that the Spring example had me creating a new
JaxWsProxyFactoryBean
> >>>> whereas the simple frontend example had me creating a new
> >>>> ClientProxyFactoryBean. This resulted in slightly different SOAP
> >>>> calls, specifically in the "arg0" tag:
> >>>>
> >>>> <arg0 xmlns="http://example.hello/">World</arg0>
> >>>> (ClientProxyFactoryBean)
> >>>> <arg0>World</arg0> (JaxWsProxyFactoryBean)
> >>>>
> >>>> For some reason, the former causes the method to be called with
> >>>>
> > arg0
> >
> >>>> as null. Also, with the ClientProxyFactoryBean, the result
returned
> >>>> to the client is null, despite the fact that the soap message
> >>>> contains the return value "Hello null."
> >>>>
> >>>> Anyway, at this point it's working for me. But I'm wondering if
> >>>>
> > there
> >
> >>>> is a simple explaination for this, and if perhaps the simple
> >>>>
> > frontend
> >
> >>>> documentation should be updated to use JaxWsProxyFactoryBean.
> >>>>
> >>>> Thanks,
> >>>> Jonathan Slate
> >>>>
> >>>>
> >>>>
> >
> >


Mime
View raw message