Brad,

It's quite possible (and highly likely) that the JAXB context is not 
being created with the subclasses as part of the context.   Thus, the 
subclasses cannot be properly written/read.  By default, the runtime 
just examines the exact classes referenced from the SEI interface to 
figure out what classes need to be bound into the context.   In many 
cases, the subclasses would not be referenced there and thus would not 
be found.

There are a couple ways to deal with it:

1) If using jaxws/jaxb plus the 2.1 snapshots, (this is a jaxws 2.1 
feature) you can add @XmlSeeAlso annotations in various places to have 
it "SeeAlso" the additional classes.

2) If the subclasses are in the same package as the base class, stick 
a "jaxb.index" file in the package that just lists the sub-classes. 
(without the package names)

3) There are spring config methods of adding extra classes to the 
context.  You can see our systest config:
http://svn.apache.org/viewvc/incubator/cxf/trunk/systests/src/test/resources/extrajaxbclass.xml?revision=581341&view=markup

Dan


On Sunday 06 April 2008, Brad O'Hearne wrote:
> Doug,
>
> Thanks for the reply.  Couple things -- first, @UriParam is now
> apparently @PathParam. Additionally, I cannot get the paths to work. I
> repeatedly get Tomcat errors that there's "No operation matching
> request path...", and others like it....still a black art....I'd love
> to get this worked out, as I've got jax-rs loaded, I just need to be
> able to hit it now. I've tried about every URL combination
> possible....no dice.
>
> Prior to your post, I had reverted back to my Jax-WS frontend, and I
> discovered that inheritance IS working on serialization (outbound
> serialization on return types) but is NOT working on deserialization
> (inbound deserialization of XML to Java types on parameters). The
> problem is definitely there.
>
> Brad
>
> On Apr 5, 2008, at 7:54 PM, Doug wrote:
> > On Sun, 6 Apr 2008, Brad O'Hearne wrote:
> >> I've moved to 2.1 SNAPSHOT -- my @UriTemplate annotations still
> >> won't compile. Is there another dependency needed?
> >
> > I think @UriTemplate was deprecated/replaced by @Path by the JSR-311
> > folks,
> > but their spec documents aren't uptodate (thats my understanding
> > anyway)
> >
> >
> > Something like the following works for me (from the 2.1 SNAPSHOT):
> >
> > import javax.ws.rs.Path;
> > import javax.ws.rs.GET;
> > import javax.ws.rs.POST;
> > import javax.ws.rs.core.HttpContext;
> > import javax.ws.rs.core.HttpHeaders;
> > import javax.ws.rs.core.Response;
> > import javax.ws.rs.core.UriInfo;
> > import javax.ws.rs.core.MultivaluedMap;
> > import javax.ws.rs.ProduceMime;
> > import javax.ws.rs.ConsumeMime;
> > import javax.ws.rs.UriParam;
> > import javax.ws.rs.WebApplicationException;
> >
> > @Path("/rc")
> > public class ReflectionCoverageService {
> >
> >     @POST
> >     @Path("init/{clientId}")
> >     @ProduceMime("text/plain")
> >     public String init(@UriParam("clientId") String id, @HttpContext
> > UriInfo
> > info, SomeJavaBeanClass sjbc) {
> >             MultivaluedMap params  = info.getQueryParameters();



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog

Reply via email to