Hi,
no problems at all, thanks for trying to help me to find the problem.
Can you paste the stack trace in the email message ?
So here's the class :
@Path("/")
@WebService(serviceName="AccountService")
public class AccountService {
@PUT
@Path("/Account")
@WebMethod
public long insert(
@WebParam(name="account")
Account account
) {
logger.info("insert Received: " + account);
return 0;
}
}
Is AccountService.insert(Account account) ever called ?
In org.apache.cxf.jaxrs.provider.JAXBElementProvider class, put a breakpoint in
isReadable() method and see why it returns false. If it returns true then check
why readFrom() fails. I'll try to run test locally too.
Cheers, Sergey
----- Original Message -----
From: Gabo Manuel
To: [email protected]
Sent: Tuesday, October 21, 2008 10:48 AM
Subject: Re: [JAX-WS][JAX-RS][JAVA-FIRST] Problem in the auto-generated wsdl
Hi Sergey,
> it's not a SOAP invocation which is being handled
Yes. the invocation is on the ReST/jax-rs endpoint.
> Is there any chance you can debug your service and see if
JAXElementProvider.isReadable is even invoked ?
I am not sure what I should be looking for or how I would do it, so here is
my attempt to provide the information you asked.
Steps taken:
1. Created a server using JAXRSServerFactoryBean as is done in the samples.
2. Using eclipse, I added a break point in the first line of the invoked
method in my service implementation. (sorry, too many 'in's)
3. Ran the Server class in debug mode. Ran the client in debug mode as well.
Attached is the snapshot of the stacktrace when the breakpoint was reached.
The class you mentioned, JAX(B)ElementProvider, is not in the list. I could be
doing something wrong... how do I properly check if the provider is being
invoked.
Again, thanks for your time.
Gabo Manuel
Gabo Manuel wrote:
Hi Sergey,
> Unfortunately I've been able to spend just a minor fraction of my time on
JAX-RS support during the last few months so my apologies for a 'slack'
support.
We have our (other) lives to live. ;)
> how does the generated wsdl look like ?
With the RS-WS mixed tags, the WSDL is pretty much what you would expect
from a standard SOAP service. I'm thinking it's a good thing that the WS
annotations does not create problems for the RS process, and vice-versa.
> Yes. Just curious, do you have any specific plans at this stage for
consuming somehow such documents ?
Since ReSTful services could easily be consumed by Http clients, there is
no immediate need. However, it would be nice if we could have something similar
to wsdl2java for ReSTful services, so consumers could just see SOAP and ReST as
just services. (It does somehow defeat the purpose of ReST a bit)
> So it does happen when the invocation goes through the JAX-RS runtime,
not the JAX-WS one, that is it's not a SOAP invocation which is being handled,
right ? It does look like that the JAX-RS JAXB provider is not invoked. Is
there any chance you can debug your service and see if
JAXElementProvider.isReadable is even invoked ?
I would have to get back to you on this. I have other things to get done
first for the day. Might be able to get back to you on Monday (atleast you have
one less person/topic to think about over the week-end).
Again, thansk for your time.
Sergey Beryozkin wrote:
Hi,
Hi Sergey,
Thank you so much for your time. To answer your questions:
Unfortunately I've been able to spend just a minor fraction of my time on
JAX-RS support during the last few months so my apologies for a 'slack'
support. This is about to change and I'm really planning to spend more time on
the JAX-RS, though I'll still need to do some work on the DOSGI project
(currently in sandbox) and look at some pending WS-Policy issues.
> 1. With JAX-RS involved, generated WSDL for a soap service is wrong
With JAX-RS alone, the WSDL for the SOAP service is wrong. I ended up
mixing the annotations of JAX-RS and JAX-WS as previously posted in
this
thread.
Ok. So, given this class :
@Path("/")
@WebService(serviceName="AccountService")
public class AccountService {
@PUT
@Path("/Account")
@WebMethod
public long insert(
@WebParam(name="account")
Account account
) {
logger.info("insert Received: " + account);
return 0;
}
}
how does the generated wsdl look like ?
Also, are there plans for auto-generation of WADL or WSDL2 for
java-first ReST services?
Yes. Just curious, do you have any specific plans at this stage for
consuming somehow such documents ?
> 2. Unmarshalling problem : does it happen as part of JAX-RS
invocation ?
> If yes, what sort of problem it is ? do you get Account as null ?
It happens in the method invocation. I follow the directions stated in
the user guide, but the method keeps reporting (via logs) that the
object it received is null.
So it does happen when the invocation goes through the JAX-RS runtime,
not the JAX-WS one, that is it's not a SOAP invocation which is being handled,
right ? It does look like that the JAX-RS JAXB provider is not invoked. Is
there any chance you can debug your service and see if
JAXElementProvider.isReadable is even invoked ?
Thanks, Sergey
> 3. Service listings : do you still see the soap service listed ?
They share one servlet, so I assume there is only one list which would
include both ReST and SOAP services. Am I wrong in this? It keeps on
saying NPE somewhere in the Endpoint class. This has been reported here
too:
http://www.nabble.com/Created%3A-%28CXF-1695%29-Service-listings-for-JAX-RS-endpoints-tt18363145.html#a18363145
Again, my thanks.
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com Version: 8.0.173 / Virus Database:
270.8.1/1727 - Release Date: 10/15/2008 8:02 PM
----------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - http://www.avg.com
Version: 8.0.173 / Virus Database: 270.8.1/1729 - Release Date: 10/16/2008 7:12
PM