Just to give you an update.....

I got your test case fine and have it up and running.   The server side 
part seems fine to me.   It's using straight JAX-WS schemantics which 
are well tested, TCK compliant, etc.....   The soap messages match the 
schema/wsdl, etc....

The client side I'm having all kinds of issues with.   The client side 
simple frontend stuff seems to be nearly useless right now.   Without a 
WSDL, it requires all the parts be names arg0, arg1, etc... Your server 
isn't set that way.   You would need to reset the name in the @WebParam 
annotions, change your wsdl, etc...   Not fun and results in a pretty 
crappy service.

With the wsdl, the simple frontend just plain doesn't work at all.   It's 
not able to match up the operations in the wsdl with the methods on the 
interface.  None of the parameter "Class" objects is set into the 
service model so JAXB cannot know what to do.   Thus, nothing is 
invokable.    I'm working on fixing this now, but it's definitely a 
fairly large change.

My only suggestion at this point is to change the client to use the 
JAX-WS frontend and use a properly annotated interface (preferrably code 
generate the interface from the wsdl with the wsdl2java tool).   The 
simple frontend is definitely more for the server side, java first, 
development.    It's client side equivilent is definitely not working 
very well right now.

Sorry about that.  :-(

Dan


On Tuesday 11 December 2007, tcs wrote:
> I have sent the zipped source for the server and client via email.
> Please let me know if you do not receive it.
>
> thanks,
> tcs
>
> dkulp wrote:
> > Any chance you could send the wsdl?
> >
> > Also, I assume you're using CXF 2.0.3?
> >
> > Actually, if you could zip up and send me (private, off the mail
> > list to not clutter everyones inbox) the full server and client, I
> > could look into it easier.
> >
> > Thanks!
> > Dan
> >
> > On Tuesday 11 December 2007, tcs wrote:
> >> I updated my client code to do the following :
> >>
> >>         ClientProxyFactoryBean factory = new
> >> ClientProxyFactoryBean(); factory.setAddress(myServiceUrl);
> >>
> >>            QName SERVICE_NAME = new QName("http://demo.webservice/";,
> >> "DemoService");
> >>            factory.setServiceName(SERVICE_NAME);
> >>
> >>            QName END_POINT_NAME = new QName("http://demo.webservice/";,
> >> "DemoServiceEndPoint");
> >>            factory.setEndpointName(END_POINT_NAME);
> >>
> >>            factory.setServiceClass(DemoServiceEndPoint.class);
> >>
> >>            DemoService demoService = (DemoService) factory.create();
> >>         demoService.getObjectById(new BigDecimal("5530916"));
> >>
> >> The marshalled SOAP request still contains the 'arg0' element:
> >>
> >> <soap:Envelope
> >> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> <soap:Body>
> >>
> >> <ns1:getObjecttById xmlns:ns1="http://demo.webservice/";>
> >> <arg0>5530916</arg0>
> >> </ns1:getObjectById>
> >>
> >> </soap:Body>
> >> </soap:Envelope>
> >>
> >> dkulp wrote:
> >> > The ClientProxyFactoryBean has a
> >> > setServiceName(QName serviceName)
> >> > and
> >> > setEndpointName(QName endpointName)
> >> > calls.    You would probably need to do a ?wsdl thing on the
> >> > endpoint once with your browser or similar to figure out what
> >> > they are.   Just call those methods on the factory before calling
> >> > create() and it should work for you.
> >> >
> >> > Dan
> >> >
> >> > On Monday 10 December 2007, tcs wrote:
> >> >> I found the JIRA issue related to my problem:
> >> >> https://issues.apache.org/jira/browse/CXF-897
> >> >>
> >> >> I'm trying to follow the workarounds listed in the bug report.
> >> >>
> >> >> a)  I tried workaround #4, (i.e. renamed the argument in the
> >> >> implementation class on the server to 'arg0') but unfortunately
> >> >> that didn't help. Is there anything else that needs to be done
> >> >> besides renaming the argument.
> >> >>
> >> >> b)  I'd like to try workaround #1 (Have the client use the WSDL
> >> >> generated from the servers ?wsdl call. Would need to set the
> >> >> wsdl url, the service name, port name, etc...), but am not sure
> >> >> where to set these properties on the client.
> >> >>
> >> >> I currently do the following on the client:
> >> >>
> >> >>         ClientProxyFactoryBean factory = new
> >> >> ClientProxyFactoryBean();
> >> >> factory.setServiceClass(DemoServiceIFace.class);
> >> >>         factory.setAddress(webServiceUrl);
> >> >>         DemoServiceIFace demoService = (DemoServiceIFace)
> >> >> factory.create(); demoService.getObjectById(new
> >> >> BigDecimal("5530916"));
> >> >>
> >> >> Where do I set those properties?
> >> >>
> >> >> thanks,
> >> >>
> >> >> tcs wrote:
> >> >> > I created a spring CXF web service and deployed it on tomcat.
> >> >> >
> >> >> > I wrote a web service client (using jdk 1.4) using the
> >> >> > ClientFactoryProxyBean.  When I execute a web service method
> >> >> > from the client, I see that the parameter to the method
> >> >> > argument is null on the server even though the client sent it
> >> >> > in the request.
> >> >> >
> >> >> > But upon closer look, I noticed that the element name for the
> >> >> > method argument in the request SOAP message is incorrect.
> >> >> >
> >> >> > The message sent to the server is:
> >> >> > <soap:Envelope
> >> >> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> >> >> > <soap:Body><ns1:getObjecttById
> >> >> > xmlns:ns1="http://demo.webservice/";><arg0>5530916</arg0></ns1:
> >> >> >get Act ByPid></soap:Body></soap:Envelope>
> >> >> >
> >> >> >
> >> >> > It really should be (notice that arg0 should be namespaced
> >> >> > 'id'): <soap:Envelope
> >> >> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> >> >> > <soap:Body><ns1:getObjecttById
> >> >> > xmlns:ns1="http://demo.webservice/";><ns2:id
> >> >> > xmlns:ns2="http://model.webservice/";>5530916</ns2:id></ns1:get
> >> >> >Obj ect ById></soap:Body></soap:Envelope>
> >> >> >
> >> >> > How can I either
> >> >> > 1. make the server understand the argument correctly
> >> >> > 2. send the right XML from the client so that its understood
> >> >> > by the server.
> >> >> >
> >> >> > thanks,
> >> >
> >> > --
> >> > J. Daniel Kulp
> >> > Principal Engineer
> >> > IONA
> >> > P: 781-902-8727    C: 508-380-7194
> >> > [EMAIL PROTECTED]
> >> > http://www.dankulp.com/blog
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer
> > IONA
> > P: 781-902-8727    C: 508-380-7194
> > [EMAIL PROTECTED]
> > http://www.dankulp.com/blog



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to